Worklog for Foppy

Ranger

Return to Worklogs

Finished(Posted 2011-04-03)
Ranger has finally been completed!

The game can be downloaded from: http://www.foppygames.nl

Latest additions include:

- a number of songs, see title screen or readme.txt for credits
- monthly hi-score table in game, all-time hi-scores on website
- flashing energy bar when energy low
- tip to use medikit when energy low
- instructions screen + back button
- sound of spaceship taking off after mission
- effect from player when toggle prisoner follow status
- number of levels now unlimited
- remove bushes from space craft
- animations for dying creatures
- new enemy type: Spikey Blaster, carrying zapper and blaster
- scrolling credits
- knife pick-up at start of game
- tips at end of level
- option to switch between full-screen and windowed mode

Video:

http://www.youtube.com/watch?v=guA23wF9feY



---------------
Foppygames

Prisoner waits or follows(Posted 2011-02-13)
I made a new video:

http://www.youtube.com/watch?v=KdUCZ1ocm_8

Among other things it shows that it can be tricky to keep the prisoner alive if he just blindly follows you. More advanced AI is too much work so I added a key to make him stop where he is now, or follow you when the key is pressed again. This seems to be working much better as you can go ahead to see what's around the corner while the prisoner waits.

Added: (some things are not in above video)

- laser bounces off walls once
- wall tiles can be destroyed using grenades
- bullet holes appear in walls
- global limit on particles to avoid slowdown
- make prisoner follow player with less hesitation
- lower rate of fire for enemy using shotgun
- click sound when trying to fire but no bullets left
- surprised sound when losing gun
- F key once: prisoner waits; F key again: prisoner follows
- small arrow above list of weapons indicates selected weapon
- prisoner status icon: following, not following, dead
- sound when scrolling through weapons
- grenade throwing power displayed next to aiming cursor

I have uploaded some images to ad-heavy "Plixi" to be used in my "tweets" which I basically started using to send out screenshots for #screenshotsaturday.

http://plixi.com/p/73280599
http://plixi.com/p/76692027

---------------
Foppygames

Online high-scores(Posted 2011-01-19)
Added:

- high-score screen showing scores from online database (using tcp and php/mysql)
- game-over screen
- enter-name screen to send score to database
- new enemy: turtle with shotgun
- new enemy: ninja turtle, like turtle but faster and using shotgun and uzi
- enemies stop or move backwards when near player, except when carrying knife
- enemies can strafe while shooting or when hit
- BUTTON type for navigation and for entering name



In the high-score system I am using code from the code archives for GET functionality and url encoding:

http://blitzbasic.com/codearcs/codearcs.php?code=21
http://blitzbasic.com/codearcs/codearcs.php?code=1357

---------------
Foppygames

Automatic reloading(Posted 2010-12-13)
The game has been simplified a bit more by the removal of the use of separate ammo clips, and thus the need for manual reloading, and the need to press space to open a door.

I am currently adding more types of enemies and setting up levels, in terms of which enemies will be attacking the player in subsequent levels. This will not be completely random, for example, the most dangerous enemies will not appear in the early levels.

I said earlier I wasn't going to add more enemy types but in the current program it's actually quite easy to add new ones, and it does add variety. I just copy and edit the graphics of an existing enemy and add data statements containing basic stats (running speed, turning speed, energy) and the set of weapons they are to use.

Added:

- particles, including grenades, bounce off walls correctly
- doors open automatically when player walks into them
- keeping score, points for killing enemy and rescueing prisoner
- enemies respawn only after prisoner is set free
- enemies can now throw grenades and stab with knife
- enemies now switch between weapons they are carrying
- enemy switches to next weapon when weapon shot out of hands
- weapon selection can now be done using mouse wheel in addition to number keys
- new enemy: giant grenader - minigun, grenades
- new enemy: giant killer - minigun, shotgun, grenades, faster, more energy
- new enemy: droid maniac - uzi, knife, faster but less energy, to be added in groups

Removed:

