Just in case you’re wondering what the title means-it’s the name of our game. With the pitch coming up, we were adding the final touches to the game. We got an incredible amount of work done over the weekend and the day before the final pitch.
In order to take care of the clumsy player movement, I borrowed some of the code I used to make the enemy follow the player. We added the EMP button functionality the night before the pitch.
The pitch went smoothly and Roger actually called the game a “great” game, which could use some polishing and contrast. This final prototype was really fun. I absolutely loved my team. They were really appreciative and hard working. I hope i get to work with them for my thesis project 😀
All that’s left now is some polishing and publishing. Do download and play it. I’ll link it here when its out.
Even though I had the detection sorted out,the enemies’ cones were crossing over walls and detecting players behind them. I could not think of any other way to do the vision. But Dayna came up with a brilliant solution. Instead of having a single detection cone sprite which detected the player on collision, we could just have particles spewing from the enemies in the form of a cone. Each particle would destruct on collision with walls, and would detect the player if they collided with him.
The game looked a lot better once I had implemented Dayna’s idea. (Fun Face-The detection particles were actually micro banana sprites which i borrowed from my first prototype). I further developed code to make the enemies follow the player while avoiding obstacles( it involved creating a grid and checking which slots on it were occupied by the objects you wanted to avoid. The next step created a path between the enemy and the player and instructed the enemy to follow this path).
Sty developed the player movement and Dayna had developed a framework for creating levels and moving between rooms. Rody had some cool sounds up for the game and Travis made some textures for the levels. Since gamemaker path making didn’t involve code, Travis and Rody were more than happy to come up with level layout and paths.
We started thinking about power ups which we could put in the game and the first thought that popped up in my head was the decoy used by Green Beret in Commandos. I implemented that one along with a short teleportation skill.
We developed a memory manager for our engine as our final for the Game Engineering class. Memory management is a huge part of programming games, and being able to effectively store memory in a cache coherent manner is crucial in order to run complex code at the desired 60 fps.
Our memory manager would start off by allocating a large chunk of memory, and allocate blocks from it based on requests from the game. We would have to create a class which contains information about each block of memory allocated from this chunk( mainly, its address and size). We would keep aside a set amount of memory at the start of our chunk for these block descriptors. We would also maintain two linked lists- one to keep track of the blocks in use, and the other to track the free blocks. I also added guardbands around my memory blocks, to detect any memory stomps. Garbage would be collected every set number of free operations ( I chose to keep it at 5 free operations), and would simply look for free blocks which were adjacent to each other, and would collapse them into a single block.
We also discussed the usefulness of fixed block allocators, which do not need any garbage collection, as each block is the same size. Game engines make use of multiple fixed block allocators of varying sizes, to reduce the allocation overheads and upkeep for memory management. Here are some code samples from the manager
You can access all the files at my github account
Another prototype. Another tool. Gamemaker is a very simple tool to use, and can be used by non-engineers as well ( as long as they stick to its drag and drop features).
After a frustrating few days figuring out how things work in gamemaker(particularly objects and instances),I started getting the hang of it. We initially wanted to make a game with randomly generated terrain. But we felt that the scope was too large, and choose to keep it simple. I opted to work on the enemy AI(detection and paths) since I had worked on something similar for my previous prototype. I managed to get them moving around with vision cones reminiscent of commandos. Watching them move around, patrolling their areas ( after numerous failed attempts) was very satisfying.