Labels

Search This Blog

Showing posts with label Project Examples. Show all posts
Showing posts with label Project Examples. Show all posts

Sunday, February 24, 2013

Project Examples: 3D Lightsaber Model

I apologize to anyone who wants to read this blog regularly as I have not had time to update it with a proper coding post in a few weeks. I am in the home stretch of my undergraduate work. All of my classes will be completed by the end of the spring term. Once that is done, I have two projects to complete for my degree, which will both be games. I am excited and cannot wait to complete them.

In the meantime, I wanted to show off a small project I did this week for a 3D modeling class. We are using Maya 2011 for the class. The project was to model a weapon using primitive polygon modeling. Since primitive polygons are great for modeling man-made objects, and since natural curvatures take a lot more time, I decided to model a lightsaber from the Star Wars series. Bonus points to anyone who can guess which movie and hilt I used as reference, but please note that some of the finer details are missing from the model.





The next stage of this modeling project will be to work on textures, modeling a character to use the weapon, and then finally to animate the scene. I'm not an artist, but I'm happy on how this one turned out.




Friday, January 18, 2013

Project Examples: Sudoku Solver with a GUI

Phase two of the Sudoku project is completed. The solver now has its own GUI, or graphical user interface. The interface was created in Adobe Flash and the Sudoku solver algorithm I wrote in C++ was ported to Actionscript 3.0. If you would like to see the C++ application in action, or view the source code for that application, the posts are available here:

Project Examples: A Sudoku Solver Implementation

Code Examples: SudokuPuzzle.h and SudokuPuzzle.cpp

Some minor changes were made to the code in order to accommodate the new input system. The grid that exists in the GUI is separate from the Sudoku puzzle that exists in memory as it was written for the C++ command-line application. There are simple methods in the Actionscript code that syncs the grid with the puzzle in memory.

The interface is very simple. Click on any box to enter a number. The solver will only accept valid entries. If an entry is not valid, the puzzle will not accept it. Any box that you click on will generate a list of valid candidates to assist the solver.

There are limitations that were carried over from the C++ code to the Actionscript version. For starters, if the solver is executed with too few given clues, then the solver has the potential to run for hours. I've added a check to the solver. If there are too many potential solutions, the solver will stop running and allow the user to keep editing the puzzle.

I've had successful test cases where 17 clues were given and over 4,000 solutions were found. The solver did not stop. In a case where 16 clues were given, and this was a very poorly designed puzzle, the solver stopped immediately.

This tool was designed to assist players in completing difficult Sudoku puzzles that are well-designed. Poorly designed puzzles may be unsolvable or contain too many potential solutions in order to let the solver generate them in a reasonable amount time (less than 3 minutes). If a poorly designed puzzle is entered, do not expect a solution to be found.

Please, feel free to test the new GUI for Sudoku Master. Still on my wish list is an algorithm that will generate new puzzles for users to try and solve, and the ability to save and load puzzles. For now, the existing framework will do for a small applet that will assist in solving puzzles.

 

Thursday, November 22, 2012

Project Examples: SWF Illustrating the Star, Starfield, and MessageBoxManager Classes

Here is an extremely early build for the game engine for Salvager: A Dredger's Tale. This build uses the Star, Starfield, and MessageBoxManager classes discussed and shared in previous posts. This build merely moves the game camera down and then creates a new message on the screen every few seconds. This is a build illustrating how to use the MessageBoxManager to show the main title and how to use the Star and Starfield classes to create a simple animated background.


 


Related posts:

Saturday, February 18, 2012

Project Examples: Klax'D

It's been more than a month since my last post. I have been extremely busy with college assignments. I thought today was a great day to update my blog. I am pleased to announce my first XNA Game Studio project was turned in for grading, and I would like to share it with all of you as well. The link to the file is included at the end of this post.

Klax was released in 1989 by Dave Akers and Mark Stephen Pierce. It is an action-puzzle game. My first XNA Game Studio project is a version of this game and I titled it Klax'D in homage to the original.

The game world consists of a conveyor belt, a paddle at the end of this belt, and a drop zone. The conveyor belt has five lanes. Bricks spawn at one end of the belt and move towards the end. The player can choose to catch these on his paddle or let them fall into the drop zone. The paddle can stack up to five bricks. The player can either drop the bottom brick or put the bottom brick at the top of the stack. If he drops the brick, it falls into an appropriate lane in the drop zone. The drop zone is able to hold 5 stacks of bricks. Each stack can hold 5 bricks. If a brick falls onto a stack that is full, it's game over. The player can remove bricks from the drop zone by matching like-colors. If three or more bricks with the same color form a line in any direction (vertical, horizontal, or diagonal) then those bricks are removed from the drop zone.

It's a simple game and a good one to code for a starter project. I will not share the source code for this project since I can get in trouble with the school for that, but I will be more than happy to share the finished compiled project. This game requires the appropriate .NET and XNA frameworks, which are included in the file if you don't already have them. The game will run on any Windows computer with a graphics card that is capable of rendering DX9 or higher. Please note this project is not digitally signed, so you should see a message asking if you trust the content of the file during the installation. If you are not comfortable with this, then do not install the game. There is no malware included in this file.

If you have an XNA Creator's Club membership, you can also run this project on your Xbox 360 through XNA Connect. If you want the Xbox version to try on your own console, send me an email and I will send you the .ccgame file to unpack to your Xbox.

Some of the features we focused on for this assignment were using the XNA framework to access the GPU, inclusion of very simple shaders, basic game loop architecture within the XNA framework, and using an established code base and building a game on top of that (for this project, we were given the Game State Management Sample code from the Microsoft Developer Network and used that as the starting framework). I built this game using one 3D model and added additional methods to the Screen class in the GSMS from MSDN.

Please download Klax'D from this link.