Thursday, June 08, 2006

SO-CAL


I've been fiddling around a bit, and I've made me this little program to display cell-automata and process the rules. This program can simulate any 2-dimensional set of rules, although as the number of possible states for a single cell increases, the memory requirements of the program will increase dramatically.

Actually, I have spent more time debugging my life automata and the rules for the different simulations, than I have spent writing openGL code. :-)

A propos performance: if I draw a 500x500 field, I'm pushing 250000 triangles, times (1 RGB color + 3 vertices), times (3 integers) = equalling 3000000 integers. My GeForce 4ti can do this around 4 times per second :-) I think if I add lighting or textures, the framerate will drop considerably.

I feel confident this program showed me what I wanted to know: that I have a basic, working knowledge of OpenGL. All the dirty OpenGL tricks I don't know about, I'll just have to look them up on OpenGL forums when I feel I might need them.

The biggest problem is not so much how to do texture or light, or push triangles. The difficult part is to bring a structure to my source files, so I won't get lost in my own source if I leave it alone for 2 days. I still haven't found a satisfying general structure for my source, but I feel it will be a solution tailored to whatever problem at hand.

Apart from that, if I want to make a game, I'll have to tackle one more major issue: networking code! Woohoo! I've read a summary on how Carmack deals with the unreliable datagram problem inside Quake3, and his approach is surprisingly elegant and blunt at the same time: send your data, every timeframe, until a frame has been confirmed you know contained the data you're trying to send. Talk about flooding.

Along with the network challenge comes a second one: timing. As soon as the game is no longer single player, the two computers will have to agree on some kind of common timeframe. How to handle "collisions" in client-server applications, and how to handle them in peer-to-peer networks?

In summary, next on my todo-list: write a simple networked action game (I'm thinking 2-player asteroids)

And then: get cracking on that killer game that'll make me rich ! Mwuhahaha!

0 Comments:

Post a Comment

<< Home