Jump to content
  • Advertisement
  • entries
    48
  • comments
    57
  • views
    43866

About this blog

Development of a 3D maze game

Entries in this blog

 

Wizardry

Damn! DAMNDAMNDAMNDAMN!!!!

http://www.youtube.c...h?v=G5xKt_M8zGQ

r1ckparker

r1ckparker

 

Website

New website is up, hopefully will add more information later, at the moment there's just some basic info and screen shots

http://deepfall.moonfruit.com/

Another job crossed off my list!

r1ckparker

r1ckparker

 

Waves and Collisions

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.  

r1ckparker

r1ckparker

 

Updates to existing games

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 -

Improved graphics
More monsters
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 -

http://deepfall.moonfruit.com/

r1ckparker

r1ckparker

 

Title music

As development continues, I've been forced to think about all the stuff as a gamer you don't usually think too much about, like UI graphics, icons, title screens, music, sound effects etc.

I've done some music for the title screen, which you can listen to below. I wanted to to be synth-y and slightly industrial. It's quite long and repetitive 'cos I figured that you would only hear the first few bars then you'd be pressing 'Start'. It gives a good indication as to the direction and feel of the game. Hope you like!

My title music

r1ckparker

r1ckparker

 

The importance of backups

This is just a reminder and some advice to all you developers, make sure you backup your data. Stop for a minute and think - what would happen if you lost your hard drive? If you were flooded? Shark attack:? OK maybe not but you get the idea. Something dramatic happens and your computer is trashed. Would you be able to start again? Would you have the motivation to start from scratch? It doesn't take much to protect yourself from the worst, and believe me, you will thank me one day.

1) buy a cheap 1gb memory stick and write on it 'Backup'. Don't use it for anything else.
2) Make sure you backup regularly. Once a week, once a month. Whenever. Just get into the routine of doing it.
3) Store your backup away from your computer. Put it in a different room in a safe place.

Thats it! You may be asking, why is he telling us this? Has something happened? Well no. But it could, and that's the point. You never know.

r1ckparker

r1ckparker

 

Starting the game from the beginning

Last week I did a bit of work on lighting and applying normals to my walls. This gives the impression that they are made up of more than just a flat polygon. However because the viewpoint is so fixed (at 90 degrees and no vertical movement) it's really difficult to tell that the normals are even there! I might take them out at some point in the future, or put in a switch so I can turn them off if necessary.

So with the pathfinding in place, my engine is just about complete. I've implemented -

Procedural level generation
Mapped level generation
Movement with collision detection
Item management, with equipment/inventory screen
Interactive objects (doors etc)
Wandering monsters
Combat
Heat management
Automapping

wow, there's a lot of work gone into that lot! My next step is to start putting in the game elements and making it fun. The first step is to design a 'tutorial' level which introduces the elements of the game, tells you how to play, what are the goals etc. When I was playtesting other dungeon games, I found this was a big let down for some of them, there was no help at all so you didn't know how to play the game, what keys to press, what the goals were etc. I'm a big fan of in-built help systems and I think they are especially useful in an RPG game.

So I have started programming the first level, it is mapped rather than generated so it will be the same every time. I have a portrait graphic and a script which runs and gives you the basics from your Mission Controller, 'Theora'.

By the way I found this wonderful site, really useful if you are struggling for art assets.

http://opengameart.org/blog

r1ckparker

r1ckparker

 

Spreadsheets

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.

r1ckparker

r1ckparker

 

Shaders

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! https://youtu.be/tGkFA_yZkQQ 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. https://youtu.be/idsRlIQDQXM

r1ckparker

r1ckparker

 

Psy post-mortem

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!

r1ckparker

r1ckparker

 

Psy - part 2

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.

r1ckparker

r1ckparker

 

Psy - Dungeon Challenge Game

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.  

r1ckparker

r1ckparker

 

Promotions

I wanted to have a bit of a break from programming, so I decided to start promoting my game. I've set a release date and made a Facebook page, updated the web site and added a link on the 'Announcements' forum.

Any other suggestions as to where I can post a link to my game?

