Wednesday 29 February 2012

Liquids and Liquid Simulation.

About a week ago I think, I got the idea to implement a liquid system into my game.
Since the plan was to make the world very large, the liquid model need to be keept simple, preferably not require a lot of new memory allocations. And in all ways as fast as possible to access.

My original design,

even if it looks interesting, have some issues with liquids that by design don't mix, they would start building underwater pyramids, and from a performance standpoint it was a bit too slow.

The goal now is try to implement a liquidmodel as described from the game Clonk where rather then moving large chunks of water, you teleport water across the waterbody, since all liquids in their system won't mix with each other, you are garantued to limit the movement a lot.

So my implemenation will probably contain acid/toxic sludge, water and oil used for various parts.
Could be that some builds require water/oil but release toxic. We will see what the future brings.

Tuesday 14 February 2012

Tuesday 7 February 2012

So finaly went with Box2D


Integrated box2d into the project to decrease the work time required to implement my own collision/physics system.

So far it works and the latest working iteration is on the repository now. Grab it while it's hot.

Need to fix the pixel vs meters issues that are about to arise, and also fix the issues  where the entire surface of the player counts as a collision object, thus you are allowed to jump if your side or head have any contact with the world. But thats for tomorrow or the day after that.

Sunday 5 February 2012

Collision.

I am putting some collision code together.

The most important part for any platform game is to collide with the enviroment.

Since the current goal of the game is supposed to be tilebased, the collision is rectangle based. One pass determines if any of the corners of any desired collision rectangle is inside the area of any othere desired collision rectangle. The first simple check just determines if this is true or not.

After that we have the possibility of a shallow check. This allows us to do logic based on the actuall name of the object we are colliding with, like "Player", "Box" etc.

Last but not least we have a deep collision check. This allows the collisionobjects children to be tested as well, so from here we can do more indepth logic, like checking what side of a player collided with what object. If you only can jump on an enemy it would be a collision between "bottom" and "top" we would like to check, any other form of collision would result in damage to the player.

The system itself is put together now it's just testing.

After the collision integration it's time to implement the jump function so the player might do more interesting things then just falling down.

Thursday 2 February 2012

To whom it concern.

So the crap is live, anyone with a svnclient can pull down the latest gathering of crappy code.


http://gameprojectgamedevse.googlecode.com/svn/trunk/


This is the mentality that will surround this code.


This code is the best there is, if you think you can make better code, prove me wrong, BY POSTING BETTER CODE! Your opinion is worth jack shit. Write better code or don't comment on the code, simple as that, so I expect a lot of comments on the code in the future and no requests to be added to any kind of commit list.


This is a work in project, and it got a goal, get things done, get things done fast, and if the mood is there we might refactor the code if anything turns out to be impossible to implement or when things work and there is simply an interest in seeing if there is another way to implement the system.


The project have no gameplay goal or main idea whats it's going to be about, except that it got some simple platform elements in there that don't work so well at the moment.


But they will, and everything will be glorious!


Take care!


//TheSpaceMan

Smaller project.

Once again I have realized the size of my project, that it will be unresonable to get anything out to people to play in a decent way with in a year. One of the main issues have been the lack of proper debugging possibilitoes.

So even if I'll face public outcry I have downsized into a new project, it'll be a simple platformer in mario bros style, the entire project will be avaible open source for anyone who want's to poke around in it. The link will arrive as soon as I have implemented basic collision and tile loading.