I've decided to finsih up this project and release a finalized demo. Shouldn't take to much longer. I plan to release this tommorow.
Added some new stuff:
Sounds! grass squashy sounds is now implemented in the core, can be toggled on/off.
Better grass management, no longer is 300,000 grass entites required to fill the map, can get it done with 30k entites now. ( fast fast ! )
SaveGpMap() LoadGpMap() - once you get a grass map just how you like it, use this command to save your results an load them back in to greatly reduce loading times.
Grass memory, the core now tracks each grass entites state, if a grass entity is flattned and later becomes 'out of view' then 'back in view' again - the core recalls its state and restores it identically. This can be used for things like custom path carving etc.. Many many uses with this feature.
Completely reorangized the core routine to allow for even greater preformance on stressed out maps.
I've done everything possible to keep this system very very simple to use, which is my company slogan btw "Simple is Better!" :) . Ive trimmed down the function list to the following:
;---------------------------------------------------
;gp_InitGrassEngine(x1#, z1#, x2#, z2#, grids, emitter) ;-- this must be called to start the engine, given values are: x1 - lower left 3d posiiton of your map, z1 - lower left 3d positin of your map, x2 - upper right 3d posiiton of your map, z2 - upper right 3d position of your map, grids - tells the engine how may grid points you wish to use, must be an EVEN number( 20,26,32 etc) (lower amt means less points and more pressure on the engine, but faster, large maps should consider a starting point of about 100 grid points, play with value to see how it works with your map) ( emitter is optionla, send your 3dsound emitter ID to hear grass sounds in the engine )
;gp_LoadGrass(x#, y#, z#, meshname$, skinname$) ;-- loads a grass entity and returns a blitzID for it
;gp_GrassUpdate(Entity) ;-- this is called once per loop, pass it the entity you wish the grass system to interact with ( can be a camera or blitz mesh )
;gp_GrassYaw(gpGrass) ;-- this will angle a grass entity on the specified Yaw amount, yaw is saved to the grid ( use this to turn a grass entity for random look )
;gp_GrassScale(gpGrassID, scale#) ;-- set scale for a grass ID
;gp_GrassColor(gpGrassID, r ,g , b) ;-- set color for a grass ID
;gp_GrassAlpha(gpGrassID, alpha#) ;-- override the global alpha setting and set the entities customized alpha with this function
;gp_GrassAddWindGust(GrassID, amt#) ;-- increases the grass entites speed and force to wind influence, slowly degrades ovetime (use this from objects moving through grass)
;gp_GrassCollisionCheck(ent, dist#, type, amt#=0) ;-- Ent is the entity to check against the grass, returns number of grass entites collided ; returns all grass ID's in a list ( gp_Collided ) ; dist# is the distance from the entity to grass a collision occurs. Type = the type of collision reaction (1=wave, 2=flatten, 3=wave+flat). AMT# - Optionally you may send additional wind gust to the entity if collision was found.
;gp_SaveGpMap(filename$) ;-- saves the current state of a map to a filename ( can include a path if you wish )
;gp_LoadGpMap(filename$) ;-- loads a saved map state from the filename ( can include a path if you like )
;---------------------------------------------------
No 'clear-all' function in that list yet, but it'll be in the final.
Going to be testing this tonight and tweaking a few of the functions, but if all goes as planned expect a release tommorow and a new finalized demo.
Added some new stuff:
Sounds! grass squashy sounds is now implemented in the core, can be toggled on/off.
Better grass management, no longer is 300,000 grass entites required to fill the map, can get it done with 30k entites now. ( fast fast ! )
SaveGpMap() LoadGpMap() - once you get a grass map just how you like it, use this command to save your results an load them back in to greatly reduce loading times.
Grass memory, the core now tracks each grass entites state, if a grass entity is flattned and later becomes 'out of view' then 'back in view' again - the core recalls its state and restores it identically. This can be used for things like custom path carving etc.. Many many uses with this feature.
Completely reorangized the core routine to allow for even greater preformance on stressed out maps.
I've done everything possible to keep this system very very simple to use, which is my company slogan btw "Simple is Better!" :) . Ive trimmed down the function list to the following:
;---------------------------------------------------
;gp_InitGrassEngine(x1#, z1#, x2#, z2#, grids, emitter) ;-- this must be called to start the engine, given values are: x1 - lower left 3d posiiton of your map, z1 - lower left 3d positin of your map, x2 - upper right 3d posiiton of your map, z2 - upper right 3d position of your map, grids - tells the engine how may grid points you wish to use, must be an EVEN number( 20,26,32 etc) (lower amt means less points and more pressure on the engine, but faster, large maps should consider a starting point of about 100 grid points, play with value to see how it works with your map) ( emitter is optionla, send your 3dsound emitter ID to hear grass sounds in the engine )
;gp_LoadGrass(x#, y#, z#, meshname$, skinname$) ;-- loads a grass entity and returns a blitzID for it
;gp_GrassUpdate(Entity) ;-- this is called once per loop, pass it the entity you wish the grass system to interact with ( can be a camera or blitz mesh )
;gp_GrassYaw(gpGrass) ;-- this will angle a grass entity on the specified Yaw amount, yaw is saved to the grid ( use this to turn a grass entity for random look )
;gp_GrassScale(gpGrassID, scale#) ;-- set scale for a grass ID
;gp_GrassColor(gpGrassID, r ,g , b) ;-- set color for a grass ID
;gp_GrassAlpha(gpGrassID, alpha#) ;-- override the global alpha setting and set the entities customized alpha with this function
;gp_GrassAddWindGust(GrassID, amt#) ;-- increases the grass entites speed and force to wind influence, slowly degrades ovetime (use this from objects moving through grass)
;gp_GrassCollisionCheck(ent, dist#, type, amt#=0) ;-- Ent is the entity to check against the grass, returns number of grass entites collided ; returns all grass ID's in a list ( gp_Collided ) ; dist# is the distance from the entity to grass a collision occurs. Type = the type of collision reaction (1=wave, 2=flatten, 3=wave+flat). AMT# - Optionally you may send additional wind gust to the entity if collision was found.
;gp_SaveGpMap(filename$) ;-- saves the current state of a map to a filename ( can include a path if you wish )
;gp_LoadGpMap(filename$) ;-- loads a saved map state from the filename ( can include a path if you like )
;---------------------------------------------------
No 'clear-all' function in that list yet, but it'll be in the final.
Going to be testing this tonight and tweaking a few of the functions, but if all goes as planned expect a release tommorow and a new finalized demo.