Wednesday, December 2, 2009

Simple Optimization Functions.

Here are some functions I came up with for various purposes, I'm sure there are more efficient versions out there. If you have any ideas on how to optimize these functions more please comment. If anyone has the time to test these out against their Math.function versions, please let me know the results. Thanks ahead of time.

Faster Rounding (Needs to be tested):
function round (ax:Number):int
{
if (ax>=0){
return int(ax+.5)
} else {
return int(ax-.5)
}
}

Faster Ceiling (Needs to be tested):
function ceil (ax:Number):int
{
if (ax>0){
return int(ax+1)
} else {
return int(ax)
}
}

Faster Flooring (Needs to be tested):
function floor (ax:Number):int
{
if (ax>=0){
return int(ax)
} else {
return int(ax-1)
}
}


Faster Absolute Value (Needs to be tested):
function abs (ax:Number):Number{
if (ax>=0){
return ax
} else {
return -ax
}
}


Working on the new engine.


One of my favorite parts of creating games is designing the engine. Every game I make has a completely new game engine, and every one turns out to be better than the last. An engine defines what the game is capable of. The more time I spend programming a game, the more I end up wanting to stretch those limitations. Thats why I couldn't reuse the old Enigmata engine, because there is so much more I want to do with Genu's Revenge. And even now that I am half way done with the sequel, I'm thinking up ideas for an even more powerful engine.

One of the cool things about this new engine is that the enemies can have the same skills that you have. If you can shield, so can enemies. If you can use a Mega Blast or Nithilum Push, some enemies will have that skill too. This makes enemies much more challenging that in the original.

Also the game is much more customizable now, with the ability to place skills where you want them. In Genu's Revenge you can place skills on the numbers 1 through 9. You then activate the skills while in battle by pressing those numbers, either the regular numbers or in the Num Pad. Its not mentioned in the game, but those skills 1-9 correspond to the keys Z,X,C,V,B,N,M, etc. So essentially you can recreate the Enigmata 1 controls.

Currently the game runs much faster than its predecessor, this is mainly due to the fact I learned a lot of optimization techniques. Also I used cacheAsBitmap much more efficiently in this version. Hopefully more people will be able to play the game without lag. This is one of my main achievements in this game.

Details on new controls.

As I said before, the new Enigmata 2 will have a totally revamped control scheme. Before you had to play using the arrow keys and space bar, only firing forward. Now you will have the ability to shoot in any direction aiming with the mouse, using the left mouse button to fire. Not to mention you can now move around using the WSAD keys, or the classic arrow keys.

Classic controls will still be available. Pressing spacebar to fire will automatically revert the game back to classic controls. It will be changed back instantaneously when you use use mouse to fire.


Tuesday, December 1, 2009

Enigmata 2 Development Status


Enigmata 2 is well under way. Still hoping to finish it this December, but that might not happen. Currently 8/20 Levels are complete.

The sequel will have a completely new engine and control scheme, although you can still play with legacy controls. Not to mention new graphics, as you can see in the screenshot. Of course all this will be accompanied by a new music soundtrack.

More details on the new control scheme and storyline coming soon.