Author Topic: How do you make games with coding???  (Read 11279 times)

0 Members and 1 Guest are viewing this topic.

Offline runeazn

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 191
  • Rating: +5/-3
    • View Profile
Re: How do you make games with coding???
« Reply #30 on: February 25, 2012, 02:11:33 pm »
little taste as completed one tutorial on python :) http://www.khanacademy.org/
the tutorial wasnt long though, i followed the tutorial on khan academy
, and now i am following the tutorial called "LearnPythonTheHardway" on http://learnpythonthehardway.org haha
any other good tutorials?
« Last Edit: February 25, 2012, 02:13:46 pm by runeazn »

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: How do you make games with coding???
« Reply #31 on: February 25, 2012, 02:24:30 pm »
I'm learning Python with this tutorial.

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: How do you make games with coding???
« Reply #32 on: February 25, 2012, 09:27:16 pm »
Not sure if it's been mentioned yet but IMO the best way to display graphics using Python is Pygame (pygame.org) and the best way to package and distribute is as a .EXE file is Py2exe (py2exe.org)
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline Link

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 152
  • Rating: +7/-3
  • Well excuse me princess!
    • View Profile
Re: How do you make games with coding???
« Reply #33 on: August 29, 2012, 02:29:40 pm »
Basically games are made up with a main loop. What happens is this:

1. Game starts
2. All the windows are set up and so on.
3. You enter the main game loop
4. The loop continually does the following:
   a. Get input, and process it
   b. All game logic (i.e. move sprites, updates positions, and checks collisions.)
   c. Update the screen
   d. Goto [a].
5. Thats it :)

Here is some Pseudo-code of the main loop.
Code: [Select]

while(running){
while(SDL_PollEvent(&Event)) // Get key-presses and process them
currentState->Event(&Event);
currentState->Loop(); // Check gamelogic
currentState->Render(); // Update screen
}

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: How do you make games with coding???
« Reply #34 on: August 29, 2012, 03:00:57 pm »
Basically games are made up with a main loop. What happens is this:

1. Game starts
2. All the windows are set up and so on.
3. You enter the main game loop
4. The loop continually does the following:
   a. Get input, and process it
   b. All game logic (i.e. move sprites, updates positions, and checks collisions.)
   c. Update the screen
   d. Goto [a].
5. Thats it :)

Here is some Pseudo-code of the main loop.
Code: [Select]

while(running){
while(SDL_PollEvent(&Event)) // Get key-presses and process them
currentState->Event(&Event);
currentState->Loop(); // Check gamelogic
currentState->Render(); // Update screen
}

What a necropost, nice!

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: How do you make games with coding???
« Reply #35 on: August 29, 2012, 05:36:58 pm »
and isnt that C/++ code...

But good summary of how making games works
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline Link

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 152
  • Rating: +7/-3
  • Well excuse me princess!
    • View Profile
Re: How do you make games with coding???
« Reply #36 on: August 29, 2012, 07:54:38 pm »
Thanks, and yes it's C++ code from my project, but for all purposes it's Pseudocode, as long it illustrates the concept.

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: Re: How do you make games with coding???
« Reply #37 on: August 30, 2012, 08:23:25 pm »
Something I've always found with games, is that you can split them into three main parts. Input, processing, output.

For something like having a picture collide with another, you'd do as what was said earlier and store the coordinate data and use them during processing. You'd store the picture in an object and you'd use a reference to that object, basically variables. What that object is depends on the library you use or a class you write yourself.


Edit: Using tapatalk, didn't realize this was an old thread :P My apologies.

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...