Added my own splash screen

This commit is contained in:
Simon Brooke 2021-11-18 16:46:32 +00:00
parent ef2356b03f
commit 97beeb177e
No known key found for this signature in database
GPG key ID: A7A4F18D1D4DF987
7 changed files with 24 additions and 4 deletions

View file

@ -4,7 +4,7 @@ A game about avoiding climate catastrophe.
## Documentation ## Documentation
There is documentation [here](https://simon-brooke.github.io/climate-game/) There is documentation [here](https://simon-brooke.github.io/climate-game/).
## Warning ## Warning

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

View file

@ -10,9 +10,11 @@
(defn -main (defn -main
"This should be pretty simple." "This should be pretty simple."
[& args] [& args]
(let [app (ClimateGameApp.)] (let [app (ClimateGameApp.)
settings (app-settings true :title "The Climate Game")]
(try (try
(.setSettings app (app-settings true :title "The Climate Game")) (.setSettingsDialogImage settings "images/climategamesplash.png")
(.setSettings app settings)
(start app) (start app)
(catch Exception any (catch Exception any
(println (.getMessage any)) (println (.getMessage any))

View file

@ -1,10 +1,13 @@
package aaronperkins.planeteg; package aaronperkins.planeteg;
import com.jme3.math.FastMath;
import com.jme3.math.Vector3f; import com.jme3.math.Vector3f;
import com.jme3.scene.Mesh; import com.jme3.scene.Mesh;
import com.jme3.scene.VertexBuffer.Type; import com.jme3.scene.VertexBuffer.Type;
import com.jme3.terrain.heightmap.AbstractHeightMap;
import com.jme3.terrain.heightmap.ImageBasedHeightMap;
import com.jme3.texture.Texture;
import com.jme3.util.BufferUtils; import com.jme3.util.BufferUtils;
import com.jme3.math.FastMath;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
@ -169,6 +172,21 @@ public class PlanetMeshGen {
generateHeightmap( 750, 19580427, 30, 90, 25000, .8f, .3f ); generateHeightmap( 750, 19580427, 30, 90, 25000, .8f, .3f );
} }
/**
* Generate a heightmap from this heightmapImage. Added by simon@journeyman.cc, so that we can actually
* get planet Earth.
*
* NOTE: This doesn't even nearly work yet.
*
* @param heightmapImage the path of the asset to use: expected to be a monochrome heightmap
*/
public AbstractHeightMap generateHeightmap( Texture heightmapImage) {
AbstractHeightMap heightmap = new ImageBasedHeightMap(heightmapImage.getImage(), 1f);
heightmap.load();
return heightmap;
}
/** /**
* Create the heightmap for the planet. * Create the heightmap for the planet.