Some mix between platform/adventure and tower-defence, probably.

I’ve had this new idea for quite some time: a platform game in which you have to defend your base from some monsters/aliens/animals/whatevers by placing offensive towers and that kind of stuff directly into the level.

I’ve been working on a first draft [sub](reasons why I’m pausing Alba available on my devlog)[/sub]. Don’t expect monsters or anything though, I’ve focused on the basic mechanics (jumping and what have you). I’m now moving on to world generation (I’m aiming for something simple but efficient and able to sustain large worlds) so I need tests to be ran from computers possibly more powerful than mine to see how much performance I can get and make procedural world generation based on that.

Grab this file from mega.nz to test the basic game :slight_smile: (unzip, launch Game.jar whilst having the native folder in the same directory)

Mandatory screenshot, although not very interesting graphically

I haven’t worked that much on graphics or gameplay yet, but I do have some nice particles… and the gameplay is currently jumping onto highs in order to not be hurt by the rising lava (which can, of course, be disabled; and most probably won’t be there in later builds).

Controls:
W- Jump (double, triple and quadruple jumps available - also you can break tiles above yourself by jumping into them)
A/D- Move left/right
S- Break tile directly beneath yourself
Tab- Key bindings
T- Display data
G- Reload world (only once T has already been pressed)
L- Enable/disable lava (only once T has already been pressed)
Escape- Close game (you may also use Alt-F4, or any key that unfocuses the frame)

So what I’d need is the two values at the top-left of your screen (only displayed once T has been pressed); namely, framerate (capped to 60) and percentage of time used for logic or render each second. Please feel free to comment on any other feature :slight_smile:

J0 :slight_smile:


C:\Users\Florian\Downloads>java -jar Game.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: C
:\Users\Florian\Downloads\native\lwjgl64.dll
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.load0(Unknown Source)
        at java.lang.System.load(Unknown Source)
        at org.lwjgl.Sys$1.run(Sys.java:70)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
        at org.lwjgl.Sys.loadLibrary(Sys.java:87)
        at org.lwjgl.Sys.<clinit>(Sys.java:117)
        at org.lwjgl.opengl.Display.<clinit>(Display.java:135)
        at sco.cmh.CMH.reinit(CMH.java:691)
        at sco.cmh.CMH.init(CMH.java:756)
        at sco.game.Main.main(Main.java:41)

The problem was it was trying to load natives from an invalid location, or natives were not included.

The project setup is this…
application.jar
natives/
res/
lib/

I don’t recommended that you pack the natives, res, or lib into the jar. The file system lets you use relative files from the binary directory.

This setup being the case,


	public static final String NATIVE_DIST;
	static {
		NATIVE_DIST = System.getProperty("os.name").split(" ")[0];
		System.setProperty("org.lwjgl.librarypath", new File("native/" + NATIVE_DIST).getAbsolutePath());
	}

as you can see you get the OS, and can split by the first space. Then you just order your distributions by that name. This is necessary to do because Windows comes up as Windows NT or Windows 8, etc.

Here is a list I compiled. I only verified that Windows works, as I have not split java’s return on a Linux, mac, etc.

  • Linux
  • Mac
  • Solaris
  • Windows

Right. Well… I guess that’s something. I may have forgotten to include some libraries, or to load them, maybe? I’ll have a look tomorrow once my exams are over :slight_smile:

Edit: This morning I woke up thinking, “Wait, did I put the natives inside the jar?” Then I checked and, yes. My baad! Now I’ve corrected it (just unzip Game.zip and launch Game.jar whilst being in same directory as native). If you still have the first jar I put here, you can just open in with WinRaR and get the native folder out then launch it.

Also, thanks Hydroque for pointing it out :slight_smile:

J0 :slight_smile:

At run time, it is still necessary to point to the natives. So if you didn’t do that, its still going to error regardless of where the natives are. So just make sure.

Yeah don’t worry :slight_smile: It’s just that I was pointing at the current directory but the natives were actually in the jar ::slight_smile: So getting them out solves the problem. I was distracted, that’s all ::slight_smile: