CprE/IE/ME 557: Computer Graphics and Geometric Modeling

Final Project: Creating a Virtual Arcade

Adam Courchesne

 


Models:

For the final project I chose to implement a Virtual Arcade using the techniques learned in class.  I started the project by locating models for my arcade (as I wasn't about to create all the models on own!).  A quick Google search lead me to a MAME front end know as 3DArcade. The folks here were nice enough to post their models for all to use.
I then converted these MAX models to 3DS and created a 3DS supporting class using the 3DS loader code found on the GameTutorials.com website.  I managed to find a couple of bugs in their code but I managed to isolate them and get the class running smoothly.  I'm not very impressed with the 3DS format.  It doesn't support a ot of the nice features that new models do.  (Multi-texturing or having objects with multiple textures on different faces)  I tried exporting the models as OBJ's but 3DS Max kept crashing so I was forced to hand edit every model to make sure that they appeared correctly.  All in all it looked acceptable…..

 

Video:

One of the goals to this project was to also be able to play videos on the games' monitors themselves of the games being played.  Once again I went to the MAME community and was able to find a rater large collection of MAME attract videos, which depict what the games look like during their attract modes.  I then went to the NeHe site and grabbed the AVI tutorial code.  I tried playing my AVIs but it crashed as it wasn't able to get frames.  I quickly determined that I didn't have the proper codec installed.  Installing the MS MPEG4-V2 codec solved this problem.  (I included the codec in my submission in case you have the same problem).  Once I have the tutorial working, I created an AVI supporting class.  Lastly, I took these 2 classes and created a super class to represent an arcade game.

The arcade game knows which texture is mapped to monitor and can send the AVI texture to this object so that the videos are displayed properly.

Disco Effect:

The next step was to create a floor with a groovy disco lighting effect.  I did some quick searching about this effect and found that to create it properly, I would probably have to create a 3D light map.  Since the due date was upon me I chose to take the safe route and stick to 2D lights maps.  What does this mean?  You will only see the disco effect on the floor and walls and not on the games.  When I have more time I would love to revisit this.  I'd love to get the 3D effect truly working and create a tutorial for other to use.
I created a light map in Paint Shop Pro and make a simple floor class to encapsulate the drawing if the floor and blending of of the light map. Some use multitexturing, but since I want the entire light map on the floor to appear to be spinning, I found it made more sence to use blending.
I love the way this looks... I downloaded an amusement carpet sample off the web to use as my texture and the colors look great when the light moves across them.
(It looks best when the games are disabled)

Here’s what the floor looks like before the light map is applied:

 

Here’s what it looks like after it’s applied:



Once the wall was stable I copied the class code to create a wall class. The only difference being that the light map scrolls on the walls whereas it rotates on the floor.

Sound:

I had intended to get the sound effects my simply using the audio included in the AVI's.  The sounds' volumes  would be modulated as you walk closer to a specific game.  However I hadn't been able to find info on how to get the data into a usable format and time was short so I was able to find some ambient arcade sounds and have them playing in the background using Audiere.

Performance:

As soon as I loaded my arcade full of games my system began to crawl..  The disco lighting looked as if it was barely moving and the videos were noticeably skipping a lot of frames.  It occurred to me that I was drawing a ton of games that weren't even in view.  So I quickly modified the code so that anytime the camera is moved, every game is looked at to see if it is in view: if it is it is enabled to be drawn, if not it is disabled.  This sped things up dramatically.  It's not perfect but it's not supposed to be Quake3 either. :-)

Features:

The following keys allow you to move about the arcade:
w - up
s - down
a - left
d - right

By clicking and dragging with the left mouse button the user can rotate the camera.

Just about every feature can be enabled/disabled buy bringing up the GLUT menu (click the right mouse button)
I enabled culling as well so that you can move behind the south wall and look into the whole arcade.

Conclusion:

What can I say about this class other than it was honestly one of the best classes I have ever taken.  I was extremely impressed to Prof Sannier's expertice in this field and was also extremely grateful that he took the time to teach it to us in a way that we would understand and apply.  When you started the course you asked us what we wanted to get from the course and what we wanted to do once we completed it.  With the skills I've gained I plan to take a year and prepare a portfolio of OpenGL accomplishments so that I may someday enter the world of game development.  I honestly feel that this class has provided a solid foundation for me to excel my skills this area.
And with that... thanks again for a great semester, have a great holiday and new year!


 

Links:

Models:  http://3darcade.mameworld.net/
Videos: http://www.darrensweb.org/
Code Samples: http://nehe.gamedev.net/, http://www.gametutorials.com
Audio Lib: http://audiere.sourceforge.net/
Audio Samples: http://arcade.hofle.com/
PNG Code: http://www.fifi.org/doc/libglpng-dev/glpng.html