Codename: Dragon

It’s taken me forever to get anywhere on my game, but I finally have a little to show. Here is an applet version:

http://www.esotericsoftware.com/dragon-applet/applet.html

When run it connects to my server and you get control of a random character (out of 15 total). If you find you are alone, you can run it again in a new tab in your browser. Click your character, click move or attack, then click an adjacent square to move or attack. You can only move 1 square at a time. A square must be occupied for an attack to happen. Once you are dead you stay connected but you no longer have a character to control. Click and drag to move the view of the map.

The game is destined for both the desktop and Android phones. I know the buttons to control your guy are non-intuitive, but it was quick. Right now it’s hard to tell which guy is actually yours. I’ll replace it with a better system soon. Mostly I just would like people to connect and mess around to see if there are any issues with the networking.

http://n4te.com/temp/dragon-projectile.png

no luck here, Nate .
it pops up a “Dragon Server” JFrame, wich prints


00:00 DEBUG: [kryonet] Broadcasted host discovery on port: 54777
00:01  INFO: [kryonet] Host discovery timed out.
00:02 DEBUG: [kryonet] Port 3352/TCP connected to: nateshome.dnsalias.com/98.237.143.225:54777
00:04 DEBUG: [kryonet] Unable to update connection: nulljava.net.SocketTimeoutException: Connected, but timed out during UDP registration.

	at com.esotericsoftware.kryonet.Client.connect(Client.java:190)
	at com.esotericsoftware.kryonet.Client.connect(Client.java:117)
	at com.esotericsoftware.dragon.Dragon.onStart(Dragon.java:86)
	at com.esotericsoftware.skorpios.opengl.DesktopGLView.start(DesktopGLView.java:73)
	at com.esotericsoftware.skorpios.opengl.AppletGLView$2$1.run(AppletGLView.java:39)

when I close it, the applet is pitch black and no response .

Hmm. Can you try again?

Cool, someone joined (mushroom) and I whacked them a couple times. Some synchronization problems though.

Worked fine for me.

[quote]Cool, someone joined (mushroom) and I whacked them a couple times. Some synchronization problems though.
[/quote]
Yeah that was me. I killed 2 people.

I got the same problem as teletubo.
I’m on a dual-booted ubuntu - installed yesterday.

Sorry:

[quote]java.io.IOException: Unable to connect to: nateshome.dnsalias.com/98.237.143.225:54777
at com.esotericsoftware.kryonet.TcpConnection.connect(TcpConnection.java:91)
at com.esotericsoftware.kryonet.Client.connect(Client.java:154)
at com.esotericsoftware.kryonet.Client.connect(Client.java:109)
at com.esotericsoftware.dragon.Dragon.onStart(Dragon.java:86)
at com.esotericsoftware.skorpios.opengl.DesktopGLView.start(DesktopGLView.java:73)
at com.esotericsoftware.skorpios.opengl.AppletGLView$2$1.run(AppletGLView.java:39)
Caused by: java.net.SocketTimeoutException
at sun.nio.ch.SocketAdaptor.connect(Unknown Source)
at com.esotericsoftware.kryonet.TcpConnection.connect(TcpConnection.java:76)
… 5 more
[/quote]
I will retry later at home.

I got:

Exception in thread "GL" com.esotericsoftware.skorpios.SkorpiosException: Error starting view.
	at com.esotericsoftware.skorpios.opengl.AppletGLView$2$1.run(AppletGLView.java:41)
Caused by: org.lwjgl.LWJGLException: Pixel format not accelerated
	at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)
	at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)
	at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:185)
	at org.lwjgl.opengl.Display.createWindow(Display.java:315)
	at org.lwjgl.opengl.Display.create(Display.java:855)
	at org.lwjgl.opengl.Display.create(Display.java:783)
	at org.lwjgl.opengl.Display.create(Display.java:764)
	at com.esotericsoftware.skorpios.opengl.AppletGLView$1.setupDisplay(AppletGLView.java:20)
	at com.esotericsoftware.skorpios.opengl.DesktopGLView.start(DesktopGLView.java:65)
	at com.esotericsoftware.skorpios.opengl.AppletGLView$2$1.run(AppletGLView.java:39)

