LWJGL RTS

Warning its like 10meg.
Click to run WebStart

Please post your rig, and frames/ps or any issues you may run into. all feedback is greatly appreciated.
Press “F” during the game to view FRAMES PER SECOND.

Other Controls:
Escape: Menu on/off
Left Mouse: select button
Right Mouse: auto action
Mouse: move cursor or camera
MouseWheel: change camera angle.
MouseWheel + Shift: change camera zoom.
W,S,A,D: move camera
Q, E: rotate camera.
X: reset camera

Debug Options:
V: show wireframe on/off
B: enhance brightness on/off
N: normal mapping on/off
I,K,J,L,U,O: move lightsource

Other versions:
Safemode: Disables high quality special effects.


http://users.on.net/~bobjob/screen2.JPG

As well as the “Tower Defence” mode, it now also contains a “Campaign mode”, were you can control units to attack the other units.

Other Demos displaying engine suppoty:
Demo1: A basic bump map model viewer
Demo2: A short movie optomised for openGL performance.
Demo3: Water shader example.

Old Thread (Only Tower Defence):
http://www.java-gaming.org/index.php/topic,18410.0.html

Worked here, even on an intel video card.

You could probably make the player movement more intuitive by making warcraft3-like controls. ie left click selects units and right click tells them where to go or what to attack.

The graphics look good and the characters move pretty smoothly, nice

good to know it works with the intel video cards. Did the shader work(bump mapping).

yeah, im still meditating :-\ on a nice way to implement auto functions, so i dont have to go back later and re code it all

I got an ArrayIndexOutOfBoundsException the first time I launched the campaign but now it works.

Every time;

java.lang.ArrayIndexOutOfBoundsException: 0
	at game.GameServer.startGame(GameServer.java:549)
	at game.GameServer.singlePlayerInit(GameServer.java:230)
	at game.gui.Menu.newGame(Menu.java:151)
	at game.gui.Menu.menuSelect(Menu.java:210)
	at game.gui.Input.checkMouse(Input.java:270)
	at game.gui.GUI.logic(GUI.java:486)
	at game.gui.GUI.run(GUI.java:354)
	at game.gui.GUI.<init>(GUI.java:116)
	at game.gui.GUI.main(GUI.java:55)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.sun.javaws.Launcher.executeApplication(Unknown Source)
	at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
	at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
	at com.sun.javaws.Launcher.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

com.apple.JavaWebStart java.lang.ClassCastException: java.awt.image.DataBufferInt 
at game.loader.image.TextureLoader.loadImage(TextureLoader.java:303) 
at game.loader.image.TextureLoader.load(TextureLoader.java:129) 
at game.loader.image.TextureLoader.loadTexture2D(TextureLoader.java:62) 
at game.loader.image.Texture.loadTexture(Texture.java:113) 
at game.loader.image.Texture.loadTexture(Texture.java:75) 
at game.loader.image.Texture.loadTexture(Texture.java:101) 
at game.loader.image.Texture.loadTexture(Texture.java:44) 
at game.gui.Menu.initGraphics(Menu.java:389)  

Running on Mac OS X.

Out of curiosity: why did you want to use LWJGL directly instead of some scene graph like jMonkeyEngine?

worked for me, looks nice and runs smoothly, only thing is i feel too close to the objects, maybe set another camera a little farther out? can’t wait until there are some towers and stuff :slight_smile:

This may be due to a firewall being on. The game connects to the host via the network, in this case the local loopback address(127.0.0.1)

you can change the camera zoom with the mouseScroll + Shift, also W,S,A,D, Q, E

Im a bit worried about this one, Iv tried to write in a patch to use DataBufferInt in the texture loader. But I dont know if you operating System is Miss reading byte as Int, so therefore all i need to do is cast the int to a byte. Or if its reading 4 bytes as 1 Int. I patched it to do the latter.

I chose to go with just LWJGL, I guess I feel I have more control over what Im making. And if there is a problem I can go through and try fix it, because chances are its my own code. With a scene graph I may code something backwards (or something of the like) and get frustrated and never find out. I know the guys on the JME forums are helpful but I dont like to wait when fixing things.

People have firewalls…

As the game will eventually be made for net play the game should be unblocked anyway.

but I will make a way at the start to detect this and prompt the user to unblock the game.

Lol you could have found a better reason to refuse using JMonkeyEngine, it is reliable and personally, I succeeded in fixing almost all bugs (bugs that weren’t in the LWJGL renderer) I found on my way except one. You succeeded in doing something very good without it, LWJGL fits into your need for the moment, this would be an excellent reason not to switch to any engine. I think that, if you realize you begin rewriting features that already exist in lots of engines, then you should wonder whether you should still use directly LWJGL instead of using an engine that relies on it, JMonkeyEngine or another one. Good luck :slight_smile: Keep it up.

Cool thanx man. Yeah I understand if I wanted to get a game done relatively easy (which goes along well with one of the reasons I like java), JME would have been a way better option. But i really wanted to learn openGL and take that knowledge accross to any other language. Also Iv learnt so much along the way. Like in my FPS one of the first reasons i was extremely glad that i went with this approach, is when i had to shoot bullets or move the character against a triangle. The only reason I knew a way to do this effectively was because i was forced to learn some 3D math when building from the ground up.

u still working on this. I know it has been a while since last post but…

was kinda dissapointed when there was no1 online. this is a real good game. If you have stopped woht it, you should start back up. you have done a really good job.

thanx man, thats really encouraging.

Yeah im still working on the RTS engine.

heckboy if you wanna check out a good RTS made in LWJGL, download the tribal trouble demo. Its a really neat game.

would… but it would take 20 min to download(or acutally to run).

glad to hear you still working on it. I tried the first lvl, is there some sorta trick to it. cause the guy was simply stronger than mine. so it was impossible to win.

its not really playable just yet. I think Ill do all of the balancing last, there still alot of tweeks that need to be done.

I played the cutom game. When I put my mouse over the palces to build and such in the side bar. The description went ofscreen

so I had very little idea wat I was buying.

besides that though good game.

when I ran out of credits I did not lose. my credits just went to the negatives.

EDIT: I jsut lost at the end of the wave.

:stuck_out_tongue: yeah it needs alot of improving