Program The rantings of a lunatic Scientist

Posts tagged as Ray Casting

3D Ray Casting

C/C++ GPGPU Graphics

Yup, the PhD is going that well…

I joke. So far it’s just been a lot of reading papers on graphics, most of which I do not understand. :(

Anyway, as a fun little side project I’ve been working on a 3D Ray Caster using my old favourites, OpenCL, OpenGL, and C++. It’s quite similar in concept to the renderer for my dissertation project last year but with a simplified rendering method and faster performance.

The goal for this project is to revisit Voxel Rendering which I played around with over the summer, and possibly to revisit game development with a new version of my Aliens First-Person Pacman game.

Currently the program has seven hardcoded Axis Aligned Bounding Boxes (AABB’s) which it renders as the camera orbits around them. I’m working on a method to organise AABB’s into a flat packed Oct-Tree which can be passed to the GPU. Once this is working it should be trivial to construct an AABB Oct-Tree of the CT Scanned skull I used before, or to construct a simple game.

Another thing I may look into is modifying the Aliens game to have textured floors and ceilings using floor-casting and possibly to have maps with multiple vertical levels.

Xenomorphs have hatched!

Game Dev Graphics Java

Okay I really need to get some sleep, it’s a quarter past 4 in the morning! But look! I’m really happy with progress on the game.

I’ve narrowed the premise down to a model that I am satisfied with. Here it is:

  • You are a lone marine trapped inside the LV426 Colony, your squad mates are presumed dead.
  • You are armed with an M41A Pulse Rifle but you have no bullets left!
  • There are four dead bodies of you fallen comrades laying around the map in the locations of the Pacman Mega-Pills. Each body has 1 magazines worth of salvageable ammo containing 25 bullets. (There are 100 total bullets per level)
  • The floor of the LV426 Colony is strewn with items that were knocked over or dropped when the chaos began, amidst the rubble you can find batteries to power your flashlight. (These batteries would be the normal pills from Pacman)
  • There is also a Motion Tracker at the location of the Pacman Cherry. The motion tracker will show the player the location and range of any Xenomorphs in the direction it is looking.

Pacman on LV426?

Game Dev Graphics Java

Yes that’s right! I’m working on First Person Pacman again!

And better yet, you can be too (if you are so inclined to) because the whole project is now available on Github!

I’ve decided that while the game is fun in it’s current state it is not scary enough. Don’t get me wrong, walking around a blind corner only to see a Ghost fly out and make a bee-Line straight for is pretty damn heart pumping but I feel like it can still be improved upon. Thus I propose we drop the lights, up the rust, and drop our little yellow hero into the hellish world that is LV426!

Edit Perhaps I could make it so you (Pacman) are the Xenomorph, being chased by the Marines (instead of Ghosts). You are injured so you cannot go on the offensive unless you feed on bodies laying around the map (the Mega-Pills from traditional Pacman)

I found some good ‘Aliens’ style wall textures just by googling them, I would credit the sources but it was obvious to me that the sites Google linked to were not the original sources, nor did they credit the artists. If anyone knows who they were then please email me.

I took the textures and duplicated them 4 times altering each one to make it subtly different.

Additionally with this set of walls I added a rust overlay to make it look more dilapidated. LV426 is not exactly a clean place to live.