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!


Norman Barrows

Member Since 04 Apr 2012
Offline Last Active Yesterday, 01:29 PM

Topics I've Started

for amber waves of grain

03 April 2015 - 10:02 AM

swaying vegetation - been there done that. sinusoidal based motion. function of wind speed and direction. phase offset based perhaps on a function of world x,z (for global wind sources) etc. etc.

 

now...

 

what about a field of vegetation waving in the breeze, like waves on the ocean?

 

what's a good algo for that?

 

and what about gusty winds? just toss in a little random gusty motion? it _should_ be an area of gusty wind that moves across the game world like in the real world....  coming and going, etc.

 

all this seems to point to modeling swaying vegetation at the individual level, driven by some higher level code that models swaying vegetation/wind effects over large areas.

 

in general, i'm talking about natural wind sources here , not a "wind emitter:" like a helicopter in a game engine.

 

cursory searches here and on google turn up the usual suspects with regard to swaying individual plants, but nothing on area effects of wind on swaying vegetation.

 

as i continue work on Caveman, which is quickly evolving from a RPG into a paleo-world simulation, i'm discovering that good animations are key to bringing the world to life.  to that end, i'd like to try to take my vegetation animations to the next level in this new version of the game, by adding "waves of grain" to simple wind based animation of swaying vegetation.  I suspect the effect would be most dramatic in the game, given the large view distances (i'm now testing at >300 meters at highest LOD), use of high lod at all ranges with no impostors, and the extremely dense vegetation (often > 10K instances visible onscreen at once).

 

how to do that, and how to animate a rigged model in truespace (yes, i'm going to try for skinned meshes!) are about the only two things on the project i haven't figured out yet.

 

 

 

 


preventing system crash or power outage from wiping savegame: best methods

23 March 2015 - 11:16 AM

if there is a system crash or a power outage before windows finishes writing a save game file, the file becomes corrupted.

 

what's the best method of creating backups to prevent this?

 

some i've thought of:

 

method A

1. if backup exists, erase it

2. if save file exists, rename to backup.

3. save the game

 

method B

1. save to temp file

2. if backup exists, erase it

3. if save file exists, rename to backup

4. rename temp to savegame name

 

what types of OS requests will force the OS to flush the file first?

 

if i save, then rename, will that force it to flush before renaming? or if i save, then copy, surely that force a flush...

 

actually i have to get down to the i/o instruction level don't i? the hard drive will do its own thing irregardless of what windows does. 

 

is there any hope?

 

at the moment i'm dealing with the explored/unexplored bitmasks for the local map in a fps/rpg. 10 maps are cached in ram. when the player saves as their laptop battery is dieing, the maps get wiped. each game has up to 250,000 of these maps. savegames use a new filename each time (save1, save2, save3, etc),, so no chance of wiping an exiting file. but local maps use the same file and overwrite it. since there can be as many as 250,000 per game, new filenames for each save isn't really an option.


OO where do entity type definitions go?

23 January 2015 - 07:18 PM

in OO-ish code organization (non-CES), where do entity type definitions go?

 

IE i have say 3 types of entities: orcs, elves, and goblins.  all entities of the same type have the same base hit points, armor class, drawing info etc.

 

where should these constants / data driven variables be stored?

 

would i have a base class called entity, and derived classes for elf, orc, and goblin? the base class would declare the variables, and the derived class contructors would initialize them? but then each instance of an entity type has duplicate type info. 

 

inheritance - B is an A with extra variables and/or methods - doesn't do it.

 

polymorphism - B is an A with some/all methods redefined -  doesn't do it.

 

relational databases does it...   that's how i've been doing with non-OO code.

 

do the same thing (relational databases), but with OO code?

 

 


control avatar height off ground in animation or with code?

23 January 2015 - 06:53 PM

is it better to control an avatar's height off the ground in an animation or with code?

 

i currently do it with code, changing the y render height based on the animation playing. 

 

i'm using rigid body models. an avatar's torso mesh is the root parent of all other limbs in an avatar model. so i can just change the y location of the torso mesh with respect to the object space origin. this will change the y location of the avatar with respect to the location the code draws it at. and one set of code that draws at the "usual" height would work for all animations. and best of all, i wouldn't have to tweak the drawing height of animations in the code, then look at it in the game. i could set it one time in the modeler (and then get a beer! <g> job done! miller time! <g>).

 

sure seems like doing it in the animation is the way to go. is there any problem with doing it that way, or is that the preferred way?

 

if i wanted to do the same animation at different heights, code would be better than a bunch of basically duplicate animations. but i can't think of anything one would draw at two different heights. you're lying down, kneeling, sitting on the ground, sitting on a surface (chair etc), or standing, but seldom (never?) more than one while playing the same animation. note that i'm not talking about things like jumping or flying animations whose height is usually best handled with code. sitting on a steed might also be best handled with code, with height based on distance to steed's object center.

 

 


what can cause spikey input ET's?

23 January 2015 - 06:31 PM

what can cause spikey input ET's?

 

i recently timed the render, input and update for caveman, as was surprised to find a fair amount of variation in the time for input, even with no user input. all the code does is process windows messages for mouse input and poll async key states. even when not moving the mouse or pressing any keys, times could vary from 50 to over 1000 ticks. i didn't have mins and maxes setup, so it don't know what the actual low and high values were, these are about what they appeared to be as the times flashed by on the screen.

 

 


PARTNERS