Skip Navigation Links

Menu:
 Game Start Page This presents the idea for the game, and starts the process of discussing the code of the random level generator.
 Rooms Data File - dgnRooms.py - stores the room configurations.
 Level Creation File - dgnLevel.py - creates a faux matrix, (it is really just a list), creates tunnels with random places designated as rooms, inserts the  rooms, then places the matrix into the dungeon.
 Tile Creation File - dgnTiles.py - This file creates the panels used as walls, ceilings, floors.  Both ceilings and floors are just one big piece, which optomizes performance.  This file works with dgnDungeon.py to create the dungeon.
 Dungeon Creation File - dgnDungeon.py -  Creates the dungeon using the dgnTiles.py file, each wall is created based on its orientation, which speeds up the building of the dungeon.
 Player Creation File - dgnPlayer.py - Creates the collision box, camera and spotlight.  The camera and spotlight are parented to the collision box.  The player is placed at a random position in the dungeon.
 Player Logic File - dgnLogic.py - Creates the controls for the movement of the character within the dungeon.  These are logic bricks, but are created via python code.
 The Main File - Archeus.py - This is the main file that runs all the other modules; this page also contains the file downloads.
 Geo - This is just a general purpose file I created, it is required, but I consider it to be an all-around utility file rather than part of the game, but you will find some usefull functions here.
 This code Copyright 2014 by Shawn Irwin. Anyone may use this code for any purpose as long as you give the author credit for his work.

 Нажмите здесь для перевода Google этой страницы на русский язык



Player Creation File - dgnPlayer.py - Creates the collision box, camera and spotlight.  The camera and spotlight are parented to the collision box.  The player is placed at a random position in the dungeon.  This code Copyright 2014 by Shawn Irwin. Anyone may use this code for any purpose as long as you give the author credit for his work.

Create player with a spot light, camera, and collision box, parent everything to the collision box, place the player in the dungeon.  This is one big function, so if you are stickler on programming procedure you may want to break it up.  My personal philosophy on this is that I can speed-code this way, and, if I start getting into trouble where things are not working like they should, I start breaking things up into smaller functions . . . . as you see in the level building file.  Note that some of the lines here are indented wrong for python, that is just because I needed to keep the JPG image file width down to fit on the web page.

Image not available


You will see tutorials on the web that take quite a long time to do all this . . . gotta love having coding experience, write it once, your done. Need to modify it?  No problem.

Image not available

Look at the WHILE statement below . . . I'm not sure there is a more efficient or formal way to do what I am doing here . . . but it works, you just have to be mindfull that True and False do not quite work as you would expect here.

Image not available


Copyright © 2012-2017 by TachuFind Color Master