Sunday, December 27, 2009

Excited!

I'm getting excited and thats something I need to keep at bay for the time being.  Playing with the new particle system is fun, but distracting me from my goal to have this whole package wrapped up and documented for others to use as well.  Being able to enable others to make games has been part of the goal as well, and to keep it inexpensive enough be be reachable for most but also to give me some fun money for game resources 8)  right now I have NO budget!

Anyway, I now have all the pieces necessary to make a game, but I don't want to get overly excited and start delving into making a game out of it until its performing to my satisfaction.  Several areas need additional functionality and some optimization.  The foundations are there, but need improvement... such as the GUI system which just consists of fully functioning button types but no extended types yet - just the basics.  The TileSystem is working very well, that I am extremely happy with!  Actor management and the polygon collision system is working wonderfully as well.  The sound system is weak, but workable for now.  I do want to add other sound options from packages like FMOD but perhaps later on down the road.  FMOD has licensing costs ergo there is no immediate need to add support for it.  What else?  The scene control system and save/load need to have all the new items supported.  Right now all you get is your saved map... no actors, no spawn points, nothing of that nature.  I realize that is more towards the "Game Creation System" side of TileMax instead of just the BlitzMax mod side, but in my mind necessary for both.

Company coming... more later.

Thursday, December 24, 2009

A Change of plans

Well, I got TMParticleFX working but I was having a functional grievance with the emitters.  While it seemed like a good idea in the design phase, the practicality of it was not so good.   So, I changed course and created launchers instead and that solved all my problems.  Launchers attach to anything else, particularly particles and allow much more flexibility than the original emitters idea.  Launchers carry a Magazine of particle templates which get fired off in turn.  They also have a burst mode that really benefit explosive moments!  The launchers allow for a rotatable offset from the attached point and there can be many launchers attached to one thing.  So, for example, if you had a spaceship with two engines, you would have two launchers offset to the back of the engines that create the jet stream and trailing smoke if you wish.

The naming difference between launcher and emitter is somewhat semantical in truth, but I shifted names to help me ensure I covered all the bases.

Its all looking pretty snazy now.. and working like a charm.  I can't at this point think of any special effect I would not be able to achieve.

But.... Christmas is here and my children would probably appreciate me being more family focused over the next few days.  Thats no problem... it will give me time to solidify some optimization ideas I have.  One optimization I believe will speed up TileMax entirely as it should reduce calculations down by an order of magnitude.. not that its slow... but there is always room for "faster" :)

Have a Merry Christmas and a Happy New year.. I know I will!

Tuesday, December 22, 2009

Loving it!

This working an hour a day at work thing is really working out.  I bring my laptop in and set it up at lunch time to do some coding!

Well, I've managed to completely code the TMParticleFX system and got it working to the point where I am now playing with special effects :)  By far particle effects are the most fun to code.

The system I've got working, is working exactly as designed.  Particle Parameters are controlled by "ghost" values that can be made into Sequencers.  The Sequencers work by passing from a start value to an end value in a given amount of time.  For example,

TMSequencer=TMSequencer.Create(0,1,5) would create a value that would increase from 0 to 1 over a period of 5 seconds and then stopped there ( ModeOnce).  There are options as well, they can be set to "ModeBounce" to go back and forth 0 to 1 to 0... , ModeRoll which is 0 to 1 to 0... and even more, they can be chained together by adding nodes... as many as you wish.. so long as they all total up to the set life of the particle (in seconds as well)

All the particle system does is keep a list of active sequencers, updates those, and then when the particle is updating, it uses for example...
If Self.dVel then Self.Vel=dVel.Value()  ' quite efficient really.

Also, Particles have been extended to Emitters... the emitters keep a loaded array of particle definitions, and even emitter definitions.. the spread, rate, angle, and velocity of the emitted particles are sequence controlled as well... As is the array positions

The possibilities are endless and so far is works sweet!  Now just to reign in the chaos that level of control creates and make some really pretty special effects :)   I already have a missile launching to the middle of the screen, exploding into 32 animated particles, and then those again explode and scale large while fading to 0 alpha.

Tomorrow is another day...

Wednesday, December 16, 2009

Optimize TileMax but more importantly my time!

I've been really busy lately... busy working on TileMax and I'm really super happy with how things are progressing.  My compartmentalizing of TileMax has continued making reusable code chunks that sit independently from the Tile Engine... I separated out graphics management, complex math code, condensed some more timing related code such as the FPS manager, and these really cool new multi-node sequencers... those are so cool!  To summarize, they attach to any float and control a start to finish value based on % per ms and have 3 modes... Pass through, Bounce, and Roll.... Pass through is used to go from one node to the next, Bounce goes from 0 to 100% and reverses back and forth... unless there is a chain of nodes in which case it progresses back through the chain leading up to it... Roll.. well that goes from 0 to 100% and back to 0... or back to the start of the chain if there are several nodes.

TileMax now looks like this:

