Tuesday, September 4, 2007

Making Progress

It's been a little while since I posted things have definitely moved forward since my last post.

Planning for the new FPS engine is now complete as well as the new file format. I have almost finished writing a map converter which creates maps from a text file. The format of the map file is organized to speed up loading, collision detection as well as rendering. This part of the new engine should be much better than the previous engine particularly because I can now be absolutely sure that that the loading code does not contain memory leaks ( a major problem in the last version.). It is also much more modifiable/maintainable as I make additions to the rendering abilities of the engine.

I have implemented full 3d clipping, it is still a little buggy but works well. I will refine it further down the track. The new map file also contains light maps. While I am unsure if they are being correctly generated, it will be very interesting when I finally complete the rendering code to see how they show up.

Various optimizations discussed over at psp-programming have made it into the plan as well, hopefully I'll be able to not only make things look a bit prettier but also gain an increase in frame rate as well.

Ive got a few other feature concepts that I have in the works, although some are refusing to blend into my current plans easily. I'll comment on these a little further down the track.

Things are looking up :)

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:

Sunday, July 29, 2007

Simple PSP FPS

Well this is my first post on this blog, it will hopefully become home to many of my projects in the future and to kick things of I'm going to post a couple of screens of my new FPS work in progress for the PSP.

Currently a simple map editor, basic ai for bots and collision detection have been implemented. The bots are md2/3 format (The formats used in quake2/3). I'm hoping that in the next few weeks I can get it to a releasable state for the current NeoFlash competition, but i'll see how it works out.

I'll leave with a couple of screens of the project running, if anyone stumbles across this blog, feel free to drop in a suggestion for a name for the project in the comments.