Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

My secret project: Bling!

My secret project: Bling!

599 2
Well for the #gamedev/#graphicsdev/#physicsdev people this might not be a surprise but... I'm currently refitting my raytracer into a real-time raytracer, to use in a Pong! remake! =]

I'll be traveling a bit, visiting family, for the coming week. So I'm writing this in hope for responses and ideas.

I've got one little problem though... Speed. *now that's a big surprise isn't it* Here were my hopes for the stripped down simple version:

  1. Software rendered (the reason for the stripping).

  2. Top down view, no dynamic camera.

  3. No cheating, like faking AA (Anti Aliasing) by rendering to a big texture but rendering to a small quad (using OpenGL's hardware downsampling+AA).

  4. The puck is a sphere.

  5. The paddles are AABBs (Axis Aligned Bounding Box).

  6. A plane or rectangle for the "table" (background). No background is booring!

  7. The raytracing to be visible: reflections, specular highlights, etc.

  8. One light for the whole "table" and at least one more

  9. 30 FPS on my lappy (1.7ghz centrino, 512mb ram, nVidia geforce 5200)

  10. If I make texturing possible, the textures must be made procedurally. I.e. no premade textures in Gimp.

  11. Cross plattform, so no OS or CPU specific optimizations



I went with something like this:
ignore the fugly colors, the size of the ball, etc


But it seems like I will have to make a Uber stripped version :( The image there goes at 1.0-1.2 FPS, that's not precisely hellafast! And I don't even have any game mechanics in >_<

So I'm thinking about stripping out the "table", just that makes the game jump to 9FPS. Lowering the light count to 1 + ambient gives me .. nada noticable. Without the "table" there isn't much light to calculate anyway. So my goal is becoming more 1 sphere + 2 paddles, with whatever lights and colors I can use to make it cool. So far I have two specular models as material properties, Phong and Blinn, neither do any noticable difference in performance. And the lights can have either normal attenuation or linear, these doesn't do any speed difference either.

I'm open for all types of feasible ideas! And as a present, I'll let you take a peek at what I have which also allows you to play with the scene settings. Warning: the file is not very readable, you'll need the "translation" table below the links.

Bling! pre alpha render test (does not have any game logic)


camera_eye_pos3
camera_focus_pos3
camera_up_normal3

num_lights (must have at least 1, ambient)
light_pos3 color3 attenuation_model {0= const_lin_quad | 1= radis}
(repeat until num_lights)

num_pigments
{"solid" color3 | "checker" a_color3 b_color3 size1}

num_materials
ambient_coef diffuse_coef specular_coef shininess reflection_coef transmisson_coef refraction_index specular_model (0=phong, 1=blinn)

"_floor_" pigment_id material_id point3 normal3
"_puck_" pigment_id material_id "sphere" point3 radius
"_player1_" pigment_id material_id "aabb" 0 0 0 width height depth
"_player2_" pigment_id material_id "aabb" 0 0 0 width height depth

"_obstacles_" 0

Discussion

Loading comments...