You Are Here: Home » AVR ATmega Projects » Game - Entertainment Projects » Cornell Hockey Using Atmel Mega32

Cornell Hockey Using Atmel Mega32




News

April 27, 2003

The project is due for us tomorrow, since we have the Monday evening lab slot. We spent a little time in the lab fixing the last few bugs, tweaking a little, and taking some pictures. We have an enclosure for the hardware so it’s not just a bare circuit board with connectors streaming out of it. All that remains is to go over this website, and that will be it. Sweet.

Cornell

April 25, 2003

Final weekend is approaching, and we’re pleased to say the game is almost complete. All the hardware is on the external board now, and it appears to work in standalone mode. All that remains are some final touches and a little testing. The text screens need some tweaking, and we have to iron out a couple bugs. Fortunately, we’re not going to have to spend every minute of the weekend fighting for a lab station. The end is in sight.

April 23, 2003

Finally tested the new external board. It seems to work so far, displaying an image on the screen. Unfortunately we haven’t hooked the controllers up yet, as this will make development more annoying (program the chip, pop it out of the STK500, put it in the new board, test, pop it out, ad nauseum). Also it has to run off batteries. We’ll have to look into getting a power connector so we can plug it in to power from a DC transformer.

The game itself is coming along nicely. We have actual goalies, rather than pong paddles. They look like the players, only their “features” are a bit wider to simulate padding, and they have slightly wider hockey sticks. The goalies can be controlled by an AI or by the player. The game now draws a small horizontal line under the player who has the puck. Before, the only way to really tell if you had the puck was by trying to shoot it.

 

We’ve been messing with period lengths. The timer will always count down from twenty minutes, but the clock will run a lot faster than a normal clock. The game now actually only lasts for 3 periods, rather than running forever. We’re working on intermediate screens to tell the player the game is over, who won, etc., as well as the start up screens for player selection.

It appears that we are going to have to scrap the idea of having a second player on each team. The logic for it is mostly already there, but unfortunately we’re starting to have problems doing everything we need to do in the small amount of time between drawing frames of video. Assembly optimisations might alleviate some of these problems, but at this point we’re not sure that it’s worth the time expenditure.

April 18, 2003
Game development progresses. The feature set has stabilised. Ryan has been working primarily on the code, improving the goalie AI and making it possible to switch between the player and the goalie. Rives has been working as an artisitic director of sorts, making C routines to draw the goalies (as he did with the players). He’s working on a way of visual notification of who has the puck as well.

We’ve begun work on an external minimised circuit board so the game can be played witout the STK500 development board. The STK500 has a lot of useful features for development, but none of them are necessary for the actual game. After it is complete we will only need the STK500 for programming the chip. Brian has been driving all over Ithaca to find parts. He’s also been working on some of the non-gameplay portions of the game (such as “end of period” notification screens, etc.).

April 14, 2003
We implemented the hockey portion of our game for One Skater on each team. Currently each team has one skater and no goalie. Players can shoot the puck as well as move around and steal the puck from the opponent. The puck was introduced to the game. The puck obeys all the laws of physics that you would imagine for a puck on ice. It experiences friction across the ice and experiences a “deadened” bounce off the walls. We also determined an acceptable way of drawing the players so that they look like actual hockey players. The players on one team always face the same direction so it is easy to tell which player(s) are on your team. We also drew a basic rink that allows our game to look more realistic. The players have variable Speed, Shot Power and Puck Handling Skills that determine their behavior during the game. We keep track of the number of goals that each team scores during the game. The major accomplishment is that we now have a game that is playable and enjoyable. Everything that we add on from here will just make the game much more fun to play!

We’ve decided to scrap our original plan of trying to do colour on the TV. We have two weeks to complete the project, and we don’t feel that we can make the game look good in that time. Also, with the hardware memory constraints, we don’t feel that the game would be as interesting or fun to play if we had to make the tradeoffs necessary to include color. Color is merely a visual effect, and would not improve actual gameplay.Hockey
April 7, 2003

We got the interface with the Sega Genesis controllers to work. We were successfully able to connect to the controllers and see all of the button pushes. Furthermore we were successfully able to decode all of the button presses and allow for multiple button presses to be read at the same time. We were then able to move a “player” around on the screen using the controller. We also soldered two DB-9 plugs that we can now use to plug the Controller into our board and then unplug the controller when we are done. This will save us from having to re-wire the controller each time we want to use it and also is much nicer than having to place wires into the controller.

We found out that the Professor had posted some code that would successfully create an image on the TV using the Mega32. We switched to using his code since it fixed some of the bugs that our TV code had, and included some assembly optimisations.

We also enabled sound for our game. We were successfully able to create a 2 octave C scale using some of the code that Professor Land had posted. We were able to create both the C scale and a crisp TV image after changing some of our TV code to output both the TV signal and the sound signal on the same port. We experimented a bit with resistor values to try to figure out what produced the best sound.

March 31, 2003
We set up the circuit that allows us to output to the TV. Since we need to switch from the Mega163 to the faster, more powerful Mega32 chip we had to modify the code that we used to create the correct synch pulses so that we can display images on the TV. We found that there were several differences between the two chips including subtle differences between the control and status registers. We spent the entire lab period looking over the documentation for the Mega32 and determining what the differences were that would have an impact on our project. At the end of the lab period we were successfully able to produce tear-free images on the TV using the new chip. Now that we are able to generate images on the TV screen we are ready to move onto the interface with our controllers.

 

For more detail: Cornell Hockey

Leave a Comment

You must be logged in to post a comment.

Read previous post:
Kepler: Your Best Home Gas Detector

Kepler is the best intelligent gas and carbon monoxide (CO) detector. Packed with powerful sensors, Kepler constantly monitors gas and...

Close
Scroll to top