Archive for June, 2009
So as some of you know I work for NetApp right now! One of my charters is to create tons of game prototypes. Yes yes i know NetApp has nothing to do with creating games. They are primarily a storage company; however, I work for NetApp University. So I was basically told to research and pitch ideas about gaming mixed with learning. To show them that it does not need to take FOREVER to make games or require tons of resources I spent 2 days creating this AS3 based flash platformer. It reads an XML file and then places platforms (and in the future other objects). They idea I pitched was akin to the Little Big Planet 2008 E3 presentation (below). Everyone seemed to like it.
Here is the source code. It is short and sweet (200 lines)! There is not enough source code using the Fisix Engine out there. Also platformers are the first thing everyone wants to do when they start making flash games. I hope this helps…
I used Flash Develop with the Flex SDK to compile. If you want to mess with it and add just add more platforms just open bin>levels>testlevel.xml and just follow the format for the platforms… I think there is artificial barrier set for the level at some point. Linux and Mac users need to edit the path before compiling.
So here is my solar system shader. The description is mostly all the in the video.
Features: models, tie intercepter, environment mapping, bump mapping, clouds, cell shading, per pixel lighting, multi-pass lighting and all of this controlled with the xbox 360 controller.
Here is the HLSL file: the shader
Here is a screen shot from my ray tracer. I have 2 triangle in the background (lighting isn’t very awesome on them), 2 spheres with specular lighting and shadows working. I am going to go back and add reflection and refraction one day. Like any other ray tracer this one works like this:
for each pixel
calculate ray, check if it intersects with any object
if it does find the color of that point on object determined by light position and whether it is behind something or not
else use background color.
So as far as the code… This is writen in C++ using almost completely C conventions. I am using OpenGL (a pretty early version). Its about 70% C 30% C++. Prior to writing this program my knowledge was pretty limited. I am going to fix this and make it 100% C style. For now though I am being a little lazy.
Here is the source. Not the most elegant C code, but it is easy to follow and it is CLEAN, and I think commented even. Also the project folder is a little messy. If you open the solution it looks pretty clean though.