menu

Texturing, Matrices and Quaternions

date_range 17/10/2011 21:20

With a graphics and math demonstration due sometime next week I’ve made a fairly quick start on a few new additions from last week’s simple terrain demonstration. Now having a basic idea of how vertices are laid out I’ve gone ahead and added textures as well as lighting to the DirectX demo as well as a custom made math library without the use of DirectX’s own math functions. Right now vectors and matrices are completely functional and can be manipulated in a numerous ways. Dot products, inverse (the picture above shows an inverse matrix), transpose, cross products, addition, subtraction and a few...

DirectX Terrain Generation

date_range 05/10/2011 22:38

Since a new post has been way overdue I’ve decided to post the first relatively interesting thing I could come up with. At the moment I’m learning a great deal regarding 3D rendering as well as some of the complex mathematics involved, such as four-dimensional matrix operations and quaternions, both of which are obviously very common in 3D development. Up until now, I’ve had the luxury of relying on game engines to do most of the complex work for me so this is quite new to me, and mind you, it won’t be particularly graphically interesting but it’s worth a...

Pac-Man

date_range 14/08/2011 16:24

So after approximately 3 weeks I finished Pac-Man with a fairly relaxed programming schedule. It comes with its fair share of bugs but overall it works well. It doesn’t include features such as fruit and other little features but the core components work. You can eat dots, you can be eaten, you can eat ghosts, ghosts chase you etc. There’s even a nice little easy way to add new levels although you’re likely to break it if it isn’t done right. If you decide to get adventurous and modify or add new levels using the format shown in the example...

Bugs

date_range 10/08/2011 21:53

Ghosts

date_range 05/08/2011 17:30

Now that my Pac-man assessment is due next week (as well as a whole lot of other assessment over the next two weeks) I’m starting to focus more and more on finishing Pac-man. It’s definitely getting there, with the only hard part here being to get the ghosts that I’ve added to follow the paths. After spending a solid 4 hours fixing Ghost #3 from mysteriously crashing the game using a cheap workaround, I got most of it working. The only problem that remains is that ghosts are having some serious issues getting stuck in corner. Hopefully I can get...

Expanding on Pathfinding

date_range 01/08/2011 21:33

With just under two weeks left to finish Pacman, I’m spending a bit more time on the game itself. Right now I actually have most of it done, including probably the most complex component which is the path finding. What I did today, besides getting collision detection and movement for the player as Pacman working, was making some changes to pathfinding. There are four ghosts (not yet done), each that have their own individual route to the player. As the operation is fairly expensive, it’s calculated every two seconds. You can see in the picture that the red and yellow...

Data Driven Programming & Dijkstra Pathfinding

date_range 24/07/2011 19:10

Coming up in about three weeks, I am to program a recreation of Pac-man. This is a fairly big step up from a simple arcade game like Breakout. I have previously worked with pathfinding in a 3D space using the Unity engine, although I must admit that Unity did a lot of the work for me. Here, I am using SFML and Dijkstra’s pathfinding algorithm to find the shortest route in a level. Additionally, I am using data driven programming for my level design, which is automatically processed at the program’s run-time to generate path nodes as well as different...

Text Rendering and Menu

date_range 26/06/2011 17:59

Now that I’ve got most of the core elements of the game finished, I’m actually doing some work on the game itself. I decided I’d implement the menu that I’ve been using as a test environment so far. The process was extremely easy and fast due to my previously implemented systems. The entity system and image systems are cleared, memory is freed, and the next scene is loaded. To accomplish this, I used a simple vector of SFML string objects to add a simple but nice looking mouseover colour change as well as the actual detection what text item was...

Collision Response Tweaking

date_range 25/06/2011 19:16

What I did not expect was for this process to take the time it did. Surprisingly the most difficult thing about breakout is calculating a predictable response from the ball hitting something. For the boundaries around the game area, I simply reverse the X or Y direction depending on which wall was it. For the paddle or the bricks it’s not so simple. Part of the expected functionality is to have the distance off the center of a brick or paddle affect the rebound effect. To make it even harder, velocity of the paddle also affects this. Fortunately, yet another...

Image System, Scene Manager & Memory Management

date_range 24/06/2011 20:12

I’m continuing to expand my code base for a project due in two weeks. The idea is to create a simple game of Breakout using SFML. The idea is easy and likewise the coding shouldn’t take very long. Surprisingly I actually spent the last 5 hours working on a base for it without even a single thing on screen. Essentially what I’m writing is somewhat of a subsidiary of SFML, or at least close to one. Closer to the end of my current trimester I’ll most likely be using the some functions that I’m writing now for a Pac-man project...