I've been doing a lot of bug fixing, it seems that every time I play the game I add another thing to my list of things to fix. I'm quite organised and I have a 'to do' list which I cross off every item I've finished but the list still seems to be getting longer!

I've added a 'look' function, if you hold down the right mouse button, you can look around using the mouse, in a 1st person view. Usually the view is locked to 90 degrees. The player will never use it in-game, it's just there as an added feature.

web page -
http://www.deepfall.moonfruit.com

Facebook -
http://www.facebook.com/DeepfallDungeon

Announcement page -
https://www.gamedev.net/topic/627832-deepfall-dungeon/

r1ckparker

r1ckparker

 

Progress

I've not updated for a while, but I've been hard at work. I've added character stats and a character sheet, I've added keys and locked doors, icons for items, I've made a start on the combat and put some monsters in, it's coming along great now and starting to look like a proper game.

Screenshots and videos incoming!



r1ckparker

r1ckparker

 

Play Testing

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.....

Rick

LOD Games - Deepfall Dungeon

r1ckparker

r1ckparker

 

Perfect Circle

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 -      x=(radius*cos(angle))
    y=(radius*sin(angle)) Therefore I have an array of 10 objects which is calculated as follows -      cx=(230*cos(i*36))
    cy=(230*sin(i*36)) 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!  

r1ckparker

r1ckparker

 

Pathfinding

I've been on holiday this week, so not got much done. Last time I got monsters in and randomly walking around, but when they see the player they should walk towards him and this calls for pathfinding.

There's a fantastic page here which explains how it works.

http://www.policyalmanac.org/games/aStarTutorial.htm

I could have downloaded a library but I thought it would be better to do it myself. Also I couldn't drop it straight into the game, because it would be a nightmare to debug in first person! I therefore programmed it as a separate function and I can just drop it in now. It's my own version of the algorithm called 'A+' because you can't travel in diagonals, just on the x and y axis. This is because the game is grid based (like Dungeon Master or Eye of the Beholder for example).

Here is a demo video, the starting point is the green square and the finishing point is the red square. Purple squares are checked (on the open list) and the blue line is the final path.



So all I need to do is replace the green square with the monsters x,y and the red square with the players x,y and it should work...

r1ckparker

r1ckparker

 

Parallax Scrolling

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.  

r1ckparker

r1ckparker

 

Optimisation

The plan is that eventually the game will be ported to iPhone/android but currently the target is a netbook. These devices have quite low graphics capability and are slower than regular desktop machines.

I've been testing my game on my netbook and as I've been adding stuff its been gradually getting slower and slower. Today I've done some optimisation to hopefully make it run a bit quicker.

The maze is made up of a series of textured cubes. Where there is a wall, there is a cube of 6 sides and 12 polygons. This is wasteful because you never see the top and bottom of the cube, and if you are in a corridor, chances are you will never see the sides either.

So I have replaced the cubes with flat polygons, and I'm only drawing what I need. I'll do some comparisons on the netbook later to work out if this is faster. (it runs at a smooth 60 fps on my desktop regardless of which method I use)

Also, the entire maze is being built before the player starts and I'm just moving the camera around. I could just draw the maze as I get to it, instead of generating it all at once. However this is a big change and I will probably leave it for the moment and come back to this topic later.

r1ckparker

r1ckparker

 

New Project - the importance of prototyping?

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!

r1ckparker

r1ckparker

 

New Game - Charge!

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.

r1ckparker

r1ckparker

 

More updates...

I decided to make a 'to do' list of what is still left, and I was kind of depressed to discover that I could list 18 items just off the top of my head.

So I'm making a start on some of these, which includes a title screen, logo and proper name. Up until now it has just been '3d dungeon' or 'my game' but now it's

DEEPFALL DUNGEON

Hope you like the logo. A nice, generic, inoffensive name I hope you agree. A quick Google search reveals no other games with that name, that's about as much in depth as I can go without a legal department.

r1ckparker

r1ckparker

 

More bug fixing

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!

r1ckparker

r1ckparker

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!