Next game started – Concept “Escape”

After a couple of weeks silent I’m now back for more regular updates.

In our new course Game Development – Introduction (I think it is called) we are to choose another groups concept and develop it to a working game. It is the same group as in Game Design – Introduction except that we got another member, a graphic artist, and we chose to take the concept “Escape”.

You are an agent and have to escape a building without getting caught. Image
It was one of very few concepts that were even remotely interesting. Most games, according to their pitches, sounded really strange and/or boring. I voted for Escape for my group because it sounded fun and had some interesting programming challenges.

What I’m working with at the moment is a Level-editor. It has been great fun, learning C# (C-sharp) and Windows Application Form. It was slow at start but I think I got some grip on it now. C# is pretty similar to C++, but still not. It is like a blend of C++ and Java, most of its syntax is good old C++, but everything is done in classes, like Java.

Another challenge I have been looking forward to is our lighting effects. Our game is to be a stealthy game so good lighting effects are high priority. We don’t want the player to be able to see through walls, doors and round corners. So I have been looking on different ways to make that happen.

First thing I found was something I think is called Ray-casting. Basically it is drawing lines straight out from the player, all around him/her, until they hit a wall. Even if that sounds good, it is not quite what we want.

Image

Another way to do it is looking for all the corners around the player. Then draw triangles with one corner always at the player, and the others either at obstacle-corners or, at the wall behind the corner, like the picture.

The last thing I think can be a challenge is the AI. It sounds like a good thing to use different states for them. The states could be:

  • Guard-patrol: The guard goes from waypoint to waypoint.
  • Guard-chase: When the guards sees the player he goes from patrolling into a chase mode where he tries to shoot the player if he can, otherwise moves toward the he/she’s last known position.
  • Guard-search: If the guard gets the where he last saw the player he will enter search mode. In this state he will pick a point within a certain range and go there, looking for the player. Over time it will start search in a wider and wider area, and at last, when he has search most of the level he will reset to Patrol mode.

As search algorithm both for finding a path to the next waypoint and for the search mode we will most likely use A* (A-star). It sound like it is the most popular choice for 2D-searches.

My goal for this week is to get the Level-editor good enough to work, read in the level from a couple of text-files the editor generates and get the player able to move detect collision with walls. Those goals were sat before we knew we could use a Level-editor, so my hope for getting everything done in time is not great, but I will do my best.