Jump to content

  • Log In with Google      Sign In   
  • Create Account

Luctus

Member Since 03 Mar 2002
Offline Last Active Dec 11 2013 03:37 AM

Posts I've Made

In Topic: What *is* game programming?

07 July 2012 - 12:43 PM

I would say that in a nutshell, game programming consists of doing simulations. If you can program a simulation of a ball bouncing, you can also program games.

A ball-bouncing simulation in it's most basic form consists first of all of a description of the current state of the system: The location and velocity of the ball and the position of any walls. Then at regular intervals, the state of the system is updated by moving the location of the ball a tiny bit according to its velocity and time elapsed since last update, taking any necessary collisions with walls into account by reversing the velocity of the ball along the normal of the wall. After that the walls and the ball at it's current location are drawn to the screen.

The repeated application of updating the state of the simulation and drawing will make the apperance of a ball bouncing around on the screen.

Now add in an additional step of sampling an input device and using that information for moving the walls in the simulation and you've essentially created a very basic pong game.

Any other game will at some abstract level also consist of those same concepts
  • A description of the state of the game
  • Sampling of input
  • Updating the state according to input and rules of the game
  • Rendering the state to screen and other output devices.
The only thing that differ pong from the latest multi-million dollar title is the scale and complexity of how those things are done and the specifics of what is stored in the state and what rules are being applied when updating.

In Topic: pyOpenGL

25 September 2010 - 07:37 AM

python setup.py install

In Topic: OMG C++ sucks !

21 September 2010 - 05:32 AM

Quote:
Original post by Zipster
But yes, if you think C# is usable, try Python. In another two years you might just be saying the same things about C# as you are about C++ :)
Then after that, try a functional language for two years. [wink]

Quote:

First off, I do not want a compiler between my program and the execution. Compilers are fine for many everyday things. General purpose business applications are fine running compiled code, but when it comes to real-time application development (primarily game development), a compiler is simply not acceptable. I do not want a compiler generating operations how it wants to; I'll manage my own registers, thank you very much. I'll take care of the low level optimizations. I don't want a compiler rewiring my instructions before they're run. I just don't want a compiler at all!
Heh, is this what it would have looked like thirty years ago? [smile]

Quote:
Original post by ApochPiQ
Of course one of the big steps to gaining major acceptance will be to target an existing hardware architecture directly, probably through cross-compilation to something that already has a good machine code optimizer.
LLVM?

In Topic: Ask about Draw Picture In OpenGL

19 September 2010 - 03:30 AM

Change the projection matrix to a 2D setup while drawing your UI layer:

int viewportWidth = ...; // Set this to width of window
int viewportHeight = ...; // Set this to height of window
float projectionMatrix[] = {2.0/viewportWidth, 0, 0, -1,
0 -2.0/viewportHeight, 0, 1,
0 0 1 0,
0 0 0 1};

/* Setup 2D drawing */
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadMatrixf(projectionMatrix);

/* Draw 2D parts */

// A 200x200 pixel rectangle drawn at 100, 100 pixels from the top-left corner of the window.
glBegin(GL_QUADS);
glVertex2i(100,100);
glVertex2i(100,300);
glVertex2i(300,300);
glVertex2i(300,100);
glEnd();

/* Restore to previous coordinate system */
glPopMatrix();


In Topic: FOSS Game Engine Replacement Legality

16 September 2010 - 05:48 AM

ScummVM is another example of such an opensource engine. Of course, none of these examples actually prove the legality of such projects.

Since you would reverse engineer any code and not distribute any original game assets, copyright might not be a problem. Other things such things as patents conceivably could be though. E.g. if the any of the data used in the game needs to be decoded by algorithms that are patented, you would [at least] need to acquire the rights to those in order to be able to legally create an engine for that game.

And of course, IANAL.

PARTNERS