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.

Sunday, November 29, 2009

Small snippets of time are sometimes the most productive

Well, I managed to get some time to work on the GUI system in TileMax and now have buttons working with an event system... I'll tie those into the BMax event system soon.  For info, they support fully animated states and are fully rotatable and movable in real-time.  Now I'm going to add the animation components to the mounts themselves so the GUI elements can move into the screen in any way shape or form that the designer wishes.  Its pretty cool actually... I'll have to put a demo together after this next bit of coding :)

Sunday, November 15, 2009

A Day of Progress

Well, with the family down sick I've had some time to code while the kids lay resting, watching TV, or playing on their computer... which was great because I hit a major milestone with the GUI in TileMax.  I had to integrate it into TileMax so I could take advantage of the animation control system within TileMax (which is turning out to be pretty sweet)

I now have a working GUI that is fully rotatable, scalable, and dynamically adjustable.  Any images, anims, or polygons attached to mounts that are identified as hotspots automatically populate a hotspot list (that is populated in reverse order to rendering).

I'll add a state and transition system into it now (animated movement) and I'll be rocking.  Then its just a matter of making the various controls that I need.  Spun input boxes should be fun... NOT!

Friday, November 13, 2009

Seek and Find my way through the rest

It seems to me that my biggest obstacle is obtaining media for my projects.  I have tonnes of TileSets and Character Sheets that I have downloaded from the internet to use as placeholders, but the sheer lack of original artwork is forcing me to reconsider what I am producing with it.  My original plan was to make a platformer style game for kids, but I'm now working towards a seek and find.

The reason is that I can crop a good image and have a decent camera... a seek and find is a few days of snapping and cropping.  Ok, maybe a few more than that.  But the point is that its achievable whereas drawing original artwork is not unless I want the game to look like it was made by a child LOL.  The nice thing about that is, I should have pretty much everything I need once this GUI is done, save the sound system... AXEGUI itself will be the interaction layer with the objects, since it already possesses some interesting capabilities as far as a seek and find goes.    More to come...

Wednesday, November 11, 2009

Refocus is good

The funny thing is that I haven't gotten much time lately to work on the project, but just because I couldn't sit at the computer didn't mean that my brain shut down lol.  I've certainly done a lot of thought with TileMax's direction and almost missed something insanely vital... or convenient.

Had I trotted off in the direction I was heading I would certainly coded myself into some disappointment.  I really really want to incorporate a physics engine into TileMax, to do that you have to go polygon for everything, but the problem with that is then you need to outline all your collision spaces with polygons rather than just using the already drawn images within the tiles.  But right now, by using this feeler system of collision I effectively create a polygon outline of an actor... now it's currently not organized that way but with a small bit of code rework it will be.  Anyway, those "feelers" already collide with tiles (when a collision layer is present) and can implement any kind of reaction upon the player.  There is nothing then stopping me from adding that polygon to a physics engine... gluing it together will be the fun part.  

The one bit of code I have been touching and feeling on occation is the new GUI part... I'm calling it AXEGUI and I don't even recall why.  I needed a GUI that can move panels around (animated) like having robot arms come out with the settings panel or the like.  I have the parenting, rotation, and image attachment parts working. Once I get the PointInPoly stuff going, I should be able to create the first clickable "buttons"... It works by defining a Mount, which is like a 2D pivot... everything extends a mount and is fully rotatable, can be extended/retracted, and is scalable.

Anyway.. enough for now, I actually get an hour or so to code tonight! 8)

Wednesday, September 30, 2009

Overload!!!

Trying to focus on game development for the last couple weeks has been difficult.  School started back up for the kidlets, wife back to school, dog needs a bath and theres a hole in my shoe... lol


Its definitely been slow for development, but at least I sorted out a shortcoming in my tileset importer... some tilesets come with borders and some with a spaced edge... so I had to adjust my tileset handling code to allow for those situations... including a transform button to remove the lines and edge


The path stuff took a back-burner but I've basically got an advanced, but unproven, A* pathfinding system done.  That probably means some run-testing and adjustments bit I'm feeling confident about it but its not yet essential.  What is are paths... so I coded a path system:  paths using path nodes and a path traveler class.  Untested as of yet :)


I had another thought about the vectorized character maker idea I had... I don't even think it would take that long to make... hmmm.  Yet another distraction... I should sketch it for later lol


