View Single Post
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#2
Originally Posted by Soulaxe View Post
Taking a look at how to develop in python, I've relised the similarity to python and the Game Maker Language. Take a look at a simple equasion.

Py:
Code:
c=2*6 #Set the varable "c" to equal the sum of 2*6 
print "What is 2*6?" #Ask the question
a=input("")# Input number
if a==c: #check if were right
    print "correct!" #If correct then display
elif a!=c: # If it wasn't equal to "c"
    print "incorrect!" #If incorrect then display
GML:
Create event: run only once
Code:
//Set varables
c= 2*6//Set the varable "c" to equal the sum of 2*6 
a=0//Create a varable called "a"
Step event: for continus cycles
Code:
show_message(string("What is 2*6?")) //Ask the question
get_string("What is the answer?",a) // Input number
if a=c //check if were right
show_message("correct!") //If correct then display
else // If it wasn't equal to "c"
show_message("incorrect!") //If incorrect then display
Very similar, to believe I've known how to code in a GUI "version" of python for a couple of years now. Right off to make some apps!
dont forget to have a look at Pygame
it has full SDL 3d support

http://www.pygame.org/news.html
__________________
N900_Email_Options Wiki Page