Cross

http://th-media-lab.github.io/img/software/cross/cross-logo.png

A teaser page I setup for my school club to show what we’re doing:
http://th-media-lab.github.io/cross/

Cross is a sandbox engineering game where you can play around with physics, and test things that aren’t possible in real life. Or things that are! ( multiple play styles, amiright )? I’ve actually debated with others about it being a game engine or a game, and to you I say both!

Here’s a demo of the engine,

maSPhuHl_j8

Screenies:
FXAA & spot lights

Point lights & post-processing support

Extra info / FaQ
It’s running a OGL 2.0 dependency, & 3.0’s off-screen frame buffer support, for cross compatibility ( pun not intended )
The physics are JBullet, I don’t take credit for knowing anything about 3D collisions, but I do know how to physics.
Some things are batched, but not all. Mostly because of texture issues.
It’s lighting system is multi-pass forward rendered ( so it runs slowly, but is functional ) I intend to have it non-multipass but still unlimited in the future.

Planned features - in order of possible implementation
Shadow Mapping ( i have offscreen framebuffers implemented, so it shouldn’t be long )
High Dynamic Range post-processing
Maybe some kind of 3D model loading ( really scared of animation with this one )

Demo Controls
LMENU - Release Mouse
WASD - Movement

Demo for Week 2.5: https://bitbucket.org/ecumene/cross/downloads ( cross-demo-w2.5.zip )
I really don’t recommend looking at the source, it’s really… unpolished. I’m working on that.

:cranky: Really? Screenies? Are you a 12 year old girl? :stuck_out_tongue:

Other than that the tech demo looks beautiful, I wish I could do something like that. I kinda wanna play around with the engine right now.

I’m working on a tech demo. The real trouble is showing everything off without leaving any of the features out… I’ll probably have it out tomorrow or the day after.

Sweet!

New video demo in the OP! Working on putting together another build.

Demo for week 2.5 is in the OP!

Now includes:

  • A basic UI system with bitmap fonts
  • Higher FXAA sampling
  • Fixed log files not saving on escape key

meh …

java.lang.UnsupportedClassVersionError: thmedia/cross/Launcher : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Exception in thread "main"

$ java -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) Client VM (build 24.60-b09, mixed mode, sharing)

I compiled it with java 8 by accident ( My surface is using it ). You can get 1.8 if you want, but I’ll look into uploading it for 1.7.

Got this exception on mac.


Harshas-Mac-Pro:cross-demo-w2.5 sriharshachilakapati$ ./run-maybe.sh
[2014/12/04 14:21:03]  |sinfo|  : Starting cross game...
[2014/12/04 14:21:03]  |sinfo|  : System info: 
[2014/12/04 14:21:03]  |-----|  :  ... 
[2014/12/04 14:21:03]  |sinfo|  : java:   1.8, Oracle Corporation
[2014/12/04 14:21:03]  |sinfo|  : system: mac
[2014/12/04 14:21:03]  |-----|  :  ... 
Unable to compile shader:
ERROR: 0:85: '==' does not operate on 'float' and 'int'

[2014/12/04 14:21:03]  |strce|  : // Beginning stack trace, cause and message may point null
[2014/12/04 14:21:03]  |strce|  : {
[2014/12/04 14:21:03]  |strce|  : "class ecumene.EcuException" says "Unable to compile shader, GLSL error"
[2014/12/04 14:21:03]  |strce|  : -   call ecumene.opengl.shader.Shader.<init>(Shader.java:44)
[2014/12/04 14:21:03]  |strce|  : -   call ecumene.opengl.shader.Shader.<init>(Shader.java:57)
[2014/12/04 14:21:03]  |strce|  : -   call ecumene.opengl.shader.ShaderAsset.load(ShaderAsset.java:47)
[2014/12/04 14:21:03]  |strce|  : -   call ecumene.asset.Asset._load(Asset.java:31)
[2014/12/04 14:21:03]  |strce|  : -   call ecumene.asset.AssetLoader.load(AssetLoader.java:70)
[2014/12/04 14:21:03]  |strce|  : -   call ecumene.asset.AssetLoader.load(AssetLoader.java:83)
[2014/12/04 14:21:03]  |strce|  : -   call thmedia.cross.state.GameContext.init(GameContext.java:17)
[2014/12/04 14:21:03]  |strce|  : -   call thmedia.cross.state.world.WorldContext.init(WorldContext.java:117)
[2014/12/04 14:21:03]  |strce|  : -   call thmedia.cross.Launcher.setContext(Launcher.java:113)
[2014/12/04 14:21:03]  |strce|  : -   call thmedia.cross.Launcher.init(Launcher.java:49)
[2014/12/04 14:21:03]  |strce|  : -   call thmedia.cross.Launcher.<init>(Launcher.java:30)
[2014/12/04 14:21:03]  |strce|  : -   call thmedia.cross.Launcher.main(Launcher.java:128)
[2014/12/04 14:21:03]  |strce|  : }
[2014/12/04 14:21:03]  |strce|  : // End stack trace
Harshas-Mac-Pro:cross-demo-w2.5 sriharshachilakapati$ 

