Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

My secret project: Bling!

Sign in to follow this  


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)


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

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

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
Sign in to follow this  


Recommended Comments

Cool project. I'm getting 0.6 fps on my geforce3 (behind the times, I know) but it looks quite pretty [smile].

Share this comment

Link to comment
Thanx! =) I spent a few days optimizing and got a stable 1.2 fps, sometimes above. But removing the floor (and thus almost all reflective) gives me 16-20 fps. The pong gameplay is pretty much done, just have to make that "spin the ball faster by moving the paddle when hitting the ball" feature Pong has.

But without the floor it really looks sooo ugly and "not raytraced" =( Guess I won't have any other option than to optimize for a certain platform (like intel cpu's) just for this. But if I want floor or anything else, I don't seem to have any other choice than to go HW with shaders =/

Also, I noticed something ugly. The white checkers doesn't react to the colored light but the black checkers do.. >_< this is because the way color addition is done. Haven't come up with a good solution yet... any ideas anyone?

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!