Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Gamedev info



Beautiful code

Posted by Norman Barrows, 26 January 2015 · 0 views

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! <g>).

and sometimes you code, and its like "well, i know i'll need t...


Generic pattern maps

Posted by Norman Barrows, 26 January 2015 · 0 views

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 could use a generic random pattern map,
and write fun...


A design for an indexed render queue

Posted by Norman Barrows, 26 January 2015 · 0 views

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 optimal draw order.

the index system consists of a lis...


An oo-ish version of my typical game architecture

Posted by Norman Barrows, 26 January 2015 · 0 views

An oo-ish version of my typical game architecture


all one code block, i was too lazy to split it up for posting ! <g>.

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_prog method}; non-oo: runprog{while ! quitp...


Background terrain chunk generation

Posted by Norman Barrows, 26 January 2015 · 0 views

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 background chunk generator looks ahead around the player...


Simple sliding collisions

Posted by Norman Barrows, 26 January 2015 · 0 views

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 check for collisions.

3b. apply JUST dz and ch...


Simple heuristic collision avoidance

Posted by Norman Barrows, 26 January 2015 · 0 views

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 to the right of player (15 feet ahead, and...


a working definition of good code

Posted by Norman Barrows, 26 January 2015 · 0 views

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 able to handle any input params without crashing,...


More thoughts on fixed vs variable timesteps

Posted by Norman Barrows, 04 January 2015 · 0 views

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-timestep" algo (f.y.t. for short) was actually a very cle...


insights and tips on hi performance game programming

Posted by Norman Barrows, 28 December 2014 · 331 views

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 the trenches.

whether you think we need our own lan...






April 2015 »

S M T W T F S
   1234
567891011
121314151617 18
19202122232425
2627282930  
PARTNERS