And, the code in [icode]run-maybe.sh[/icode] is error full. It is using MS BATCH syntax, not SHELL syntax.


-java -Djava.library.path="%~dp0/cross_lib/" -jar cross.jar
+java -Djava.library.path="cross_lib/" -jar cross.jar

The reason is [icode]%~dp0[/icode] is specific to Command Prompt.

Intel GLSL compilers doesn’t like it when floats are tested to integers. This is fixed now, but if you want, there’s a file in '/asset/shader/light.fsh" at the very end, there’s a test for the normal’s texel alpha to be null (or 0), and you can change 0 to 0.0. That should fix it.

Also fixed now, still learning shell script here… Thanks!

Great to know everything else is working though! I’m working on releasing a patched build compiled with a JRE 1.7 dependency.

Thanks, your fix (editing light.fsh) does work, but unfortunately the game doesn’t play since my GPU doesn’t support OpenGL 4(+) I see that you are using [icode]glTexStorage2D[/icode] which is from OpenGL 4.2, mine is stuck at 3.3 (Also do note that Mac will only support upto 4.1). And, in shell scripting, to get the directory of the script, you have to use this.


# Present working directory (the directory from
# which this script is invoked
DIR = $(pwd)

# The directory that contains this script. This is
# the equivalent of %~dp0 from windows batch syntax.
DIR = $(dirname $0)

Hope this helps…

Right, I’ll revert back to using the OpenGL GL11 null texture method. Thanks for the info! It’s the only OpenGL 4(+) call I have there.

Big news!

Now that the engine is finally polished enough for an actual level-system to be implemented, my friends and I have been brainstorming ways for the engine to load assets and describe levels in a user-friendly format. We’ve come up with the idea of loading a compressed archive into memory, then uncompressing it, allowing for a smaller read bottleneck while loading scenes & assets. We’ve called this compressed archive “.scaf”. For systematic cross archive format. It consists of some basic files such as:

packname.txt
The packages name, and whatever the creator want’s to display as a description

hash.txt
A hash of the file from every time it’s loaded, to tell if the file was changed & has to be loaded again

/scene/
[scenename].sml
A scenegraph markdown sheet in XML, describes the assets to load and scripts to run

/script/
[script].lua
LUA scripts control JBullet objects in Java. They also have access to change models, input and maybe shaders later /model/

/model/
[modelName].md5mesh
Describes shaders, models, and skeleton nodes (MD5 mesh)

/model/animation
[modelAnimation].md5anim
Describes what bones have to do per animation

We also plan to have a asset editor for packaging assets and viewing them. It should also help us with the tech debugging part too.

Just as an advice: For starters simply use the jar (i.e. “zip”) file format.
That fits perfectly with Java as it can be read and written using the Java API and even the ClassLoader, if in the class path.
I am also thinking about module systems such as OSGi, where it can be a dynamically loaded “bundle/plugin”, and what not.
And above all: It has excellent accessibility and support for reading/inspecting/writing from other tools/file manager (because being zip).
If compression factor is your main concern, than all that is of course only if you won’t come up with a better compression agorithm than deflate.