- use of separate ammo clips
- reloading

---------------
Foppygames

Prisoner rescue(Posted 2010-10-31)
Previously the game was about running up the map until the end was reached. To make it a bit more interesting I have added a prisoner at the top of the map and changed the goal into a rescue mission. The player has to travel North, get the prisoner out of the prison and then lead him back to the spaceship at the start.

Only if the prisoner is rescued, ammo supplies will be available to the player for the next mission. The player can still leave without the prisoner, for instance if he gets intro a hurry or if the prisoner is killed, but the lack of new ammo and health will then be a problem on the next mission. The prisoner can be hurt by enemy bullets as well as player bullets, so I am hoping for extra kinds of interaction and situations where the prisoner gets in the way. The goal of the game as a whole is for the player to reach a high level. Each level will be longer than the previous one.

In the meanwhile mouse control has been added and is working very well. The right mouse button can be used to quickly use the knife while the middle mouse button (or wheel press) can be used to throw a grenade. This can still also be done using the keyboard.

---------------
Foppygames

New control method(Posted 2010-09-19)
I am continuing work on Ranger. The keyboard-only controls of this game have become a bit too complex I feel: rotate left/right, move forward/backward, strafing, shooting, reloading, changing weapons, throwing grenades, stabbing with the knife, applying medikits... because of this I am now experimenting with using the mouse for aiming, and WASD for absolute movement.