Import "TMAnim.bmx" ' Animations Control
Import "TMTileEngine.bmx" ' Tile Map System
Import "TMPoly.bmx" ' Polygon Transforms and Collisions
Import "TMGUI.bmx" ' Graphical User interface & Hud
Import "TMTiming.bmx" ' Delta time controls
Import "TMMath.bmx" ' Math repository
Import "TMGraphics.bmx" ' Extra Graphics commands
Import "TMScene.bmx" ' Contains controls for switching screens
Import "TMSound.bmx" ' Music and Sound FX
Import "TMParticleFX.bmx" ' Particle Effects and Emitters
Import "TMInput.bmx" ' Input Controls
Import "TMLanguage.bmx" ' For Creation and use of language files
Import "TMFonts.bmx" ' For displaying fast text

The other thing I've done is discovered a gold mine of time! My work day is busy... and during lunch hours I was just sitting back and wasting an hour away doing either nothing, watching the news, or more recently, working on a new TileMax logo... but, I had to bring my personal laptop into work today and realized that I really like locking my office at noon and pulling out my laptop to have a go at TileMax... today I accomplished ALOT!  So every weekday now I am garanteed an hour for TileMax... SWEET!

More to come... baby need me

Sunday, December 13, 2009

Compartmentalization and a Particle System

I got some time to code this weekend... had nothing else to do and my family is busy with a sleep-over which strangely enough appears to free up my time at this age :)

COMPARTMENTALIZATION
I've torn TileMax apart!  Quite literally.  I was finding it getting difficult to know what I was going to effect my making a change... I recall someone (who shall remain namelessly Brucey ;) who always says "Think about the design"...  so I did!  I took the time to separate all the sub-systems into separate files... I now have:

Import "TMConvenience.bmx" ' Convenience Functions
Import "TMAnim.bmx" ' Animations Control
Import "TMTileEngine.bmx" ' Tile Map System
Import "TMPoly.bmx" ' Polygon Transforms and Collisions
Import "TMGUI.bmx" ' Graphical User interface & Hud
Import "TMTiming.bmx" ' Delta time controls
Import "TMScene.bmx" ' Contains controls for switching screens
Import "TMSound.bmx" ' Music and Sound FX
Import "TMParticleFX.bmx" ' Particle Effects and Emitters
Import "TMInput.bmx" ' Input Controls
Import "TMLanguage.bmx" ' For Creation and use of language files
Import "TMFonts.bmx" ' For displaying fast text

Keep in mind some of those near the bottom are complete minimal implementations and not at all finished products.  After that I started on...


PARTICLES
So I've looked at several options for a particle system, one obvious one is TimeLineFX, but I hate licensing issues so thats out.  I found several "basic" particle systems but thats just too basic for me.  So what did that leave me with... Make my own of course!

So what I have now is an interesting system... Each particle can have all its velocity, alpha, etc managed by this sequencer system... The sequencer system has a start value and end value which is traversed by a speed value that is in percent per ms.  The sequencer has several modes... Once, Bounce, Roll, or sequence... which means it has sub-nodes for fancy stuff.

Obviously, those particles has to be created somewhere, so there are Emitters (extension of a particle) that can have its angle, spread, etc managed as well by sequencers.  Particle or Emitter death's can spawn an array of Emitters or particles as well.

So I can't really think of much more a particle would want to do.. I could extend them from the GameObject type and allow them to be effected by the force effects in the TileMap... I'll have to think about this one as it involves adding overhead to the movement which from a particle standpoint is no good!


Thursday, December 3, 2009

Split time...

I've been looking TileMax over and have decided to split my coding time.  So 1/2 the time I'll advance the code, and 1/2 the time I'll go back and do some code cleanup, standardization, and some additional documentation.  

The system is already set up to be a BlitzMax mod so it only makes sense to properly document the command structure within the code and then extract that into a manual later on.  Its come along way, and I don't want things to start falling apart on me because I didn't properly set it up.

So far, the following Top level Objects are currently available in the Game Creation System, and I've added this information to the temporary google website I set up.
  • TMObject - A base class for all items in the game that have any kind of interaction
  • TileMax - Contains all the high level operations for the game such as Graphics control and Projection matrix code
  • Level - Contains an entire level and load & save operations etc.
  • MapTile - Contains an individual tile on a TileMap
  • TileLayer - Contains an individual layer of a tile
  • Actor - These are the game actors like players, enemies etc.
  • Anim - Controls Animation Sequences.  Allows animations to be created in non-sequential imagemaps
  • GUI - The GUI system supports full animation and parenting to mounts that can move, rotate, and scale in real time
  • Vector - groups vector based operations
  • Connection - Creates interaction connections between game objects like Keep Away, Follow etc.
  • Path - Contains path nodes, travelers, and a modified A* path finding system
  • Poly - Contains polygon based operations such as polygon objects, collisions, etc
  • RenderWindow -  allows for multiple views of the same game... usually used for more than one player on a given map
  • Brush - Contains a group of Maptiles used to Stamp the main map, these can overwrite or merge with the map
  • TileSet - Contains a single TileSet and operations to modify them & make Anim strips.