I'm not really sure where I got the time to do what little I did... its been slow with other responsibilities.  Oh well, life goes on, and I'll just keep pecking away at the project.


Cheers

Tuesday, September 22, 2009

Paths and Pathfinding

So next on the chopping block are paths and path finding... what a lot of fun that is :)

I went hunting around for path finding stuff and of course landed on A* since it's still touted as one of the best... however, according to the definitions for A* I won't be using A*.  Why?  Well, I have to account for both RPG style and Platformer style movement and the raw A* algorithm fails miserably with platformers because it doesn't take the movement limitations of the characters into account.  So, I've taken the basic A* algorithm and enhanced it to use the movement limitations of the character itself when locating a path..  So far so good.  I also added in some order specific stuff in the recursive search so that it will attempt to get their by the shortest path first and then start expanding out when that route fails...  in other words, it will first attempt movement in the + x direction when  the destination x is greater... not rocket science but add that to recursive behavior and it can get tricky.   Nuff for now...

Sunday, September 6, 2009

Exciting

Its funny what drives us to attack the next obstacles in our programs.  For me, its usually driven by what I want to see it do; however, when my daughters decided that they both wanted to play test TileMax and started fighting over 'who is next' I decided that adding a split view was the next big requirement... I am making this for them after all.

So, in only an hour or so I managed to add a RenderWindow class that controlled the window focus and allowed two specifically different views of the same map to render... a couple control tweaks (aka adding controls for a second player) and viola!

Now, I just have to speed things up by adding the actors to a display list so I don't have to iterate through them all each time... just those on the actual screen... probably an hour of coding if that... but thats for the next window of coding time I get.   The holiday tomorrow (in Canada) will have me walking around an expensive and uninspiring portable "fair" with the kids.. oh well... its time well spent.

Thursday, September 3, 2009

TileMax

Well, aren't I a happy camper.  I finally have a character that can run and jump around my map.  As a matter of fact, so far I have added about 320 characters jumping on it with no apparent slowdown.  This is good news.  They all reference the gravity and friction of the specific tile they occupy so this should create some fun map building.  I'm still tweaking the movement behavior since there is a couple of anomalies with how I have implemented the collision system.  Rather than going for a pixel perfect collision system I opted for "feelers" that I call appendages.  This allows much faster collision checking and it also allows the character to grow to whatever size I want without compromising speed.  

I've also added animations for the characters that are named.. so for example here is control code for a right keypress...

If KeyDown(KEY_RIGHT)
If player.touching
player.MoveRight()
player.StartAnim("walk right",False,True)
player.CurrentAnim.Play(Abs(player.vx)*.15)
EndIf
EndIf

and here's how you create the anims..

Local e:Actor=Actor.CreateActor(m,tx,ty)
Local an:Anim=e.CreateAnim("walk left",walksprite,240,296,0.01)
an.AddFrames(0,5,0,4)
an.scaleX=-0.15
an.scaleY=0.15
an=player.CreateAnim("walk right",walksprite,240,296,0.01)
an.AddFrames(0,5,0,4)
an.scaleX=0.15
an.scaleY=0.15

Over and out for now...

Wednesday, September 2, 2009

The beginnings

Hi there, welcome to my little corner of the webniverse.

I'm Warren Skaalrud, proud father of three children and a beautiful wife, all young in age while I am not :) I have two girls and one son... yes... I'm done :) I love them all but 3 is perfect!

As you can see by my site name I go by Skully. This name comes from the CB days and has been around for over 50 years. I think I'm Skully6 really, but I dispise putting numbers after my name which is why I often have to go by Skullyman instead.

I'm a network specialist by trade, following a 14 year career as an electronics technician in the Canadian military. I've worked at all layers of the network and am now managing others doing what I used to do.

My hobby and passion is computer games programming and my language of choice is BlitzMax. I'm currently working on a 2D platformer engine so I can make a semi-educational game for my kids. After that I have something a whole lot less innocent planned but one thing at a time...

When I'm not looking after my family, or working, or programming my game, I'm doing handyman chores or helping my father-in-law's business installing floors... you know, carpet, linolium, laminate... How do I manage my time? God I don't really know.. I just take it one day at a time and try to get the balance right. My wife will tell you that I don't always get it right... but she sets me straight when I steer off course :) She's my sanity.

Well, thats my intro for now... I want to see how this shows up on my blog :)