Main      Site Guide    
Message Forum
Game Engine Idea
Posted By: gremlinn, on host 204.210.32.78
Date: Monday, December 11, 2000, at 18:50:44

I was thinking of one of Sam's posts from a while back in which he said he might like to make a new game engine. Well, here's the idea of I've been thinking of.

How about a game engine which would encompass grid-based puzzle/adventure games such as Enchanted Forest and Exterminator? A game written to use this engine would consist of a rectangular grid, and each square would have a separate variable associated with it (like a state variable in the AGL engine). These variables could represent something really simple such as the particular graphic drawn for that square, or perhaps something more complicated. In addition, the game engine would keep track of a list of "objects" which can move throughout the grid from turn to turn.

For example, if one were to implement Enchanted Forest in an engine like this, state variables could keep track of whether a particular square was (unexplored, explored, tree, petrified tree), and the object list would consist of the player, the leviathan, and the pixie. For Exterminator, the state variable could represent (empty square, wreckage pile), and the object list would consist of the player and all of the robots.

At any given time, one object would be designated as the "control object", usually representing the player.

One file for each game would initialize the grid/object list (much like the 'start' file in AGL), and be either a fixed pattern (for example, a puzzle game grid), or a random generation as in EF. Another file would specify which graphic images are used for each square after every turn (this would depend on square state values, object positions, and possibly other global variables). There would be a separate file consisting of small graphic images, of course.

The main file, however, would handle the game logic itself (determining which options are available to the player, handling the results of a player's action, updating state values/object locations, etc.) and would consist of most of the programming. This could be done in a similar way to AGLL programming, I suppose.

I'm not sure if all of the preceding would be the best way to implement the idea, so I'll go into a few examples of games/puzzles that could be created fairly easily with such an engine:

(1) Mazes. This would probably be the easiest creation. Only one object (the player's position) would be necessary, and four state values (starting point, ending point, wall, open space). The game logic would be very simple (give the player the option to move in any direction where the adjacent square is not a wall or off the edge of the grid).

(2) A 'mine-sweeper'-type game. Again, only one object would be necessary. State values could represent unknown squares, open squares, squares marked as mines, and number-bearing squares signifying the number of adjacent mines. A bit more complicated to implement, but still fairly simple.

(3) Exterminator-type games, in which multiple objects occupy the grid. As an example, one could make a puzzle game in which your character must do things such as push blocks, flip switches, and use other tools to find the way to the exit. Anything that moves (such as the pushable blocks) would be represented as an object). The possibilities here are endless.

So, what does everyone think?

gremlinn

Replies To This Message