Thrive Game Development
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Thrive Game Development

Development of the evolution game Thrive.
 
HomeHome  PortalPortal  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  
Welcome new and returning members!
If you're new, read around a bit before you post: the odds are we've already covered your suggestion.
If you want to join the development team, sign up and tell us why.
ADMIN is pleased to note that this marquee has finally been updated.
ADMIN reminds you that the Devblog is REQUIRED reading.
Currently: The Microbe Stage GUI is under heavy development
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Quick Links
Website
/r/thrive
GitHub
FAQs
Wiki
New Posts
Search
 
 

Display results as :
 
Rechercher Advanced Search
Statistics
We have 1675 registered users
The newest registered user is dejo123

Our users have posted a total of 30851 messages in 1411 subjects
Who is online?
In total there are 8 users online :: 0 Registered, 0 Hidden and 8 Guests

None

Most users ever online was 443 on Sun Mar 17, 2013 5:41 pm
Latest topics
» THIS FORUM IS NOW OBSOLETE
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby NickTheNick Sat Sep 26, 2015 10:26 pm

» To all the people who come here looking for thrive.
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby NickTheNick Sat Sep 26, 2015 10:22 pm

» Build Error Code::Blocks / CMake
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby crovea Tue Jul 28, 2015 5:28 pm

» Hello! I can translate in japanese
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby tjwhale Thu Jul 02, 2015 7:23 pm

» On Leave (Offline thread)
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby NickTheNick Wed Jul 01, 2015 12:20 am

» Devblog #14: A Brave New Forum
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby NickTheNick Mon Jun 29, 2015 4:49 am

» Application for Programmer
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby crovea Fri Jun 26, 2015 11:14 am

» Re-Reapplication
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby The Creator Thu Jun 25, 2015 10:57 pm

» Application (programming)
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby crovea Tue Jun 23, 2015 8:00 am

» Achieving Sapience
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby MitochondriaBox Sun Jun 21, 2015 7:03 pm

» Microbe Stage GDD
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby tjwhale Sat Jun 20, 2015 3:44 pm

» Application for Programmer/ Theorist
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby tjwhale Wed Jun 17, 2015 9:56 am

» Application for a 3D Modeler.
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby Kaiju4u Wed Jun 10, 2015 11:16 am

» Presentation
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby Othithu Tue Jun 02, 2015 10:38 am

» Application of Sorts
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby crovea Sun May 31, 2015 5:06 pm

» want to contribute
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby Renzope Sun May 31, 2015 12:58 pm

» Music List Thread (Post New Themes Here)
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby Oliveriver Thu May 28, 2015 1:06 pm

» Application: English-Spanish translator
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby Renzope Tue May 26, 2015 1:53 pm

» Want to be promoter or project manager
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby TheBudderBros Sun May 24, 2015 9:00 pm

» A new round of Forum Revamps!
roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Emptyby Oliveriver Wed May 20, 2015 11:32 am


 

 [ARC]-Roadkill's programming tutorial part I-

Go down 
+4
eumesmo
Invader
Commander Keen
roadkillguy
8 posters
AuthorMessage
roadkillguy
Experienced
roadkillguy


Posts : 528
Reputation : 17
Join date : 2010-08-25
Age : 31
Location : Rhode Island

roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Empty
PostSubject: [ARC]-Roadkill's programming tutorial part I-   roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- EmptyFri Oct 01, 2010 11:54 am

*stickied by scio

All right here we go. If you would like to learn to program, I will help. Please note that LUA is very foreign to me, and I probably shouldn't be teaching about it. If someone wants to add LUA, feel free to do so.

First off, programming is easy. Especially when you know the basic commands in a program. A program executes these commands flawlessly and very fast.

First off, the variable.

Variables are defined like this:
Code:


//THIS IS A COMMENT.  IT IS IGNORED BY THE COMPILER, SO YOU CAN TYPE
//WHATEVER YOU WANT BEHIND IT.

/*
YOU CAN ALSO COMMENT LIKE THIS
*/