This will allow for precise 360 degree aiming, and for simple 8 directional movement. Now I still have to think about how to control grenades and the knife, namely which buttons to use for those. Maybe a few buttons that are close to WASD. (I will take different keyboard layouts in consideration at a later stage so it's also playable on German keyboards, for example.)

After this change I expect the game to be easier to play, even with larger numbers of enemies. I also want to work towards a finished game, so instead of thinking of yet more enemy types and backgrounds I would rather use what I have now, throw a lot of enemies at the player and see how far they get.

---------------
Foppygames

Medikits(Posted 2010-04-06)
Added:

- hits can cause maximum of 3 wounds that bleed and slow creature down until treated
- medikit pick-up (creature can carry 3) that heals all wounds and restores full energy when M key is pressed
- weapon shot from hands can now be picked up again by player
- ammo bunker, each level will probably have one, containing weapons and medikits depending on level
- enemies will now fire salvos of random length when using machine guns

A single medikit will heal up to the maximum of three wounds and restore all energy, so a risky strategy could be to refrain from using the medikit until it is almost too late. This adds more variation and the possibility for different playing styles, compared to a medikit that fixes just one wound. (The latter approach would render the medikit a bit useless as a game mechanic as using it would become an automatic action to fix the most recent wound.)

The ammo bunker will contain weapons and medikits. It will be an important place for the player to visit, although weapons can also be picked up from enemies. (I will have to balance enemy weapon drop rates and the types of pick-ups placed in the bunker so that visiting the bunker is indeed important.) This will make the run from the bottom to the top of the map more varied, a bit like a secondary mission. The bunker could be guarded by strong enemies, or a large group of normal enemies.

Previously enemies just fired single shots at random, but now they can fire longer salvos, just like the player can by holding down the fire button. This makes the game much more difficult and also more fun.

---------------
Foppygames

New video(Posted 2010-03-18)
I have uploaded a second work-in-progress video:

http://www.youtube.com/watch?v=usVGZK07nWM

After this I should make no more videos but instead finish the game. >:(

The video shows blood effects, grenades, craters, and guns being shot from hands.

In the meanwhile I discovered my game has flickering graphics on my Windows 7 notebook. On the other hand it runs fine on XP and Vista.

I am also writing another game now in Blitz Max, which will be a modified remake of "Paratrooper", the famous game from many years ago that has you gunning down helicopters and paratroopers all over the place. I switched to Blitz Max for this new game because I suppose it won't have the flickering graphics problem on my notebook, and also because real-time image rotation should come in handy, for example for the rotating gun. I am still working on "Ranger" too of course. :)

Here's an image showing the playing field after I was sadly killed. There's only one disillusioned enemy left. (Click for larger version.)



---------------
Foppygames

Throwing grenades(Posted 2010-03-03)
Grenades are now one of the types of weapons to be selected using the number keys. To make it easier to throw a quick grenade the player can also hold down the space bar (where X is the normal fire button), and after releasing the space bar a grenade will be thrown and the previously selected gun will automatically be reselected. I was using the space bar to open doors, but that is now done using the enter key.

Here's a picture that also shows new particle effects for ground being destroyed by exploding grenades, and the craters remaining afterwards. (Click for a larger version.)

I have also been adding a bit more detail to the ground and wall tiles.



---------------
Foppygames

Weapon Pick-Ups and Crosshair(Posted 2010-01-04)
Added:

- weapon pick-ups
- enemies respond when hit
- an aiming crosshair for some needed accuracy
- animated "door" tiles, opened by pressing space when in front
- I removed the "armor" bar as it is not necessary

The player will start out carrying no weapons, but a few will be next to him in the crashed space ship to be picked up. To give the player the necessary peace to pick these up I added a door to the space ship. Until this is opened the enemies cannot see the player. Now I can use doors in other parts of the levels too.

The doors had to move so I made an object called TILEANIMATION which controls which frames out of an image strip are assigned in sequence to a tile object, with the option to loop the animation. This can be used for other animations as well, for example I could animate the ship's dashboard or make a mud pool with bubbles.

For aiming I intended not to add a crosshair, because I like the idea of aiming with the gun itself. However the steps in the gun-rotation animations are quite large, and combined with blocky graphics this does not make for very good aiming. So now I have added a crosshair after all, floating in front of the player like in Airborne Ranger. I made it so that as you get close to a wall the crosshair will move towards you so as not to disappear in the wall. Another good reason for this crosshair is that I want to add grenades, and without a gun a crosshair would be required anyway for throwing the grenade.

Things I want to add:

(I might be too optimistic though.)

- grenades (added)
- rockets
- ability to destroy walls (added)
- enemy and player can get weapon shot out of their hands (added)
- enemies drop weapon when killed (added)
- enemies can also pick up weapons (canceled)
- eject empty shells from guns (added)
- blood effects (added)
- wounds that bleed and slow creatures down (added)
- first aid kit pick-ups to heal wounds and restore health at the press of a button (added)
- minefields (canceled)
- z-ordering among creatures and bushes/furniture (canceled)

---------------
Foppygames

Video(Posted 2009-12-17)
Latest additions:

- health bar, armor bar
- correct shadow color in different themes
- width of beam of fire based on gun
- player ship ("crash site") in first theme

I also added a new enemy. This is a droid, which looks a bit like a chicken. It will investigate the player's ship crash site and carries an uzi even though it has no arms. Perhaps I will also add an enemy that commands a number of dogs, as if they are hunting for the player after seeing his ship go down.



The theme of the game will be that the player has to fight his way to an enemy base where a rocket ship can be stolen to fly back home. The 4 types of levels to be visited are a green one where the player crashed, a jungle, a desert-like brown theme, and an enemy base. I think every theme will have one or two new enemy types.

I made a video a few weeks ago which does not yet have the new features mentioned above.

http://www.youtube.com/watch?v=uZlT7pvP854

---------------
Foppygames

Slow progress(Posted 2009-11-23)
I am still working on this game, after somewhat of a pause.

Level structure:

I have picked four themes from the colors in the previous post. The player will play four maps with the different themes, one after another, and that will be one level. Then it's on to the next level, starting at the first theme again. I thought this would be better than playing a number of maps of the same theme in a row, because the player would get bored sooner, delete the game, send me a hate-mail and never see the other colors and enemies.

Line of sight stuff:

Line of sight will not be blocked by bushes. First of all this is tricky to program efficiently. Secondly I'm afraid it would make the screen too messy. It's a 2d game so playing with line of sight effects too much could lead to an unclear playing field, in what is still supposed to be an action game.

But the bushes do still block bullets when you are firing at them from a large distance, so they can be used as bunkers.

Enemy AI:

There now is basic AI in place. Enemies will start shooting when they see you, while also closing in. If you hide around a corner so they lose sight of you, they will most of the time investigate the spot you were last seen. This AI wil have to be extended quite a lot as it's an important part of the game.

Effects:

The arms of the creatures now move up and down while walking, as does the gun, which looks nice. I just use the offsets already computed for moving the feet up and down, applying them to the arms. (But switched around, so the left arm moves up when the right leg moves up.)

When shooting the creature is pushed backward a bit, depending on the power of the gun. This can influence gameplay as with the minigun the player will have to compensate for this. It makes the action of shooting less static and also counts as a kind of penalty for using the biggest gun. (I did some reading up on the feasibility of one man handling a huge machine gun and the necessary ammo, like my hero John J. Rambo does. My conclusions are this is incredibly realistic and therefore should be part of my action simulation!)

---------------
Foppygames

New computer(Posted 2009-07-20)
A few weeks ago my computer stopped working. My most recent backups were from 2006 but for my current game I luckily made an online backup a couple of weeks before the crash. So I bought a new computer, with Vista on it and a wide screen. Now I have recreated the game to the point I left it at before everything stopped working.

To that I have added the use of a TILE type. Instead of the simple numbers and one big image file that I was using earlier I can now use different tile sets and store additional data for each tile. (Like I could add a "water" property and have splashing sounds be generated if somebody walks across such a tile.)

I thought that instead of just working on small things I should also work on bigger things like level structure. I am not quite sure but the game will probably have a large number of levels, with sets of levels sharing certain themes such as "green", "purple", "desert". I see now that I actually wrote "dessert" in the code but that would be a silly theme, with bits of pudding flying everywhere.

Here are some colors I tried for different themes. The walls, bushes and enemies can also be different for each theme.

Everything on the map is randomly generated so you can imagine it took me quite some time to create this set of similar images! -_-' Hehe..



---------------
Foppygames

Bushes(Posted 2009-06-06)
Two types of bushes have been added. I am thinking about creating different settings, for example this green setting, a yellow "desert" setting, etc. For every setting there could be different types of bushes.



An algorithm places more or less randomly shaped strings of bushes at random locations on the map.

Bullets will fly straight through the bushes when you are shooting at them from close range. Because of this the bushes can be used as bunkers: when shooting at them from a larger distance, the chance of the bullets being blocked increases. After several hits the plant is destroyed.

The bushes will also block your view, again depending on how close or far away you are from them. But this has yet to be added to the game.

Recoil has been added so a gun moves backwards when fired.

In addition, shadows have been added to bushes and creatures. These are just shapes in a dark green color that are drawn before anything else is drawn, so they appear under the objects. Of course when I add settings with different ground colors, the color of the shadows will also have to be changed. I could use black shadows in all cases. I suspect it won't look as good, but it is worth a try. This would have been easier in BlitzMax, using black shapes plus the correct alpha setting.

---------------
Foppygames

3D walls and changes in features(Posted 2009-05-29)
I have added a second type of wall tile with shading, as well as a set of ground tiles with shadows. After creating the layout of the walls, the program checks which pieces of wall should be of the shaded kind, and which shadow tiles to use on the ground based on adjacent wall tiles.

Now it looks a bit more 3D:



A creature cannot enter a solid tile, but in creature-tile collisions only the main body of the creature is taken into account (and not the head, arms and legs). Therefore part of the graphics will move into the solid tile. This helps creating the 3D illusion as the character will partly disappear behind a wall or be drawn in front of it. (The walls and creatures are drawn in the correct depth-order with respect to each other.)

The screenshot also shows the new weapon interface, similar to that seen in Doom, with a number for each weapon, corresponding to the number keys. If the number is red that means you have no ammo for that gun. The selected gun and bullets and extra magazines for that gun are shown in the lower right.

A number of features will be changed or removed:

- The player starts with one or two weapons and can pick up new weapons (or collect ammo) found during the game
- No shop; the surroundings/enemies have to provide ammo and first aid kits
- No complicated inventory/backpack management
- No separate battery system; the laser guns also use magazines (which look like batteries)

---------------
Foppygames

Back to Blitz 3D(Posted 2009-04-22)
I have rewritten a considerable part of the game engine in Blitz Max, but progress was slow and for the last couple of months not much has happened. There are still no moving characters on the screen, while in the Blitz 3D version I already had creatures running around with guns. In addition to the boring aspect of rewriting the engine, I wasn't able to create a very flexible graphics mode system in Blitz Max (as noted in the previous post) which was the main reason to switch languages.

Because of all this I have now gone back to the Blitz 3D version. I will however change the resolution from 640x480 to 800x600 (as planned for the Blitz Max version) and am currently resizing the graphics.

---------------
Foppygames

800x600(Posted 2009-02-14)
Although I am of course still working in BlitzMax my game will probably not have the automatic graphics mode selector described in the previous post. It seems that GraphicsModes() returns modes that (perhaps depending on monitor drivers being installed or not) may not work well with the monitor. Adding a hard-coded checklist of common modes could partly solve this but I would never be quite sure about it. Another alternative of defaulting to the desktop mode seems nice at first but apparantly on larger resolutions this can also result in crashes.

So the plan is to stick with good old 800x600. In fact in the case of Ranger I was using 640x480 so this is quite a technological leap forward for Foppygames. ;)

The main reason for writing "Saucer Attack" was perhaps the graphics mode system. On the other hand it doesn't hurt to write game-related classes and to try other BlitzMax things that will also be needed in "Ranger". Right now I am adding sounds to Saucer Attack and for this I use SFXR by DrPetter, a great program for creating classic video game sound effects.



What needs to be added is more effects, and first aid kits and temporary weapon power-ups that fall to the ground from destroyed enemies. After that I can start writing the basis for Ranger, such as the tile based engine. Last but not least I also want to say that I am enjoying the use of the true type Blitz font created by markcw.

---------------
Foppygames

Switching to BlitzMax(Posted 2009-01-16)
In order to support different resolutions and aspect ratios I have decided to switch to BlitzMax. Doing so means the game can pick a resolution that suits both the monitor and the game (as much as possible) and then either stretch the game in all directions to fit this resolution, or stretch the game to the extend where the game's original aspect ratio is still maintained and horizontal or vertical bars are drawn to cover the remaining screen area. (A third option would be to set windowed mode.) Last but not least the player can select a different graphics mode from a list of modes returned by BlitzMax.

The plan is:

1) Write a set of functions that implement the above idea;
2) Create a small game while writing those functions;
3) Convert the current 'Ranger' Blitz3D code to BlitzMax;
4) Continue writing 'Ranger' in BlitzMax.

