| 1 | # Overview |
| 2 | |
| 3 | Demo of an isometric game, using static images, using Castle Game Engine. |
| 4 | |
| 5 | Everything is just drawn as 2D, using our TDrawableImage. |
| 6 | |
| 7 | This could be made much more impressive by: |
| 8 | |
| 9 | - Using TCastleViewport for a game world, |
| 10 | and using inside TCastleScene with (possibly animated) models. |
| 11 | - And by providing more impressive game assets :) |
| 12 | - And by designing some interesting map (the current map is just a test). |
| 13 | |
| 14 | This effort is already started -- see `examples/isometric_game` for a new version. |
| 15 | We only keep this deprecated version to show alternative rendering method. |
| 16 | |
| 17 | # Keybindings |
| 18 | |
| 19 | * 12346789: |
| 20 | Move your character. These are comfortable to use on numpad when NumLock is ON. |
| 21 | |
| 22 | * up/down/right/left: |
| 23 | Move your character, if "view follows the player" mode is ON. |
| 24 | Otherwise, only move the view. |
| 25 | |
| 26 | * f: |
| 27 | Toggle "view follows the player" mode. Initially it's ON. |
| 28 | |
| 29 | * Escape: |
| 30 | Exit. |
| 31 | |
| 32 | * e: |
| 33 | Edit base tile. |
| 34 | |
| 35 | * E: |
| 36 | Edit bonus tile. |
| 37 | |
| 38 | * s: |
| 39 | Save current map to the file. Together with "e" and "E" keys, |
| 40 | this allows you to design new levels completely inside the game. |
| 41 | |
| 42 | * i: |
| 43 | Field info. |
| 44 | |
| 45 | # Map file format |
| 46 | |
| 47 | Design considerations: |
| 48 | - This was reused as a programming exercise (PGK exercise on ii.uni.wroc.pl, |
| 49 | where Michalis was a lecturer), so I wanted some simple text format. |
| 50 | Simple to read by code. |
| 51 | And simple to design even when you don't have a visual editor. |
| 52 | - Tile filenames and counts must be specified inside the file, |
| 53 | to make it flexible. |
| 54 | |
| 55 | The map file looks like this: |
| 56 | |
| 57 | ``` |
| 58 | Width Height |
| 59 | PlayerStartX PlayerStartY |
| 60 | BaseTilesCount BonusTilesCount |
| 61 | # Now BaseTilesCount lines follow, describing the tiles used on this map. |
| 62 | # The idea is that each tile corresponds to a different image filename. |
| 63 | # Each tile also has a one-char name, that will be used to indicate this |
| 64 | # tile later on the map. This one-char is any non-whitespace character |
| 65 | # besides the "_". |
| 66 | BaseChar1 BaseTileFileName1 |
| 67 | ... |
| 68 | BonusChar1 BonusTileFileName1 |
| 69 | .... |
| 70 | # Now Height map lines follow. Each line has exactly 2*Width |
| 71 | # characters. First char of each pair indicates the base tile, |
| 72 | # second char indicates the bonus tile (or _ if no bonus tile). |
| 73 | # Lines are specified from highest to lowest (so the resulting game |
| 74 | # screen looks roughly like your text file). |
| 75 | ... |
| 76 | ``` |
| 77 | |
| 78 | # TODO |
| 79 | |
| 80 | Well, obviously, this is not a real game :) |
| 81 | |
| 82 | There's nothing besides the player and the *absolutely static* level. |
| 83 | A whole lot of things should be done to turn this into a real game: |
| 84 | |
| 85 | - Collisions. Right now you can move freely everywhere, |
| 86 | pass through walls etc. |
| 87 | - Player's sprite should animate (making steps) when moving. |
| 88 | Maybe using TSprite, maybe using TCastleScene inside TCastleViewport. |
| 89 | - Creatures (probably sharing most of the current TPlayer class code, |
| 90 | to make them move smoothly, be shown from various directions, |
| 91 | show animations of moving). Fighting and/or talking and/or trading |
| 92 | with the player, at least. Talking choices and/or free talk a'la Wizardry |
| 93 | and/or giving quests. |
| 94 | - Items (pick, drop, show inv, use, |
| 95 | equip (change player's sprite), show equip, unequip). |
| 96 | - Changing levels (maps) --- at least things disappearing/appearing on the map |
| 97 | when player does something (open door). |
| 98 | |
| 99 | Michalis Kamburelis |
| 100 | https://castle-engine.io/ |