Sunday, August 19, 2007

No Neoflash Entry :(

Oh well looks like none of my current projects are going to be ready for this neoflash competition, it's a shame that I couldn't have finished the FPS demo i had been working on.

I thought I'd have started coding the game engine by now but I'm still planning the structure of the engine. Several changes are happening to the original plan an example being the object/player/bot/projectile management code is now all to be re-written aswell. I think I can make it a bit more efficient at only updating thing while they are within a certain proximity of the player.

I'm also beginning to think that moving to c++ so that I can build the engine in an object orieted way might be a good idea.

I have modified the map editor to build the map as a 3d bsp tree which is better, it also now automatically generates the light map textures. Whether these textures are actually correct for the surfaces is not yet known as I haven't started writing the rendering part of the game engine as yet.

Till next post, see ya later :)

Tuesday, August 14, 2007

Fixing the problems

As I said earlier I will now explain what the problem is with my current engine and how I intend to fix these things.

1) The lack of sloped polygons and small collision detection/response bugs.

This problem is caused by the fact that the actual polygons of each scene are stored in a 2 dimensional bsp tree, the nodes of the tree contain any polygons that are vertical and the leaves contain the roof and floor polygons. This way I could simplify the collision detection because I would only have to worry about the x and z dimensions. Y-axis collisions were simple, each leaf in the tree had a roof and floor height, if the player was in a particlar leaf it would fall until it hit the floor and would stop if it tried to move higher than the roof height.

The problem with this is that collisions with a polygon that is not vertical or horizontal but sloped would cause unexpected results (let alone placing them in the bsp tree in the first place). This is because the collision is no longer with a line (as seen from above) but a plane which could be orientated in any direction. Also if a players bounding box was located on more than 1 leaf sometimes problems would occour with certain special cases.

To fix this I have decided to go back to the start and create a system where all polygons are kept in a 3d bsp tree, this way collisions on any polygon are4 performed with the same collision functions and slopes will be allowed. Also there will no longer be the collision problems associated with when the player is located on more than one leaf.

2) Lighting problems.

In the current build of the engine, wall materials have only a color or texture, there is no multipass texture mapping and the frustum clipping only calculates a set of persective correct texture co-ordinates.

I wish to have lightmaps that are generated by the map editor to help create a better atmosphere in the levels, this requires multiple textures to be applied to one surface. Also the clipping has to be able to calculate the lightmap texture co-ords as well.

For this, a complete re-write of how the polygons are stored, clipped and rendered is in the works.

Hopefully I can complete this engine in a quicker time than my previous one because of the fact that I have learned alot and gained some valuable experience in working with bsp trees.

PS. Sorry for some of the formatting problems in the previous post, blogspot seems to have alot of problems with formatting.

Blob Ball and FPS Re-write plans

Unfortunatly due to some problems I am having implementing slopes and lighting in the FPS engine I mentioned last post, I have decided to design a new engine from scratch taking into consideration these features. While I will now struggle to have anything to submit to the current NEO Flash comp I am still happy with the new design of the engine, I should start coding any day now.

I will make another post shortly talking about the technical problems I am facing with my current FPS engine and how I plan to rectify the problems.

Now the good news :)

A couple of years ago I gave up on a small project that was to be my first for the PSP, with the FPS engine coding currently stalled I decided to go back and take a look at the problems which caused me to abandon it. While it still lacks polish and the menu system is clumbsy and un-appealing, I think it could make quite a fun mini-game. Heres some teaser shots, I'll most probably release this in the NEO flash comp in it's unpolished state, the code is very much a mess.

The moon level 4 on 4:

Grass level 1 on 1:

Ice level (personal favorite) 3 v 3 with custom colors, speeds and sizes:

Grass Level 4 player 1 vs 1 vs 1 vs 1: