The Forgotten Planet Game Music

The Forgotten Planet - Menu Music - By Josef Falkensköld ( www.falconshield.com )


Thursday, 20 October 2011

Memory Leak fixes & Tech Demo 2 info

Hi!

I've been coding on many different things for the game these last days, and while I'm testing different stuff I sometimes forget that things get "messy" and that memory leaks appear because of forgetting to free up allocated memory that no longer is in use. Anyway, to get to bottom of things I had to do some code cleanup, and then found the nasty little buggers that was crawling around the system every frame, allocating more memory.

I took me about an hour to get things sorted out and up and running without leaking memory.

I'm now working on adding "Unit/Entity Sound" for the world builder, so that my sound/musician, Josef Falkensköld, easily can add sounds to enemies/objects and other stuff in the game.

Adding sounds to units/entities will be very easy. First he selects which unit/entity to add sound to, then click the "SoundFX" button to bring up the interface for adding sounds. On the top there will be a row with buttons with sound descriptions on them: "Attack, die, jump, move" etc. He then clicks on one of them and a directory listing will come up where he can browse for the sound he wants to use, click on it, and  "wham", that sound is rigged. The sound effect he rigged, will play when that action triggers in the game.

When clicking on one of the sound buttons in the editor, for example attack, the assigned sound for attack will be played. The name of the selected sound will also be displayed on screen.

Tech Demo 2:

It takes time to write your own game editor / engine and get all things working as you want. The engine & editor has come a long way, and I'm now thinking about releasing "Tech Demo 2" in the near future. I'm not going to put up any date of when it will be released, but by following the blog, you can tell when it draws near.

The following will be included in Tech Demo 2:
  • 2 Player CO-OP, using the new working networkcode
  • Main character graphics
  • New main menu look
  • Enemy graphics (Crawler, Stomper, Floater, Creep)
  • Beautiful parallax scrolling background of the surface area
  • 15+ rooms to explore.
  • The first boss
  • The first "Surface Music" track by Falkensköld
  • Sound effects for the main character, enemies and other elements in the tech demo - by Falkensköld
Here's a preview of what the main character will look like!









 Until next blogpost!

SolarStrings

Friday, 14 October 2011

Passage Blocker!

Hello again!

Today I decided to code the "passage blocker" that hinders the player from going back from a boss fight. It can also be used to block the player and push him to find a new way around in the game world.

The passage blocker can be triggered to self-destruct, once a boss on the same map is killed.

And the reason you really stopped by, the Youtube video:



Still lots of placeholder graphics, real graphics will come later.

See you next post!

SolarStrings

Monday, 10 October 2011

Prallax Scrolling Backgrounds!

Hello again!

My graphic artist asked me if we were going to have parallax scrolling backgrounds in the game. This was before I made the 3.5 times speed increase of the game. Back then I thought: Let's try. But after the speed increase of the game engine, this became mandatory for me.

So after some good work in early mornings, in-between family quality time, and work I managed to put together the Parallax scrolling in two days!

The backgrounds are of course placeholder stuff until my graphic artist sends me the finished stuff!

And the real reason you came by: The YouTube Video



Until next post!

SolarStrings

Thursday, 6 October 2011

Huge Performance Increase!

Hi!

I noticed this morning that I had not set the "SDL_RLEACCEL" flag on the background surface. This stands for "run length encoding acceleration", and usually gives a good performance increase. However, in this case it was a HUGE difference.


Before the fix, the game was running in about 134-137 frames/second (on my computer). Now it runs with 475-520 frames / second, depending on how many tiles that has to be drawn on screen. More graphics on screen = less fps, naturally.

The game speed gained is about 3.5 - 3.7 faster!! Not bad at all :)

So remember to go over old code you've written sometimes and make sure things have been set up properly.

For the SDL interested ones, this is how you set it up:
SDL_SetAlpha(Your_SDL_Surface_Here,SDL_SRCALPHA|SDL_RLEACCEL,255);

Until next post!

SolarStrings

Monday, 3 October 2011

Frame Based Rendering -> Time Based Rendering

Hello!

I decided to take a break from the AI coding and focus on one of the things that has been on my TODO list for some time: Change the game from frame based rendering to time based rendering.

What is frame based rendering?

Frame based rendering works in the following way:

First you lock the game to how many frames / second it shall run in, say 60 FPS.
Then you let X number of frames pass before you do something.
This will limit to game to not run any faster than  60 frames / second, and some older computers might not be able to handle the game.


What is time based rendering?

You set timers for everything that needs updating. For example: Move enemy, Input from the user for moving the player, update gravity on objects etc.

The game is no longer needed to run at a locked speed (60 FPS). The game will run with as fast as you computer can handle. On todays computers the game will run in around 90-150 frames / sec.

Since everything is time based, things will run at the same speed even down to 30 frames / sec, and still look fluent on older PC's.

Progress:

I'm now 99% done with the conversion to Time Based Rendering, I only have some minor things to tweak (set the right millisecond delay on things) and I'm done.

See you next post!

SolarStrings