Source Code
This is the final project. For nearly each project, the Teencoder course has given me a starter to work on, but this time they are letting me program the whole thing. There was no hand holding, which is quite refreshing to say the least. All the course is providing is the graphics and sound. There are two Bumper Cars, and there is a coin that spawns randomly anywhere on the screen. The goal of the game is to collect 10 coins. I have included a rudimentary AI which figures out the quickest path to the coin, as well as a two player mode. While this game may seem very simple, I had to implement the background music, graphics, menus, and physics, as well as doing a lot of playtesting. I can't wait to move on from this and try a bigger game engine like Unity or Unreal Engine. Source Code
0 Comments
In chapter 13, I learned about splitscreen multiplayer games. While it would have been cool to work with netcode and design an online multiplayer game, I can see why this course does not cover online games. In C#, I used the "Viewport" class to follow the space ships and scroll them along the level. I also used Parallax scrolling, which is a system that uses different rates of movement for for objects different distances away. It gives my game a somewhat simplistic feeling of depth. The goal of the game is to reach the finish line. Whoever reaches the finish line first wins. Source Code In chapter 12 I learned about menus. Menus are very important, as they can hold multiple options for customizing the game, quitting the game, and of course playing the game. I designed a very basic menu for Tic Tac Toe. It may not seem like much, but you have to make sure everything works like it is supposed to. Source Code In chapter 11, I learned about random generation. Random generation is quite important for some programs and games. Minecraft is a popular example as its worlds are randomly generated. For my activity I had to create a program that would generate a maze randomly based on the parameters I set, and when ever I hit spacebar, a new maze is created and the computer predicts all the paths you can use to get to the exit. Seems quite simple, but a lot happens when you press that spacebar. Source Code In chapter 14, I learned about artificial intelligence. A good AI should be challenging, believable, and programmable. Sometimes, instead of improving how the games AI works, some developers just give the AI advantages over the player. Now I can see why developers do that, programming an AI can be very challenging. I improved StarRacer to have a fully functional AI. It will slowdown and navigate around asteroids. It is a pathfinding AI. It works sort of like the maze AI, but much more complex as there are no defined borders for the AI to navigate, and it must calculate a path in real time. In the video below, I am on the left while the AI is on the right. It isn't as good as me, but it is capable of reaching the finish line. Source Code In chapter 10, I learned about game physics. Very similar to real physics, but much more flexible since you don't have to follow any real life laws. Some things are also simplified, such as gravity just being positive acceleration downwards. In this game I made for the chapter 10 activity, there are two players. The goal is to hit the opposing player with a snowball and you win. Using very simple physics code, I can aim how high or how low I want to aim the ball, and I can hold down the space bar which will increase how much strength the player will use for each throw. I included my source code and a video below. Source Code In chapter 9, I implemented sound into the Swarm game. You hear when the bees fire stingers, when your shots or their shots hit the bunkers, when your shots hit the bees, and when the bee's shots hit the smokegun. and you hear buzzing sound effects from the bees. I can't depict sound using images, so I figured out how to do screen recording! I should be able to provide video footage of all my future projects, let me know if you encounter any issues. Source Code In chapter 8, I have animated the Swarm game. The bees now flap their wings, the smoke sprayer explodes when stung, and the puffs of smoke that the smoke sprayer fires are all animated. It wasn't that complicated, it was simply a matter of replacing the sprites with strips, sprites with more then one frame. As a result, the source code hasn't changed very much but it looks a lot better. Source Code In chapter 7 I finished the Swarm game I was working on last chapter. Earlier last year I was working on a game similar to this in GameMaker. This proved to be much harder though, as I had to code a lot of it from scratch, where GameMaker is GUI based, so you just drag and drop blocks of code and it stitches it together for you. The game works exactly like Space Invaders with the exception of high scores. I noticed that it is the first project in the game programming course that includes a win state and lose state. Source Code In this chapter I started coding a big project which will take up multiple sections, Swarm. It is basically a clone of Space Invaders, with the aliens being replaced with bees. This chapter it got me to program the bee flight path, slowly moving from left to right, hitting the edge of the screen, descending a bit, and then moving from right to left, over and over again until they reach the bottom of the screen. That is pretty much all I did this chapter, so nothing else to report. Unfinished Source Code |
AuthorI'm just a beginner programmer learning C#. I have set this archive up to see what I have learned over the years. Archives
June 2015
Categories |