Actually I am quite far into step one, and for step two I now have as much as a title screen being displayed. The test game I am writing is called Saucer Attack and will see the player controlling a flying saucer in a single-screen shooter. The funny thing is that although I have a 4:3 monitor I write this game for 1280x800 widescreen, and I have set the code to use the "add bars" method (but the "stretch in all directions" method also works). So I can actually see the system working on at least one type of screen. ;) In the screenshot below I made the bars red so we can see what in the name of the Commodore 64 is going on!!



The system works like this:

1) set 'virtual' (game) resolution

Now set a default 'real' (monitor) resolution using the following steps:

2) get desktop resolution
3) get all available modes (choose highest refresh rates in case of doubles) and store in list allModes
4) get all available modes from allModes where aspect ratio is same as desktop and store in list desktopRatioModes
5) pick a default mode from desktopRatioModes if non-empty, otherwise from allModes, using these rules:
- if desktop aspect ratio is wider than game, pick mode nearest in height to game
- if desktop aspect ratio is narrower than game (or equal), pick mode nearest in width to game
- in both cases, selected mode should not be higher/wider than desktop mode
6) set default real resolution

In other words, the system prefers to choose as a default resolution a mode that has the same aspect ratio as the desktop. Secondly it then looks for the resolution closest to the width or height of the game, and not larger than the desktop.

In step 6, the necessary offsets and scaling factors to get from virtual to real resolution are computed and stored. I have defined "wrapper" functions for the drawing functions that I want to use in the game; the wrapper functions take care of applying the scaling to the drawing location. Scaling on the image itself is done using a separate wrapper function for SetScale, and the drawing origin is controlled using SetOrigin.

---------------
Foppygames

Enemies in-game(Posted 2008-11-14)
I have recreated the two enemy types:



(The picture was doubled in size for this worklog.)

A few parameters were added for adjusting placement of body parts. For instance the height of the body from the ground, the lowering of the head with respect to the body, and the vertical position of the arms can now be different for each creature graphics set.

Later I can make more enemies but now the next step should be to add a bit of AI to these two. They will share the same AI function but I can add small differences based on enemy types.

---------------
Foppygames

Enemy drawing(Posted 2008-10-31)
Since the last update I have added depth ordering between creatures and walls.

The function that creates the random level can now also add "spawn points" which are basically objects that represent inactive enemies. If the player gets within a certain distance of such points they are replaced with actual enemy objects. The enemies however have no brains at the moment so they just stand there.

Strafing was added, at the moment activated using the Shift key. (Which is close to the current fire button X. I guess configurable keys would also be nice.) Strafing is only to the right and left, with simultaneous forward and backward movement still to be added.

Shotguns now use individual shells for ammo, while the minigun now uses a belt of bullets instead of the magazine that is used for machine gun and uzi. It makes it all a bit more complicated but I want to add a little bit of realism and variety here and there. With this in mind the minigun will also be using the battery for the spinning mechanism, and it will probably get a heavy recoil.



I made this sketch of what the enemies could be like. Instead of typical soldier figures I thought perhaps it would be fun to make them a bit more like monsters. It has to be seen how well this translates to the animation system that uses separate body parts. So I will have a go at creating those in the game.

Next will be a simple AI routine to have to enemies look around, spot the player and fire their guns at him.

The function that checks whether the player can see each enemy will also store this information (and the angle from player to enemy) in the enemy objects; that way, the enemy AI function can decide whether the enemy can see the player without having to run the line of sight function again.

---------------
Foppygames

Gun graphics(Posted 2008-10-09)
Progress is slowing down a bit. I have a full time job at the university which most of the time involves programming (which is fun, make no mistake). Then when I get home and make spaghetti or something and I am a bit tired, I sit down at the computer and listen to C64 or other electronic music and reluctantly and with a long sigh fire up "Graphics Gale" and "IDEal"... and the result is..



A set of gun graphics! The guns are pump action shotgun, double barreled shotgun, uzi, 'machine gun' (have to change that to something a bit more specific), mini-gun, zapper and blaster (which are a small and a big laser gun). It's a bit like the cliché gun set.



For each gun I made an animation strip of 36 frames so that means there's one frame for every 10 degrees of player rotation. Now I am in the progress of giving each gun category their own type of bullets, and each gun type should have its own settings for parameters such as firing speed and bullet speed. After that I should add basic enemies to test all this.

One problem I ran into was the ability to cheat by sticking the gun through the corner of a solid tile, thus shooting at (future) enemies while hiding behind a wall... I solved that by running a line of sight check from the center of the player to the end of the gun (the spot where the bullets originate on the screen). If there is no line of sight, that means the gun is in a wall and the bullet will not be launched. ;)

The player is not anymore in the exact center of the screen but instead the screen focuses on a spot slightly ahead of the player so that you can see what's coming. This spot is all the time being averaged with the previous focus spot. If I don't do that the screen motion as the player runs and rotates left and right is unpleasant and nausea inducing.

---------------
Foppygames

Weapon displays(Posted 2008-09-18)
The player has 2 guns to choose from by pressing 1 or 2 during the game. The guns and their remaining ammo are shown in the lower left and right corners. In this picture gun 1 is a machine gun while gun 2 is a laser gun (using the same image for the moment, only red). For the laser gun no numbers are shown since it uses batteries; the battery level is shown in the top right corner.



The more batteries you carry (to be bought at the shop) the longer you can use the laser gun, and batteries are recharged at the end of each level. Battery power will also be used by the laser sight and the motion tracker once these are implemented. For now I want to continue adding weapons to the game, so as not to be tempted to leave them out at a later stage... ;)

---------------
Foppygames

List of features(Posted 2008-08-26)
I want to add at least the following features to this game:

--------------------------------

Increasing difficulty from one level to the next:
- More/stronger/smarter enemies
- More dangerous surroundings (for instance, mine fields)
- More difficult selection of constructions on the map
- Longer levels

Inbetween-level shop
Here the player can buy upgrades for the following parts:
- Helmet (better armor, increased field of view?)
- Body armor (includes arms; better armor)
- Boots (better armor, better protection against explosions/mines?)

(Or maybe I will leave out the armor upgrades and concentrate on weapons/items.)

Guns (player can carry 2) and corresponding ammunition:
- Machine gun, different types; machine gun magazines
- Handgun; handgun magazines
- Shotgun; shotgun shell packs
- Energy gun, different types; energy cells

Extra equipment:
- Grenades (for throwing)
- Knives (for throwing, can be picked up again)
- Medikits
- Laser sight (draws a line for help in aiming; uses battery power)
- Radar (shows enemy locations; uses battery power)
- Batteries

The player can also sell the above items (receiving a fraction of the price back, or perhaps 100% of the price, to allow for correcting mistakes in buying) to make room for other items.

Money
The player receives points for killing enemies. These points serve as money at the shop. Thus the goal of the game is not to reach a top-score but rather to complete all levels.

Inventory space
Of each armor item (helmet, body armor, boots) the player can have only 1. The player can carry 2 different guns (but use only 1 at a time). For ammunition and extra equipment a total number of slots is available in a backpack (as in the Airborne Ranger game). Guns are not in the backpack.

Hiding from sight
The game uses a line of sight algorithm. Walls block vision; if there's no line of sight between the player and an enemy, the enemy is not drawn (thus invisible to the player) and the player's location is usually not known to the enemy. (If the player has the radar enabled, it will show dots representing enemies.) Player (and enemies) can hide behind/in bushes. How does this work? Line of sight is broken when it hits a bush in the distance. It is not broken when it hits a bush up close. This means when you are close to a bush, you can see through it and see enemies that are behind the bush. But those enemies, if they are a certain distance away from the bush, cannot see you. If you start firing or attract attention in another way, the rules change; they may not have seen you but they know you are there. (The enemies will store the location where they think you are. If you move away, they will not know where you are anymore but they will know that you are about.)

Hiding from bullets / firing from hiding place
Walls can never be destroyed and will always block bullets completely. To make for a more interesting playing field there will be bushes (or other objects playing the same role) for player and enemies to hide behind. Bullets will fly through bushes when shot at close range (compare this to the line of sight not being broken when the bushes are up close). At greater range, the bullets will hit the bush and damage it until the bush is completely gone. This makes bushes into a kind of bunker; the player hiding in/behind bushes can fire at enemies without destroying his own hiding place. Enemy fire (when from a distance) will be blocked by the bushes until these are destroyed. Should the enemy move in close range, their shots will go straight through the bushes. Grenades will fly over bushes but not over walls.

--------------------------------

Next on todo list:

- basic enemies (still haven't added them)
- a few types of weapons / ammunition
- the shop

---------------
Foppygames

Animation system(Posted 2008-08-21)
The animation system is working, for the player at least.



As you can see, the player has a yellow helmet and orange feet and a stylish white gun.

The different body parts are drawn at the right angle when rotating, and for each angle a different frame is selected. The gun has 36 frames so there's a picture for every 10 degrees of rotation, allowing the player to aim reasonably well. Based on the angle, the parts are drawn in the correct order for depth-sorting. The feet move along a sine curve. While the player is shooting, rotation speed is lowered a bit to allow for more precise aiming.

The player is an instance of a "creature" type, and the enemies use the same type, so they will also use this animation system. I have to think about what types of enemies the player encounters and draw the body parts. I think the enemies will be humanoid and carry guns as this fits the animation system/body part count. (Although exceptions like "no visible gun" or "no arms" could of course be added.)

What's next on my todo list:

- level structure; go to next level after reaching the top
- basic enemies
- writing down a list of things that I want to add to the game

---------------
Foppygames

Random map(Posted 2008-08-11)
I am working on the random map part. Levels are a certain number of screens high and 1.5 screens wide. A function places a series of random "constructs" from the bottom of the level up to the top, where a construct can be a wall, an open space, a grid of blocks, or something else.

In the picture below the player has just left a "grid" behind him and is nearing a "wall". The wall is made to be not just a horizontal row but also has a few random bits sticking out and a number of separate blocks in front of it for the player or enemies to hide behind.



When this is more or less finished the next thing will be the characters and the way they are animated. I thought it would be nice to select their bodyparts from a number of alternatives; there can be combinations that I pick beforehand, and there can also be "mutants" that are random combinations. The mutants will be stronger than normal enemies and the reward for defeating them will be bigger.

---------------
Foppygames

Idea for a new game(Posted 2008-08-05)
Hi, I have started writing a new game, and thought it would be nice to create a worklog if only to keep myself motivated. (Since it has been some time that I actually completed a game.)

This game will be written in Blitz 3D but using only the 2D commands.

[Update January 2009: The game will be written in Blitz Max.]

[Update April 2009: The game will be written in Blitz 3D.]

The working title is 'Ranger' because I was inspired a little bit by the game Airborne Ranger. The basic idea is the following:

1. The player controls the 'ranger' in a vertical (perhaps also horizontal) scrolling world, viewed top-down but with characters drawn from the side to keep it interesting. The ranger can rotate and walk forward/backward using the arrow keys, and fire his gun, and perhaps select different weapons.

2. The game consists of levels. In a single level, the goal is to reach the 'top' of the map. Every level will be more difficult than the previous one. The player has to keep up with the increasing difficulty by a) picking up better weapons, b) buying better weapons in a shop. (I still have to decide.) The picking up weapons idea would be like in my game Fly Out. (In Fly Out the player has to be careful to actually grab the power up, or else the game could become overwhelmingly difficult.)

3. Obstacles in each level will be: walls and enemies. Walls and enemies are randomly set up at the start of each level. This is done randomly for two reasons: 1) more fun to play the game again, 2) easier for the programmer once the system works. Enemies will use a line-of-sight algorithm to spot the player. I want to make them a bit more interesting than enemies that simply run towards you; it should also be an option for them to stay where they are or perhaps run away.

I use my (unfinished) game Droidfire as the basis for this new game, and I started by removing everything except the basics which are:

- basic player and enemy characters
- scrolling tile background
- bullets
- collisions between everything
- font system
- sound system
- some special effects

I also removed mouse controls for aiming since i think it feels more direct if you control the character completely using the keys. Now what I have to create next is:

- a system for creating a random but playable map
- a system for character animation

The system for character animation will take a few elements (body, legs, arms, head) and use those to create an animation. It will display the character in birds eye view (3D). The feet will move like the character is walking, using perhaps a sine curve, like in my game Wizard Battle, only this can be done into a random direction (as the character can rotate).

Here is a picture of what the game looks like now:


I will remove the aiming cursor, assuming that the rotation/animation will be precise enough for the player to aim based only on that.

Here is a picture of Droidfire:


(I started writing Droidfire in 2002, the unfinished 1 level game can be downloaded here for reference.)

---------------
Foppygames