Starting Port of Old Mac Game Avara

I used to play the old MacOS 7/8/9 game Avara from Ambrosia religiously (back in the days of ISDN modems and 14" CRTs and 640x480). I’ve been pondering writing a clone of the game for the last 10 years or so and would like to give it yet another try with jME.





The game was very simple, had very primitive graphics, but was extremely fun. There are very few YouTube videos of the game to give some idea of what it was like:

http://www.youtube.com/watch?v=MoIIhpVXbJc


http://www.youtube.com/watch?v=jP1Dra-Ums0




It appears that jME could easily handle the graphics, tank-style input and simple bullet-style physics. I'll have to look in to networking later on, but I'm hoping that simple message passing for location will be good enough for a start.


I've created a new Eclipse project and gotten several of the samples running. I'm currently looking at getting an "infinite ground" geometry and figuring out how to best emulate the shading/lighting from the original game.


A couple questions to get the conversation going:
1) How do I switch from the Phong shader to a Flat shader?
2) When I get the physics set up, I'd like to make sure that the ground is infinite. Is there a way to do that without creating a very large geometry to attach to the physics model?


Thanks for your time!

ew mac :stuck_out_tongue:



1 - I don’t know much about shaders, but judging from the video you’d want to use Unshaded.j3md



Well for number 2, i think this may help, i’ve never used terramonkey though so i can’t give more details sorry, but you should just be able to use a flat terrain.



2 - http://hub.jmonkeyengine.org/2011/06/17/infinite-terrains-with-terraingrid-new-features-in-terramonkey/

Looks like I need to figure out how to use a flat shader. It looks like JME2 supported a way to set the shader but I can’t find a similar method in JME3. Any ideas for switching render modes?

There is really no such thing as “render modes” since everything is shaders. You switch shaders by changing the material.



But be careful what you mean by flat shaded… some will interpret that as unlit and others will interpret it as lit but not “smooth”, ie: the triangles will get brighter when facing a light source but will look flat. The second is function of your vertex normals. The first is just a matter of using “Unshaded.j3md” as your material as wezrule says.

pspeed said:
There is really no such thing as "render modes" since everything is shaders. You switch shaders by changing the material.

But be careful what you mean by flat shaded... some will interpret that as unlit and others will interpret it as lit but not "smooth", ie: the triangles will get brighter when facing a light source but will look flat. The second is function of your vertex normals. The first is just a matter of using "Unshaded.j3md" as your material as wezrule says.


I'm looking for "lit but not smooth" (which I understand is the same as "flat shading" when reading the Wikipedia article) based on vertex normals. Which buttons do I need to push to get the Lighting.j3md to behave that way?

Simply only use ambient light and no normal maps.

An easy way of doing this is just generating normals per triangle and not per vertex. If using Blender, just select “Flat” in the shading menu for the model

Momoko_Fan said:
An easy way of doing this is just generating normals per triangle and not per vertex. If using Blender, just select "Flat" in the shading menu for the model


How can I do that for models that I don't create in Blender? Right now I'm just creating JME Box and Sphere objects and adding them to the scene graph?

normen said:
Simply only use ambient light and no normal maps.


If I only use an ambient light then the cube has a uniform color on all sides.

I added an ambient light and two directional lights of different shades of white pointing in different directions to get the sides of the cube lit differently. I'll try expanding on this. Thanks all!

You can create a sphere in blender and then export that.