Cosmic Lander [v6.1]


Hi guys!

Here's a prototype of game I'm working on my spare time.
The initial idea was to re-create a 'Lunar Lander' in it's more basic form, but it slowly evolved into something a bit more ambitious, with missions to fulfill & caves to explore.

I'm trying to keep the graphics simple, so far, in order to maintain a short development cycle.

sajid's picture

Looks great! Love the toon-shading.

François Gutherz's picture

Thanks Sajid!

The toon shading is really simple, I just hacked into the engine's shader :

  1. // Light diffuse contribution.
  2. float idiff = max(-dot(u_lvd, normal), 0.0);
  3. float idiff_original = idiff;
  4. if (idiff < 0.30) idiff = 0.0;
  5. if (idiff >= 0.35) idiff = 1.0;
  6. if (idiff >= 0.30 && idiff < 0.35)
  7. idiff = (idiff - 0.30) * 20.0;
  8. idiff = idiff * 0.65 + idiff_original * 0.35;

... and the cell edge is a copy of the mesh, a bit inflated, with its normals inverted.

PS. And it works better than Unity3D's builtin toon shading.

François Gutherz's picture

Yaye, the minimap is working (WIP), Achivement Unlocked !!!

I did that with the collision raycast function, it is so simple I wanna cry :p

  1. map_texture = EngineCreateTexture(g_engine, map_pixel_width, map_pixel_height, true)
  2. map_picture = TextureGetPicture(map_texture)
  3.  
  4. local x,y, world_x, world_y
  5. for(y = 0; y < map_pixel_height; y++)
  6. for(x = 0; x < map_pixel_width; x++)
  7. {
  8. world_x = bounding_box.min.x + ((x * max_real_width) / map_pixel_width)
  9. world_y = bounding_box.max.y - ((y * max_real_height) / map_pixel_height)
  10. local hit = SceneCollisionRaytrace(scene, Vector(world_x, world_y, Mtr(-5.0)), Vector(0,0,1), 3, CollisionTraceAll, Mtr(20))
  11. local _color
  12. if (hit.hit)
  13. _color = Vector(1,1,1,1)
  14. else
  15. _color = Vector(0,0,0,0)
  16. PictureSetPixel(map_picture, x, y, _color)
  17. }
  18.  
  19. TextureUpdate(map_texture)
  20.  
  21. local _ui
  22. _ui = SceneGetUI(scene)
  23. UIAddSprite(_ui, -1, map_texture, 1280 - map_pixel_width, 512, map_pixel_width, map_pixel_height)

Of course, this is really draft, I need to filter the items I want to trace, setup colors :)

Max's picture

Really beautiful beginning of the project.
I also like very much the kind toon shading. :)

Mr.Admin's picture

I agree, this is looking really good.
About the minimap do you plan on making it coarser?

I think it would look great with a "CRT" feel. You could achieve such an effect by stepping x and y 8 pixels at a time and pasting sprites into the texture instead of using a set pixel.

Great stuff !

François Gutherz's picture

Ah, right! I just did it with a BlitRect as you suggested. It doesn't look like a CRT, but more like some coarse hand-drawn map.
Thx guys for the nice comments.

Mr.Admin's picture

Whatever works! :D

Off-topic: The forum new post detection finally works, hooray \O/.

François Gutherz's picture

Update.

François Gutherz's picture

Haha, I really love how it looks like. Besides, it should help the player to remember & identify each level, as some sort of sign...

Maybe I should swap the positions of the level's name & the artifact counter?

Mr.Admin's picture

It's working great! If at all possible, you should display the player ship as well as the artifacts on the minimap as dots.
I don't think the scanner you have at the top of the screen works for that kind of gameplay. At the very least it doesn't look like it "belongs" to the game and could benefit from a scifi reskinning.

This minimap makes me think that it could be great to design levels using such a representation instead of the other way around. The only troublesome point would be on selecting the correct 3d block for a given dot in the minimap...

Pages