I’ll try again when I get home.

Looks like a good start. I was able to kill myself with some sync issues, like for example my two characters each thought they had killed the other, then the both disappeared when the server caught up.


00:02 DEBUG: [kryonet] Broadcasted host discovery on port: 54777
00:02  INFO: [kryonet] Host discovery timed out.
00:03 DEBUG: [kryonet] Port 4099/TCP connected to: nateshome.dnsalias.com/98.237.143.225:54777
00:03  INFO: [kryonet] Connection 23 connected: nateshome.dnsalias.com/98.237.143.225
00:03 DEBUG: [kryonet] Connection 23 received TCP: AddCharacter
00:03 DEBUG: [kryonet] Connection 23 received TCP: AddCharacter
Exception in thread "GL" com.esotericsoftware.skorpios.SkorpiosException: OpenGL error: Invalid value
	at com.esotericsoftware.skorpios.opengl.GL.throwGLError(GL.java:50)
	at com.esotericsoftware.skorpios.opengl.DesktopGL.loadTexture(DesktopGL.java:46)
	at com.esotericsoftware.skorpios.opengl.Image.reload(Image.java:82)
	at com.esotericsoftware.skorpios.opengl.Image.<init>(Image.java:30)
	at com.esotericsoftware.dragon.AnimationManager.activate(AnimationManager.java:107)
	at com.esotericsoftware.dragon.Character.setAnimation(Character.java:63)
	at com.esotericsoftware.dragon.Dragon.applyAnimation(Dragon.java:97)
	at com.esotericsoftware.dragon.Dragon$1.apply(Dragon.java:56)
	at com.esotericsoftware.dragon.Dragon$2.received(Dragon.java:78)
	at com.esotericsoftware.kryonet.Listener$QueuedListener$3.run(Listener.java:107)
	at com.esotericsoftware.dragon.Dragon.render(Dragon.java:151)
	at com.esotericsoftware.skorpios.opengl.DesktopGLView.start(DesktopGLView.java:147)
	at com.esotericsoftware.skorpios.opengl.AppletGLView$2$1.run(AppletGLView.java:39)

Does this mean that ghetto integrated graphics won’t cut it?

This now works for me :slight_smile: it is a cool start

Nope sorry, same has Hsaka and BoBear… Windows 2000, old(ish) laptop :slight_smile:

Thanks everyone for trying it! :slight_smile:

gouessej, it looks like you were unable to establish a connection to my server. Any chance the problem is with your network?

Hsaka, “Pixel format not accelerated” looks like you don’t have OpenGL, is that possible?

Eli, any chance you can provide repro steps? :slight_smile:

BoBear2681, hmm. The line before the GL error check that failed is…


GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA8, width, height, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, buffer);

Anyone know if it would be better to pass GL11.GL_RGBA for internalFormat (3rd param)? However, the error check could be from an earlier call. On Android there is a way to turn on error checks after every GL call. Is there something like that for LWJGL?

steveyO, Hsaka and BoBear had different errors, which one did you get? I think BoBear’s error is fixable, but Hsaka’s is just a lack of OpenGL support.

The company I worked for had a reduction in force, so the satellite office I worked at got closed. Yay, more free time to work on my game! :slight_smile:

[quote]Hsaka, “Pixel format not accelerated” looks like you don’t have OpenGL, is that possible?
[/quote]
Can come from broken or old/beta drivers.

Heh, I was developing and saw someone was trying to connect. The version mismatch caused them to disconnect immediately though. I’ve updated the applet and I’ll do my development on a different port. :slight_smile: I’ve been doing a lot of work on the game’s framework, around abilities. I want to get that solid so I can go nuts adding ton of abilities. So it is mostly the same, with a better UI for choosing targets and a silly transition for the buttons. 8)

Not really, unfortunately. Basically, I had two browser windows open, each running the app, and each character attacked the other, then both of them died. This could be a logic issue rather than a sync issue (i.e. someone is allowed to finish an attack after they’re already dead).