//THE FOLLOWING LINE DEFINES myNumber AS THE NUMBER 1
var myNumber = 1;

//THE FOLLOWING LINE DEFINES myString AS THE STRING "I'm a pirate"
var myString = "I'm a pirate";


What's a string, you might ask? It's a collection of characters strung together.

Code:

//IF YOU REMEMBER YOUR BASIC ALGEBRA, YOU CAN DO THIS TO
var number1 = 1;
var number2 = 2;
var number3 = number1 + number2;

//THE + OPERATOR CAN ALSO APPEND THINGS TO STRINGS
var string = "number1 = " + number1;

If we were to output number3, it would be the number 3.
If we were to output string, it would be "number1 = 1".
We will cover this later.

Code:

//HERE'S SOME MORE ALGEBRA
var number1 = 1;
var number2 = 5;
var number3 = 2;

var number4 = number1*number2*number3;

var number5 = number4/2;
number4 would then be... You guessed it! 10!
number5 would then be... 5!

Now for the quiz!

I need you to write me a program that creates a human readable string containing the following variables. x, y, z, rotation, dx, dy and dz.

Please do not post the answer in the comments section, pm it to me instead. Thanks!

Also, could we change the text color inside the code blocks to something like black?
Back to top Go down
Commander Keen
Industrial Team Lead
Commander Keen


Posts : 1123
Reputation : 36
Join date : 2010-07-23
Location : Czech Republic (not that anyone would know where it is...)

roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Empty
PostSubject: Re: [ARC]-Roadkill's programming tutorial part I-   roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- EmptyFri Oct 01, 2010 12:35 pm

I might add Lua if I ever find some time..
Back to top Go down
Invader
Experienced
Invader


Posts : 528
Reputation : 11
Join date : 2010-07-10
Age : 28

roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Empty
PostSubject: Re: [ARC]-Roadkill's programming tutorial part I-   roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- EmptyFri Oct 01, 2010 6:02 pm

roadkillguy wrote:
To actually contribute, everyone on this forum MUST learn to program.

I quit.
Back to top Go down
eumesmo
Regular
eumesmo


Posts : 297
Reputation : 4
Join date : 2010-07-09

roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Empty
PostSubject: Re: [ARC]-Roadkill's programming tutorial part I-   roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- EmptyFri Oct 01, 2010 6:21 pm

want some lua?
Code:

