The GINI the M: Dogs

In the meantime I managed to switch to LWJGL. The link to the webstart:
http://www.nope.tv/dogs/
The thingy is still somewhat buggy and not entirely complete - but playable.

If the game crashes, I’d be very happy if you could open the java console and paste the stacktrace to me.

Ah yes, instructions:
Initially the cursor keys allow you to navigate your ship.
When close to a shop try to halt your ship completely (or press backspace to get that done for $).
Hit “E” to enter a shop. Click on the ship components (new / old) and add them to your ship. Use the box on the top left to assign keys to ship-segments (to activate them in the game).
Don’t forget to add weapons to your cannons. they’re on the bottom of the list.
“F1” opens the chat console
“esc” opens the menu
“N” switches between ships, if you have more than one.

There will be a complete manual later on.


Hello folks.
I’ve been developing my game for quite some time now. Now I would like to share my progress.
You will find a preview on my YouTube Channel: http://www.youtube.com/user/theGINItheM

Thanks for commenting!

Some specs:
I don’t use GOGL or LWJGL, only CPU and standard Java.
It’s a MMO which will be online in a few month.

Cheers! J

See reply #9 for the link to a jar.

oh nice, seems pretty interesting, look forward to playing it.

Damint, I had pretty much the same ideas for a game :slight_smile:

Oh! Sorry - I guess :wink:
But I would encourage you to go ahead. I tried to fit too many game ideas into this one. The project became huge and too much to bear for a single programmer… I’m not sure whether I ever get the thing ready for use to “a broad public”.

If you’re interested, here are a few things that I learned:
§. I use an SQL DB on the server to keep track of the positions of the spaceships and their parts. For this reason I also do the collision detection using SQL queries. This made things easy as I could avoid iterations in my code but made it impossible to use “sweep and prune” etc. I wouldn’t use SQL if I started today. However, a bonus is, that if my server crashes (which of course /emph{never} happens) all the player data and ships are stored safely.
§. My client is a “thin” client. It only plots data which is received from the server. Bad idea. Lags make it very difficult to keep control over your spaceship. And furthermore, I had to write my own ZipStream for the C/S communication. The Java standard ZipStream and GZipStream must be closed in order to flush the data. And I need a zipped stream because the amount of data is just immense.
§. I developed an interface to allow other programmers (you guys :wink: ) to implement their own AI. This was the original idea of the game: People don’t play themselves, they let their computers play - unless they want to do it themselves. I turned out that the complexity of the game is hard to control. Don’t bother writing such an interface.
§. When your spaceship is hit by some enemy cannon and some centerpiece is destroyed it might split into 1-4 fragments. I had the idea that the player can control every single fragment (as you can see in the "Battle Strategies Part II movie on YT). Rarely are the fragments controllable. So I would have to think about this again when I started today…

Anyway, I’d be glad to share a few more of my problems / code if you’re interested…

Cheers, J

Wow… Nice…

I made a space conquest game called Mortification for the PC using DirectX from 1995-2000 in my spare time.

The scope was too big for one person. As such I have gone through the same suffering as you before.

So, I would advise you to prune the incomplete features balance the gameplay and release it immediately.

Then try to forget about it over the next few years, and hope you can push it out of your memory so it won’t give you nightmares.

I promise a released product will give you more peace of mind. Then never take on a project you can’t prototype in 2 weeks or complete in 3-4 months. If you don’t you could lose your mind.

Why not take advantage of the hardware?

I’ve only seen 3 of your videos on youtube, and from those it seems like a cool game. I have no idea what the actual goal here is, than defeating opponents and laughing at them?
Has development stopped?

@ tberthel:
Thanks for your advice. I’m not yet ready to rip functionality off “my baby” in order to get it released earlier :slight_smile: . But what you say is true and I will have to work more “goal oriented” in my next project. I think 3-4 is a good rule of thumb.

Anyway, my hopes are not yet lost that I can publish it before mid this year…

@ Mads:
Agreed. Next time I’ll use the hardware. I’m already working on some shaders for my Android smartphone. This time, I just wanted to learn a few things about optimization…

Anyway, I developed the game on a Mac (don’t hit me!). Mac is usually about three steps behind when it comes to OpenGL standards. After playing around with JOGL a little I decided to “finish” the thing using the CPU only.

Ah yes. “No”, development has not stopped. I’ll be done in a month or so.

The “goal” of the game: Earn more cash and build a stronger ship. And possibly be better than you’re enemies (at building a ship, navigation and leading war). So in respect to the “goal”, it’s close to a shooter game.
There is actually no “you saved the princess” moment, so you can play forever. In contrary, there is also no “game over” moment.

OpenGL 3 is still not available on Mac so Mac is behind lol. I advise you to use the latest build of JOGL 2.0. Let us know whether you have any problem.

I uploaded a pre-release of the game. You find the jar at
http://www.nope.tv/dogs/Dogs.jar
and it can be executed using
java -jar -Xms128M -Xmx256M Dogs.jar

Please note the following:

  • Passwords are stored in plain text on my database. And I will look at the list, so don’t use your standard password :smiley:
  • The server is close to the main European backbone. I noticed that from Switzerland I had decent ping delays but from Singapore it took some time. I hope the game is at least somewhat playable internationally.
  • The game is still under development. Consider this a pre-alpha release and don’t expect very intuitive controls
  • I will take down the server from time to time.
  • The game requires at least a dual core computer at 2.5 GHtz. I am thinking about working with JoGL in the future, but that’ll take some time.

Buttons you need to remember:
“E”: to enter a shop
“Esc”: to open the menu (allows you to quit etc).
Cursor keys: Navigate the initial ship.
“§”: Open the chat console.
“Return”: After you typed in a username, password and selected a group, hit “Return” to start the game.

Let me know if you have problems.

Cheers, J

I’m very glad you released this so we can try it! I’m just a little sad you forgot to add Denmark as country :stuck_out_tongue: Will report back when I play it a bit. I’ll just say that I’m from sweden…

I stumbled over some stuff while playing:

  • I crashed when hitting “enter” or “tab” while typing my username.
  • I couldn’t log in. When I press the arrow, I get to see the title screen again (loaded this time).

Hehe. The game takes place in a distant future. Denmark will be part of the grand empire of Switzerland then. Besides, they pretty much have the same flag…
No, I’m just not yet finished adding all countries. Initially, I wanted to allow the players design their own logo. That’s why the flags only occupy 3*3 pixels - to disallow “vulgar” logos. :slight_smile:

Anyway, some other players reported bad ping delays or they had problems with the performance. I hope this doesn’t happen for everybody…

@Mads: Did you select a nation? Do you have some stack trace for the crash?
The “arrow” is the “back” button - it will be used throughout the game… I should’ve added a “proceed” button as well instead of expecting people to hit “enter”… Will do!

I think it was because I assumed the arrow to be the “login/register” button instead of the “cancel”.
Now I could log in! My ping is around 75.

The tseering of my ship was very bad hard, because it was not really responsive and the different arrowkeys behavior was really weird. I think “up” makes the two motors on the back of the ship run, but then I can’t steer to change direction.

I hit a border or something, which made my ship invisible/flashingly invisible. Then I just floated around for a bit, and saw a black hole (I suppose it was), and a green-star galaxy thing. The effects are really cool.
When I floated around there was nill response from keypresses, and I got this in the console:
13-02-2011 10:26:02 com.games4j.lizard.Game playGame
INFO: frame underrun 116011832

EDIT: Hitting enter while loggin in with no password makes it crash for me, without anything in the console.
EDIT2: Wait a minutte, let me just upload a video 'cause the behavior is undescribeable :stuck_out_tongue:

EDIT3: Here is a video that shows the weird steering :stuck_out_tongue:

Hi Mads,
thanks for taking the time to record this into a video.
I came across this behavior as well. I believe it started when I changed some star/lighting related method to be not synchronized anymore. It happened quite rarely on my computer, so I didn’t pay too much attention to it. Apparently a wrong decision.

The console dump you attached does not belong to my game. Must be something you did earlier :slight_smile:

Two questions to help me analyze:
a) Your ping of 75: Is that using the standard ICMP ping or the one during the startup of my game?
b) How many cores / processors / hyper-threading “pipes” does your computer have and what’s its speed?

A general question to everyone: How many threads are still ok and what is just too many for a java game? Is there a rule of thumb?

Oh snap… I don’t even use my eyes… That was from ealier… :stuck_out_tongue:

My ping is between 56 - 75 according to the startup screen of your game.
My computer has one processor, which has two cores of 1828.3 MHz :smiley:

I see. The reason for the game running so, ahem, shaky on your system is { your CPU / my optimization skills }, pick one.
I’m currently implementing some changes on both client and server side. Maybe I’ll remove some effects to make the game run smoother on “slow” machines as well.

One more reason why I did not use JOGL is that I was not really able to fit the state-machine style programming into my object oriented code. The drawing routines are all over the place - all classes that correspond to a graphical effect or so have their own “drawMe(Graphics2D G)” method. Will be quite tedious to get this into JOGL and therefore make it run fast on slower machines…

Normally I don’t classify this as a “slow” machine… I can run stuff like Fallout: New Vegas, which should be more critic, with a very nice FPS (no visible lags).

Try Slick2D then :smiley: It’s “based-on”/“built on” lwjgl, which also has OpenGL bindings. The great thing about Slick2D is that it’s API look very similar to Java2D which makes conversion alot easier. Take a look at it :wink:

Hi Mads
I din’t mean to insult your machine :wink:
Anyway, I looked at Slick2D. While it seems to be very nice and easy to handle, it does not offer all the functionality I require. I’d prefer to have my bumpmapping etc stuff in a shader. I’ll look at lwjgl now.
BTW: I uploaded a new version of the game. Using backspace close to a shop now halts the ship, also the login screen is a bit more intuitive. Sorry, no denmark flag yet…

Since Slick is built on top of LWJGL you can still access LWJGL directly if you want to do some more advanced stuff.

Phew, it’s not very easy to port this project to lwjgl… But I think I’m on track :-\ (CaptainJester: Thanks for the clarification. Looking at the shader code that I have right now I really start doubting, that the additional slick layer would be any help. Maybe I realize that I was wrong about this at a later stage…)

Maybe one of you could help me with one thing. I searched the lighthouse page and other great tutorials - but I begin to doubt that what I want is even possible.

As my game has only few vertices that the vertex shader needs to deal with I’d like to force it to do some more difficult jobs. Is it possible to have a uniform variable holding an array of vec3f and the vertex shader loop through them? If so, how am I supposed to load this from OpenGL into the shader? glUniformXXX only offers loading a single vec3f, not an array… and furthermore, how would I determine the length of an array within the shader?

Anyway, this is my first OpenGL program, so I’d be happy if you could enlighten me. Ah yes, I’m trying to stick to OpenGL2.0, so glBegin and glEnd code won’t help me a lot :slight_smile:

Thank you guys!