Thanks Eli, I now handle that situation. :slight_smile:

I just updated the applet (and server) to the latest. Everything is significantly better. I can now add actions that affect the networked simulation with very little code. Abilities have cooldowns and the ability buttons have fancy shmancy animation. Everything is server enforced, ability usage, cooldowns, etc. Also, there is proper pathing, and any collisions during walking are server enforced. The slightly darker gray squares show which squares are occupied by a character.

I added heal and run abilities just for kicks. The heal ability has particle effects, though they are just hacked in. My next programming push will be all about making it easy to create new effects. The particle editor in Skorpios just needs some TLC. Effects include projectiles.

After effects, I will have to start thinking about gameplay. I have tons of ideas for that. I’ll probably use a point system similar to the various miniatures board games, except that I will allow character customization. Eg, you start with X points and you spend points to build a party of characters. You can also spend points to buy and/or customize abilities for your characters. This should add huge gameplay depth. The mage class could be tweaked to be a fire mage, ice mage, enchanter (buffs other characters), jack-of-all-trades, etc. This also helps squeeze more out of my limited number of sprites (~17). Balancing will be fun! :slight_smile:

I got a network timeout exception yesterday, but today it worked!

It works. Sometimes walking is stuttering a bit, sometimes teleporting. I think the client could guess more freely what the server are going to permit.

I saw strange texts flashing under one of my characters. “e etc” “addChi” or something like that. Another character hade some strange dot pattern under him. Some texture gone wrong?

A gameplay thing. Attacks should never need cooldown after I arrive! The one standing and waiting will always get the first hit. And sometimes he can just move away after that. But I guess it is to early for gameplay comments… :slight_smile:

I’m getting this error in my Java Console when trying to open the applet :

java.net.MalformedURLException: no protocol: lwjgl_util_applet.jar
at java.net.URL.(Unknown Source)
at java.net.URL.(Unknown Source)
at sun.plugin.util.GrayBoxPainter.setProgressFilter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.setupGrayBoxPainter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.access$600(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.net.MalformedURLException: no protocol: lzma.jar
at java.net.URL.(Unknown Source)
at java.net.URL.(Unknown Source)
at sun.plugin.util.GrayBoxPainter.setProgressFilter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.setupGrayBoxPainter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.access$600(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
exception: name.
java.lang.IllegalArgumentException: name
at sun.plugin2.applet.Applet2ClassLoader.addJar(Unknown Source)
at sun.plugin2.applet.Applet2Manager.loadJarFiles(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.IllegalArgumentException: name

This was with the browser chrome on a vista pc.
I’m running java version “1.6.0_04”.

markus.borbely, cool, thanks for trying it! :slight_smile:

Strange. The client asks the server if it can move along a path, the server sends a message to everyone saying to do so. After that, it is all client side, so the moving should be smooth, without stutter or teleporting. If an obstacle is encountered during the movement along the path, then the server sends a correction which will cause the blocked character to teleport to where they are supposed to be and stop moving. Were you seeing stuttering when walking with no one else on the server? I’ve simulated a random amount of lag, from 0 to 1 second, and it worked fine.

[quote]I saw strange texts flashing under one of my characters. “e etc” “addChi” or something like that. Another character hade some strange dot pattern under him. Some texture gone wrong?
[/quote]
Strange. I wonder if I’m doing something wrong somewhere. :confused:

[quote]A gameplay thing. Attacks should never need cooldown after I arrive! The one standing and waiting will always get the first hit. And sometimes he can just move away after that. But I guess it is to early for gameplay comments… :slight_smile:
[/quote]
Ha, yeah, the current cooldowns are mostly just to prove they are working. However, gameplay needs to be pretty slow I think, since you’ll be controlling a group of characters.

Dries, strange, I’ll post on the LWJGL forums about that problem. Thanks for reporting it!

Strange error, doesn’t seem like its anything to do with Nate’s code as its blowing up before it even runs the jars. Its likely some sort of java plugin bug. You are running a pretty old version of Java and still on the horrid java applet plugin1, you should update to the latest java version.