Monday, March 26, 2012

3D Minesweeper Game

As an interesting amalgamation of game design and algorithm development, I worked on a 3D minesweeper game in the past week.  It turned out pretty well, I think.  It has awesome explosions (when you click on a mine) and cute little red and white cubes with numbers on them.  You can also move the camera by using the W, A, S, and D keys as well as rotate and zoom in and out by using Q, E, Z, and X keys. 

The code design is facilitated by the use of recursive methods, which help reduce processing time tremendously.  Mines are generated randomly in a two-dimensional array that represents the grid.  Because the cubes are represented in a three-dimensional way, handling the user clicks was interesting.  When the user clicks on any point in the world, we perform what is called a raycast.  Raycast creates a ray of predefined length from the user's point of view in the direction of the position of the mouse click.  If the ray hits any cube, then we consider that cube to have been clicked.

I've tested this program up to 60 by 60 grid and it has worked beautifully with little lag.  Enjoy the screenshots!

I'll gladly provide with the download if you ask.







Saturday, March 24, 2012

M16 Model

Hello, everyone!  It's been a while again, but since the last post, I have some stuff to show you.

Recently, I finished a 3D model of an M16 Rifle.  I have quite an interest in guns, so modeling this one was quite a fun.

It's a rough sketch of the gun.  It's unskinned and lacks fine details that the gun has.  Since I'm just learning how to model, I'll save those for later.

Anyhow, please enjoy the renders!




Thursday, March 1, 2012

Work!

Hello, everyone!  I've not been able to post anything for a few months now.  I just wanted to let all know what's been going on in my life.

For the past few months, I had the privilege of having the opportunity to work with the mayor of Hartsville and create an iOS app that has the possibility to be sold to huge industries around the world.  Now, I can't really tell you what it's all about for the sake of business, so let's not get into that.

Basically, since 2012 started, I was busy scuba diving, doing tons of Govie schoolwork, meeting with the mayor, and programming for my app.  You know what's really cool about this app?  It's all a result of my own work.  I really didn't think I could do so much by myself, but I did, and I am rightfully proud of it.

I'll post screenshots of it at work once, hopefully, sales begin.  But until then, it's going under the radar.

So, that's the gist of how my life's been and probably will be for a little more until I finish revising the designs.  It was nice to write again!

Tuesday, December 13, 2011

Summer WIP

It's time for Christmas break!  The last few days have been quite hectic with all the exams, but I made it through.  Although I really should be relaxing right now (or maybe freaking out because MIT early action decisions are coming out this Saturday), I found a song that I started working on this past summer, but I never had the chance to finish.  Since I left all my recording equipment back at the school, I won't have the ability to finish it over the break.  Bummer!  Instead, I decided to upload what I have and let you guys enjoy the work in progress.

This song, called June WIP (for now), is a rock song that incorporates heavily distorted guitar, booming bass, and powerful drums.  I really had fun getting this song started.  I hope to get this song to where it's actually a song by finishing it up and adding vocals to it in the near future.

Anyways, enjoy!




Wednesday, December 7, 2011

Djikstra Algorithm Navigation Software

When you're on the road and want to go somewhere, usually you want to take the shortest route.  What's better than to have a program find it for you?  This week, I completed a program that does just that, given enough databases.

Coded in C++, this program uses the Djikstra algorithm to calculate the shortest distance and path from the source city to all possible destinations.  All the user needs to do is input the source city and it will calculate the shortest distances to all other cities that are available in the database (input.txt in the same folder as the executable file).

The download link to the file is below.  It contains a sample database that I created, and therefore the mileages are not accurate.  To install it, extract the contents of the zip file anywhere as long as the exe and input.txt are in the same directory.  The program should provide you with enough directions to get you started.  Simply type in the name of a city that appears on the command window.

Enjoy!

Download the program here.

Saturday, December 3, 2011

FTC Robotics

Now that we're finished with Zero Robotics, it's time for us to focus on FTC (FIRST Tech Challenge).  We plan on participating in a statewide tournament in February to qualify for the national championship. 

We went through a lot of design changes in the past few days to prepare for the scrimmage that took place yesterday at Aiken High School in Aiken.  The scrimmage was definitely a fun and very informative experience.  We learned about many technical problems that could arise during the match, and took immediate steps to fix them.  We also got used to the rules of the game and as a driver, I had the chance to see how good my skills were in operating the robot.  To be honest, they need work, but we still have plenty of time to play around with the bot. 

Overall, however, our robot worked quite well.  We went over there thinking, "We are going to get dominated by the other teams," but I am fortunate to say that we were wrong.  Our strongest point was the autonomous movement.  It was not reliable and the robot managed to perform what we wanted it to do for the autonomous period only half the time.  However, I think I figured out how I can go about fixing that issue, so I'm glad we had to chance to figure that out before the actual tournament.

I don't think our robot is very flashy in terms of the design, but it is a very high-capability robot in terms of scoring if we can learn how to navigate the field.  Focusing on the two high-scoring objects on the field, the bowling ball and the magnet balls, we can score tens of points quickly if we can efficiently harvest these objects.

The people were pleasant as well.  The referees were very informative and forgiving and helped us tremendously in understanding the rules.  The players were very professional.  Despite the stress that built up due to technical problems, they treated one another with respect and amiability.

The event eventually came to an end, and we packed up our robot and began our three-hour drive back home.  We learned a lot of things through this scrimmage.  I have high hopes for this tournament.  Maybe we can push ourselves to go farther than we were able to with Zero Robotics.  It'll take a ton of effort, but I think we can do it.   

Zero Robotics - The End

It's been a lot of work put into programming a bot for the zero robotics competition, but it came to an end today.  We placed 14th among teams from all over the world in the semifinals, and cannot advance to the finals (11th among the U.S competitors.  We had to be within top 9 among the U.S. alliances to advance.)  It's been fun, and although I am sorely disappointed, I'm glad we made it this far!  I wish I had known about this the year before.  It was hard to find time to work on this competition with rigorous schoolwork, so few of us who were able to work on it.  I'm sad, but I have to be happy with what I've earned.

So, congratulations to the finalists and best of luck to you!