Beautiful code
[ i'm still working on this concept, so this is a very rough draft... ]
writing beautiful code.
sometimes you code, and it seems as straightforward as:
"all nearby units - protect/serve - wilshire and santa monica". (high fives all around - but no touching! ).
and sometimes you code, a…
[ i'm still working on this concept, so this is a very rough draft... ]
writing beautiful code.
sometimes you code, and it seems as straightforward as:
"all nearby units - protect/serve - wilshire and santa monica". (high fives all around - but no touching! ).
and sometimes you code, a…
generic pattern maps
often times you need a pattern for something in a game.
for example: what texture tile to use with a given ground quad.
i used to create randomly generated pattern maps for different things:
plants, rocks, bushes, trees, ground quad textures, etc.
then it occurred to me that you cou…
often times you need a pattern for something in a game.
for example: what texture tile to use with a given ground quad.
i used to create randomly generated pattern maps for different things:
plants, rocks, bushes, trees, ground quad textures, etc.
then it occurred to me that you cou…
A design for an indexed render queue
drawing information is stored in a drawinfo struct. it could also be hashed into an int, etc.
the queue consists of an un-ordered list of drawinfo structs.
the queue is supplemented by a multi-dimensional indexing system that
allows processing of the queue in optima…
drawing information is stored in a drawinfo struct. it could also be hashed into an int, etc.
the queue consists of an un-ordered list of drawinfo structs.
the queue is supplemented by a multi-dimensional indexing system that
allows processing of the queue in optima…
An oo-ish version of my typical game architecture
all one code block, i was too lazy to split it up for posting ! .
all one code block, i was too lazy to split it up for posting ! .
non-oo: void main{init_prog run_proguninit_prog}globals: boolean: quit_progetc. oo: class program{globals such as quitproginit becodes constrctoruninit becomes destructorvoid run_pro…
background terrain chunk generation
the foreground task (the game) generates terrain chunks on the fly as
needed from underlying world map data, and stores them in a cache for
use by the renderer. chunks are stored first in inactive cache slots,
and then on a LRU basis once the cache is full.
the backgr…
the foreground task (the game) generates terrain chunks on the fly as
needed from underlying world map data, and stores them in a cache for
use by the renderer. chunks are stored first in inactive cache slots,
and then on a LRU basis once the cache is full.
the backgr…
Simple sliding collisions
simple sliding collisions:
for AABBs:
1. start by calculating how much to move the player as usual:
dx = player.speed * sin(player.yr)
dz = player.speed * cos(player.yr)
2. apply dx and dz, and check for collsions as usual.
3. if a collison is indicated:
3a. apply JUST dx and chec…
simple sliding collisions:
for AABBs:
1. start by calculating how much to move the player as usual:
dx = player.speed * sin(player.yr)
dz = player.speed * cos(player.yr)
2. apply dx and dz, and check for collsions as usual.
3. if a collison is indicated:
3a. apply JUST dx and chec…
Simple heuristic collision avoidance
Heuristic collison avoidance:
1. check for collision some distance in front of the player (say 15 feet).
2. if collsiosn is indicated:
2.a. check for collision ahead and to the left of player (15 feet ahead, and 15 feet left).
2.b. check for collision ahead and …
Heuristic collison avoidance:
1. check for collision some distance in front of the player (say 15 feet).
2. if collsiosn is indicated:
2.a. check for collision ahead and to the left of player (15 feet ahead, and 15 feet left).
2.b. check for collision ahead and …
a working definition of good code
A definition of "good" code (in no particular order):
1. correct - the code should work correctly.
2. brief - brevity is preferable. but not at the sake of readability.
3. simple - simpler code is preferable to more complex code.
4. bullet proof - the code should be abl…
A definition of "good" code (in no particular order):
1. correct - the code should work correctly.
2. brief - brevity is preferable. but not at the sake of readability.
3. simple - simpler code is preferable to more complex code.
4. bullet proof - the code should be abl…
More thoughts on fixed vs variable time steps
For some reason, this topic keeps popping into my mind. I suspect its because I wasn't convinced it was the best approach - even though i couldn't quite say why.
After my last round of thinking about it, i had come to the conclusion that the "fix-your-tim…
For some reason, this topic keeps popping into my mind. I suspect its because I wasn't convinced it was the best approach - even though i couldn't quite say why.
After my last round of thinking about it, i had come to the conclusion that the "fix-your-tim…
insights and tips on hi performance game programming.
an excellent lecture series of 5 videos on the development of a programming language specifically for hi performance games.
By Johnathan Blow, developer of Braid and The Witness.
when you listen to the guy talk, you can tell he's done his time in …
an excellent lecture series of 5 videos on the development of a programming language specifically for hi performance games.
By Johnathan Blow, developer of Braid and The Witness.
when you listen to the guy talk, you can tell he's done his time in …
Advertisement
Popular Blogs
Advertisement
Advertisement