--lua prime gen i made a while ago (i'll add the one that records to a file if i find it....
numbers = {}
n = 1
_G["return"] = (function ()
return numbers
end)



work = (function (number,tab)
a = false
i = 2
if #numbers > 2 then
repeat
got = number/tab[i]
if got == math.floor(got) then
a = true
else
i = i+1
end
until a == true or i >= #tab
end
if a == false then
table.insert(tab,number)
print("number"..number.."Is It")
end end)

coroutine.resume(coroutine.create(function ()
b = false
repeat
work(n,numbers)
n = n+1
until b == true end))

lua is not that hard.

variables 101.

you dont need to define the type of any variable. if you say lol = 42 it automatically says that lol is a int with value 42.

variables and even functions, tables and threads can many times remain anonymous, which means they need not their name to be determined

lol = 42 --number
var = "42" --string
bool = true --bool
fun = (function ...end) --function
coroutine.resume(coroutine.create(function() end)) -- notice that function ha not been defined



i know lua (though i do not have much experience with metatables) and i've started to learn C++ (but school has left me with no time to learn though)
see lua.org for details and stuff...

@roadkill

i think you mean something like this:
var = "x, y, z, rotation, dx, dy and dz"
the output would be: x, y, z, rotation, dx, dy and dz
you might also mean to something like this:
val = "x"
val2 ="y"
var = val..","..val2
Back to top Go down
roadkillguy
Experienced
roadkillguy


Posts : 528
Reputation : 17
Join date : 2010-08-25
Age : 31
Location : Rhode Island

roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Empty
PostSubject: Re: [ARC]-Roadkill's programming tutorial part I-   roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- EmptyFri Oct 01, 2010 8:00 pm

...I'm pretty sure that was part of the quiz.
Back to top Go down
Noitulove
Regular



Posts : 237
Reputation : 0
Join date : 2010-07-09

roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Empty
PostSubject: Re: [ARC]-Roadkill's programming tutorial part I-   roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- EmptyFri Oct 01, 2010 8:24 pm

roadkillguy wrote:
To actually contribute, everyone on this forum MUST learn to program.

And I thought Sven was a dictator!

Oh, em, I mean I pass.

Please?
Back to top Go down
~sciocont
Overall Team Lead
~sciocont


Posts : 3406
Reputation : 138
Join date : 2010-07-06

roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Empty
PostSubject: Re: [ARC]-Roadkill's programming tutorial part I-   roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- EmptyFri Oct 01, 2010 9:49 pm

Not eneryone needs to program. It's actually a bad idea to have everyone here programming, because lots of people really aren't clear on all of our current ideas. Too many cooks will undoubtedly spoil the broth.

So, thank you very, very much for putting this up, but I'm the one calling the managerial shots here, ok?

Back to top Go down
AIs-null
Learner
AIs-null


Posts : 142
Reputation : 1
Join date : 2011-02-05

roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Empty
PostSubject: Re: [ARC]-Roadkill's programming tutorial part I-   roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- EmptyFri May 13, 2011 1:59 am

First they should learn Console input and output with mathematics, then teach them OpenGL.
Back to top Go down
Mysterious_Calligrapher
Biome Team Lead
Mysterious_Calligrapher


Posts : 1034
Reputation : 26
Join date : 2010-11-26
Age : 32
Location : Earth, the solar system, the milky way...

roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Empty
PostSubject: Re: [ARC]-Roadkill's programming tutorial part I-   roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- EmptyFri May 13, 2011 10:18 am

Lovely, but until I can do more than smack at my calculator, I stop at algebra.

Though thank you for putting this up, as it gives me an idea of the math that will be required in order to define our biomes and population dynamics.
Back to top Go down
AIs-null
Learner
AIs-null


Posts : 142
Reputation : 1
Join date : 2011-02-05

roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Empty
PostSubject: Re: [ARC]-Roadkill's programming tutorial part I-   roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- EmptyFri May 13, 2011 12:00 pm

Mysterious Calligrapher, you are doing a splendid job at giving us information and doing the science! You are not required to learn how to program, as i see it, you are way to much needed in the science section and making concept arts.

However, it would maybe proove beneficial to have you learn a little bit, so that your concepts don't go overhand and are actually realistic to accomplish
Back to top Go down
Mysterious_Calligrapher
Biome Team Lead
Mysterious_Calligrapher


Posts : 1034
Reputation : 26
Join date : 2010-11-26
Age : 32
Location : Earth, the solar system, the milky way...

roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Empty
PostSubject: Re: [ARC]-Roadkill's programming tutorial part I-   roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- EmptyFri May 13, 2011 5:23 pm

I agree, I probably ought to have a look at the basics of math that the system can handle before I dump a lot of theorems on you.

I'm almost finished with finals, though, and I'm still hard at work on the biomes - I'm mostly interested in knowing if the math I've got for biome determination for the automatic placement can be handled by the programming... and unfortunately scio has class during the day, so I can't be pestering him for the answers all the time.

Kudos to you lot who actually make the machines accept all this math.
Back to top Go down
Sponsored content





roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Empty
PostSubject: Re: [ARC]-Roadkill's programming tutorial part I-   roadkill tutorial - [ARC]-Roadkill's programming tutorial part I- Empty

Back to top Go down
 
[ARC]-Roadkill's programming tutorial part I-
Back to top 
Page 1 of 1
 Similar topics
-
» New-ish to programming, what should I do?
» Programming
» Application (programming)
» Programmer Introduction Thread
» Programming Team

Permissions in this forum:You cannot reply to topics in this forum
Thrive Game Development :: Archive-
Jump to: