About this blog
Development of a 3D maze game
Entries in this blog
I've pretty much finished my entry, called Deep Sea Encounters. I'm pretty happy with the way it turned out, as with all these things there's stuff I could do better but time and budget unfortunately make it the way it is. Stuff I would have changed -
Proper 3d graphics instead of 2d
Custom art and sounds instead of random stuff thrown together.
Maybe the gameplay could be tweaked to add different kinds of shields and attachments, giving it more replayability.
The stuff I struggled with is the timing for the attack patterns. It seems so easy but it did take a while to get right. Particularly the bosses, it took me quite a few iterations to get the firing working the way I wanted. I learned a lot about shaders during this development and I'm glad I've participated as I think the pressure to actually produce something is probably more like a gaming development environment, rather than just tinkering with stuff for my own amusement.
Thanks for playing the game everyone and all your positive comments, I've released version 1.1 which is a much easier game. I've basically put a difficulty multiplier in and whenever an enemy shoots the timer is multiplied by the difficulty (so they fire much less often). I've also multiplied the player's shield strength by the multiplier.
Good luck defeating the last boss I know you can do it!
Sin and Cos are a programmers best friend! I was looking at other games for inspiration and I saw this image from r-type
A circle of aliens spins around the player and you have to shoot them from the inside.
To calculate the points of a circle is quite easy, the calculation is -
Therefore I have an array of 10 objects which is calculated as follows -
230 pixels from the 'origin' and I have 10 objects - 360/10=36. I is incremented by 1 each step.
I now have a nice circle of aliens, I can increase the number by reducing the number 36. I can make the circle smaller or larger by increasing the radius.
The first level is more or less complete, with boss monster at the end. On to the second level!
You probably want a bit of randomness in your game, for example when enemies shoot a bullet or how long an explosion lasts. However sometimes you want it to be the same every game, so the player will know that an enemy will enter the stage and always shoot a bullet. You want some randomness, but consistent randomness so it is the same every time.
"When replaying levels, enemies always appear in the same location and follow the same behavioral patterns"
One way to do this is to have an array and load this with pre-calculated random numbers. When your game needs a number, call the next one off the stack and loop back to the top when you have run out.
One cool thing you can do with this is save a replay. If you capture the player's inputs each tick, then in theory everything in the game should play out the same way. You could use this for demo mode or as a save feature.
I watched an interesting video on Youtube, showing how iD software re-used assets in their sprites for Doom and how some monsters contain bits of other monsters. Working quickly and efficiently is a top priority for game developers, especially if you work on your own.
I needed a power-up graphic and inspired by this video I decided to rework something which already exists. Of course all my graphics are just downloaded from various places, not drawn by me! In a commercial release this would not be possible but for prototyping I think it's OK to 'borrow' graphics as this game will never be commercially available.
I took the sub which I am using for the player sprite and after a few quick tweaks I had something which looks OK and hopefully the player would never notice.
Here's another example of tweaking existing art.
I wanted the game to have waves of enemies, where 4 or 5 of the same type will appear and move in a predictable pattern towards the player. I placed some enemies in the stage and it was getting a bit tiresome moving them around if I wanted to move a wave to a different part of the stage. So instead of placing every individual enemy, I created a 'lead' enemy of just 1 type. All the enemies are flagged as inactive until they are drawn on screen. As soon as this enemy is made active, it starts moving and animating. I also added a spawn code to the lead enemy where it created multiples of itself and sets a speed and direction. That way if I want to re-position an enemy on the stage, I only have to do it once and move the lead enemy.
I also started adding in a bit of collision detection, to test out the gameplay. Each bullet fired by the enemy has a 'bounced' flag. If it is bounced off the players shield, this flag is set. This way, enemies don't blow each other up with their own bullets. When a collision occurs, first I check to see if the bullet's bounced flag has been set. If not do nothing, if yes then create an explosion and destroy the enemy.
I also have some ideas for power-ups, one will make the player move slightly faster, another makes the shield stay active for a longer time. There's a red bar at the bottom of the screen which measures how long the shield will last. When I get around to doing some sounds I can put in some cues which alert the player when it is low or about to run out.
I'm going for a slightly different underwater theme with my game, as I thought it would offer a nice change to the usual space ships. I wanted to do a swirly background effect to mimic water. I guessed I could do it with shaders and after a bit of googling I found a suitable effect. I dropped it into my game and sure enough it looks quite nice!
All I needed to do now was to send it into the background layer, and expand it out to fill the screen.
Looks OK and was exactly what I wanted. Shaders are really powerful and you can do some amazing effects with them, I highly recommend having a look if you need to add a bit extra to your games.
I implemented some horizontal scrolling and found that it was not smooth and juddered about, and I realised my timings were out. I have a viewport on the level and this scrolls to the right.
The timing of these were not in sync, so I had to re-do the timing. I don't want to scroll the mid and background every frame, and I can't scroll 1/2 a pixel! So the solution was to set up a counter. When counter is 1, scroll the foreground by 1 pixel. When the counter is 3, scroll the foreground again and also the mid-ground. When the counter is 5, scroll the foreground, mid ground and background. Then reset the counter back to 0. Seems to work well! Scrolling is nice and smooth. I also had another issue with 'shimmering' where the pixels did not appear to be smooth as the screen scrolled. I found this was due to my view port which was scaling the view in my play area. Fixing this gives me a nice 1:1 pixel ratio and super-smooth parallax scrolling!
There's also a little up-and down scrolling, to make the levels appear a little bigger. If you are above a certain pixel line, the view scrolls up and if you are below it scrolls down. It's only a little touch and you probably wouldn't even notice it but it makes the playing area slightly bigger than the view port but not enough that enemies and bullets will be hidden of the top and bottom of the screen.
The requirement is to create a horizontally scrolling shooter game with no weapons. I thought that I could have the enemies shooting at you and you could use their own bullets against them. If you had a shield, you could reflect the bullets back.
I created a quick demo and generated some bullets. The first problem was how to work out which direction to bounce the bullets back. After a bit of tinkering I found the best way was this -
1) Get the direction between the playerx,y and the bulletx,y
2) Invert this (add 180 degrees)
I tested out and it works OK, I think. Note that in the video, the bullets don't just get bounced in the opposite direction they are travelling, with a bit of skill you can actually 'aim' the bullets towards different parts of the screen, depending on where they hit your shield. A nice demo, but can I turn it into a game???!!
For a quick game, I'm happy with the results, it could be much better in a number of ways but in such a short time frame it's OK.
I would love to implement smoother scrolling, more monsters, more wall variety, more levels.
Overall I didn't have many problems, it was pretty straight forward. Having the limitations I put in place helped me to finish the game in time. I didn't really have any bugs or issues which caused a lot of time to fix, which is what I was worried about. The main bug I found was that I could see the skulls through walls. No problem, it was just the draw order which was incorrect.
Any questions, let me know below! Thanks!
A quick word on sound effects. I found a fantastic online tool which allows you to create retro sounding effects. You can randomly create a sound then there are lots of tools to tweak the sounds to make it exactly how you want.
I created some sounds and saved them as WAV files. I found they were too quiet so I loaded them into Audacity and used the Amplify feature to make them all the same volume.
The link to ChipTone is here
Not long to go now! Today I spent a couple of hours on the game, and added a few new features. Monsters now drop loot, either gold, spell scrolls or health potions. I added treasure chests which can be collected and give you gold.
I also added a title screen and instruction screen, did some graphics for the logo and the inventory screens. Also added a door which can be unlocked with keys. The goal of the game is to find the key then unlock the door to exit the maze, you can fight or avoid the monsters.
I still need to add keys into the game but then it's pretty much done. There will probably be bugs due to the time scale of creating a game in such a short period, but it's pretty playable right now. I also need to expand the map and make the maze bigger and more interesting.
I've put in collision detection so you can't walk through walls and I added some skull monsters, which roam the maze. If a monster sees you, it will walk towards you, otherwise it will go in one direction, until it hits a wall. It will then choose a random new direction.
It's all coming together now, next I need to add in some items which can be collected.
I have designed a simple map which is stored in an array, 0's represent corridors (empty space) and 1 is a wall. The player can face 4 directions, North, East, South and West. I am checking the player's X and Y position and their direction and drawing wall sprites from furthest away to nearest. Pressing left arrow and right arrow on the keyboard rotates the player 90 degrees and up moves forward. I have also put collision detection in, so you can't walk through walls.
I downloaded an Android app called Spectrum Eyes which takes photos and produces an 8-bit render of the image. This will be useful for monsters and items however I don't think I will be able to use it for all items. But I like the output, especially the skulls so maybe these will be one of the monsters.
I'm going to have a go at the Dungeon Challenge, and I thought I could produce a game in the time scale required. I have a confession to make, I have made a dungeon game before. Deepfall Dungeon was a game I wrote a few years ago and it was a retro style 3d dungeon adventure game. There are some differences and I am writing this new game from scratch. I learned a lot from before and I hope to put some of that to use in this project.
I recently watched Bandersnatch on Netflix and was inspired by the 8-bit dungeon game featured in that movie. The game is designed for the ZX Spectrum, one of the first machines I owned. So I decided to re-create a portion of that game which should fall within the remit of the challenge. I realised that a full game of this type will take a lot of work and time, which because of the strict limits of the challenge, would be difficult to achieve. I therefore decided to limit my design in the following ways -
1) A 3d sprite based game, with the look of an 8-bit game.
2) Limited sound effects, music and animation.
3) Limited graphics, often 2-tone to match the aesthetic of 8-bit systems.
4) Gameplay consisting of the bare minimum to make the game playable and fit the challenge.
With this decided upon, I started drawing some wall graphics, again taking inspiration from the on-screen game. You will see from the screen shot that the maze is divided up into squares and each square can be a solid wall or a corridor. Therefore we need a wall sprite for each position in relation to the player. In fact this would be a lot easier to design and program in true 3d but I wanted to do the game in the same manner as the original would have been. The wall pieces are then displayed on top of each other, from furthest the player to nearest. Monsters and enemies are then placed on top of this scene.
You will notice the pipes at the top of the screen, again this is just an animated sprite which is over-laid on top.
This is an old demo I put together for a Retro Remake competition, never did anything else with it.
Hi everyone, even though I haven't been blogging it, I have almost completed my latest game, Charge!
You play as a sorcerer on a tower who must defeat incoming enemies by throwing spells at them. The full game will have 20+ levels, story mode, 3 difficulty levels, extra weapons and spells.
You can download the 1 level demo from Gamejolt.
A departure from my usual ramblings, I'm going to share with you some of my favorite games which will never receive a sequel. Some games roll on and on, and have been with us since the dawn of gaming. And then you have the modern yearly updates which just roll on and on - Call of Duty, Need for Speed, Fifa. And of course, there are millions of obscure games which can only be considered a one-off. The following games, to my mind, could have easily become huge franchises, with more innovative features in each sequel.
Kingdoms of Amalur
A fantastic and under appreciated RPG, Kingdoms of Amalur was developed by Big Huge games, developed with help from fantasy writer R A Salvatore and Todd McFarlane. Big Huge was closed by their parent company just after Kingdoms was released.
Ico/Shadow of the Colossus
Team Ico produced the original Playstation 2 games and it seems they like to develop only original games. The Last Guardian has been in development for many years, and it may even see a release one day, so it looks like Ico 2 or Shadow 2 will be the last thing the company wants to concentrate on.
Second Sight featured innovative gameplay, you can use psychic powers to unravel a very interesting story. Developer Free Radical was also responsible for the Time Splitters series of games, and was wound down after the dreadful Haze.
Honorary mention - Psi-Ops
Blur was a fantastic game which managed to combine the shiny cars of Need for Speed with the multiplayer and power ups of Mario Kart. Activision closed the developer, Bizarre Creations, after they produced a poorly selling Bond game, Blood Stone.
Honorary mention - Split/Second
Games really struggle with facial animation, the subtleties of human movement mean it is really difficult to render a realistically moving face. Team Bondi wanted to remedy this and developed what they called MotionScan, which allowed them to render actors faces realistically in game. Throw in a huge open world, an incredible story and challenging puzzles and you have a huge and involving game. Unfortunately Team Bondi was badly run, with employees complaining of poor working conditions. Rockstar closed the studio in 2011.
As well as starting a new project, I am quite keen to keep supporting my existing games, to that end, I have updated Deepfall Dungeon with some new features -
New game mode - Game Plus
Various improvements and bug fixes
I have also produced a new video which shows off the game a bit better
You can download my game, for free, from my web site -
So now my game is complete, I'm ready to start another project. I've had a few ideas about game structure and what I want to do, but I haven't really settled on anything yet. I usually like to prototype my games, before I start them, this gives me an idea of how long the game will take to code, what the controls will be like, and I build it up from there.
For example, I wondered if I could do an 'outdoor' game so within a short while, I had a skybox up and running, with a terrain, some trees and a keyboard controlled camera.
I also had another idea of a 'bullet hell' style game, where instead of controlling a ship and dodging bullets, you would shoot bullets out and try to kill enemies. You would start off with a small amount of bullets and this would gradually increase until you were shooting hoards of bullets out.
I'd also like to have a go at writing a traditional horizontally scrolling shooter at some point.
My final thought was to create a 'retro' platform game, an 'homage' to the old ZX Spectrum games, but done in a modern style. To this end, I created a mapper and a scrolling, tiled 2d map and did some quick sprites on top.
I find this kind of prototyping really helps the development, it gives you a sense of what graphics and artwork you will need, helps with the control scheme and even highlights flaws in your game design - if something won't work or isn't fun then you can go back to the drawing board to fix it, without wasting a lot of time.
How do you guys go about deciding your next project? Am I alone in using this method? I'd love to know, drop some comments in below!
Deepfall Dungeon is a 3D first person fantasy role playing game. You have entered the dreaded Deepfall Dungeon and must find the exit! Along the way, you will fight monsters, find treasure, cast spells and build your character from a nobody to a legend! Will you make it out alive? Features - Hundreds of generated mazes - no two games are ever the same.. Ten different monster types, each requiring their own strategy to defeat. 3d graphics with a retro vibe. Download the demo from Mediafire, below.
I'm on the verge of releasing my game, I've been playtesting, balancing and bug fixing and it's almost ready.
To celebrate I'm showing you guys some concept and unused artwork, I always enjoy this kind of thing from proper devs, so enjoy!
It's been a while so I thought I'd post an update, still working away on the game, today I have been playtesting and balancing. I don't want it to be too difficult and I want it to get harder as you progress. So I have been playing it from the start, making sure there are enough health potions, that monsters don't hit you too hard, and that you can actually finish each level!
I did find one strange thing, it is almost impossible to die on the first level. I wanted to check my game loop and make sure it dropped you to the Game Over screen then back to the Title Screen, so I found a monster and stood there while he tried to hit me - it took a good 10 minutes and I still had 1HP left!
I guess it might have been a fluke, I will try and replicate it. The monsters get tougher though after the first level so it shouldn't be a problem after that.
Everything else is finished all the monster graphics and sound effects are in, all the spells and skills are in, I just need to do a little work on my menus and help screens and I'm done!
About time too because I'm way behind schedule.
On another note, I have been playing around with Unity, it's very easy to code for multiple platforms, I'm sure I will be using it for my next project.
But I need a holiday first!
Bye for now.....
LOD Games - Deepfall Dungeon
Wow, making an RPG is hard. I mean you have to be a master of databases and spreadsheets, just to keep track of everything. I have a list of 250 items, all of which can be customised, lists of monsters, to hit tables, spells, abilities, status effects and all these things have to interact with each other behind the scenes.
How do you keep the game challenging? And fun? If you give the player a +5 sword, will it make him overpowered and the next few levels will be too easy? What about if you give him +5 armour? If you don't drop the right weapon will the player get frustrated and just give up? How do you scale the experience so that the monsters get tougher as the player gets better? Do you base it on the players skill or the players Characters skill? Whoa.
I'm currently playtesting and asking myself these questions, but I definitely know one thing - my next game won't be an RPG!
I think I've figured out a few things -
Monsters strength will be based on the players level when he enters the dungeon. A level 5 character entering the dungeon will encounter level 5 and level 6 monsters.
The player should (on average) gain 1 level per dungeon.
Items will be randomly awarded during the level.
At the end of the level there will be a shop where you can sell unwanted items, buy new items and upgrade existing items.
There will be an element of skill when defending during combat, a correct keypress at the correct time will half the damage.
Attacks during combat will be based on a dice roll + the characters skill with the currently wielded weapon.
Found a horrible bug which only affected people who downloaded the demo (everybody then!). Apparently Windows does not let you save files to the installed program folder, and unfortunately that's where I was saving a text file which holds the controls and the screen resolution information. The game didn't error when it tried to save the information, it just didn't save. So when you changed screen resolution, quit the game and restarted, it defaulted back to 1024x768.
This wasn't a problem when I was testing locally because I was the owner/administrator. Eventually figured out you can save it into the %appdata% folder, so I moved my ini files into this location. Hopefully this won't cause any problems for people with older OS's (eg XP, Vista etc.).
I also re-drew the inventory screen, looks much nicer now and fits in with the rest of the GUI.
Otherwise, feedback from the demo has been positive, thanks to everybody who has downloaded it and tried it!