Conquer - LWJGL Turnbased Strategy

Hm - started to take a look at the Conquer code again, decided to play the game and got this error:

“Unable to launch Conquer”, and when I clicked on Details it told me it got a stack overflow

Any ideas Malokhan?

Here’s the JavaWS log stuff (I’m running JDK/JRE 5.0 Update 4):

General Tab
An error occurred while launching/running the application.

Title: Conquer
Vendor: GameLizard.com
Category: Unexpected Error

Stack overflow (1283)

Launch File Tab

<?xml version="1.0" encoding="UTF-8"?> Conquer GameLizard.com Planet conquest game. 0.5

Exception Tab
org.lwjgl.opengl.OpenGLException: Stack overflow (1283)
at org.lwjgl.opengl.Util.checkGLError(Util.java:56)
at org.lwjgl.opengl.Display.update(Display.java:515)
at conquer.LWJGLRunner.drawBackbuffer(LWJGLRunner.java:430)
at conquer.LWJGLRunner.runGame(LWJGLRunner.java:382)
at conquer.LWJGLRunner.main(LWJGLRunner.java:57)
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.continueLaunch(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I fixed it! It had to do with starting the game with “Show Power Distribution” turned on, which happened if you saved that setting last game. I fixed the bug and now everyone can play happily! :slight_smile:

I’ve also developed an API for people who want to create their own AI for Conquer. I’ll have to javadoc it and perdy it up before I make it so I can give it out to people for fun. Look forward to it… someday :slight_smile:

Sweet! I’ve been itching to play this for a while. So, did I totally cause that bug?

So, what’s next? I think the ability to save a game in progress, and multiplayer.

It would also be cool to be able to go back-and-forth between the current turn and the previous turns, so you could see a kind of slideshow of the shifting of ships from one place to the next.

Ah, wouldn’t it also be great to be able to assign a production waypoint for planets? You know, have a planet automatically send its ships to another specified planet on each turn, thereby setting up supply lines.

Oh, man I can’t wait to work on this some more. You still open to having me do some code for it?

Ahh you didn’t totally cause it… well… kinda :slight_smile: The code involved with the crash was my code, but partly because of how you were using it. The fix was in my code, yours was doing what I would have had it do. It just needed a little improvement in the structure :slight_smile:

As for saving games in progress, how do you think that should go? Should it be like… save slots where you can save games? Or should it just be so that when you close the game and come back, the last state of the game is still there?

Multiplayer I would LOVE to have in the game, but have absolutely no net code experience.

The slide show thing isn’t too bad of an idea, but I’m not sure how much use it would really have. For the most part it would just be a big memory hog to store all of the states of every turn.

I’m not sure if I like the waypoint idea. For one, it would complicate the game somewhat in having more buttons to do what you can already do. Also, it encourages leaving a planet more poorly defended. I would rather myself send ships when I really want to. Also, with too much of that, you’ll just have countless fleets bombarding the screen, and that can not only be an eye sore, but a performance hog as well.

In an unrelated comment, what do you think about getting some of the people who are playing this game together to write a strategy guide?

[quote]Multiplayer I would LOVE to have in the game, but have absolutely no net code experience.
[/quote]
Hm, I have some experience, and I’d be willing to do it, but it would be a by-the-book implementation at this point, and lacking in pedal-to-the-metal bandwidth efficiency (though, for most turn based games I suspect it’s probably not a big deal at first). I’d almost like to see a build which contains only multiplayer code until all the bugs can be worked out. Unless multiplayer is the most important next feature, in which case I could crank away at that until it was done, and like last time, give you the code I’ve done, and let you integrate it into the public version when it makes sense to do so (note to self: watch those run on sentences). The nice thing about coding it last time was that I kept a copy of the original code separate from the copy I was working on, so I knew if I totally borked something that I was safe. :slight_smile:

[quote]As for saving games in progress, how do you think that should go? Should it be like… save slots where you can save games? Or should it just be so that when you close the game and come back, the last state of the game is still there?
[/quote]
For a player like me, this feature goes hand-in-hand with multiplayer. But, you could do it such that multiplayer games can’t save a game in progress. We could go in a few different directions with this. I’ll work up some detailed ideas on this and post them separately.

[quote] The slide show thing isn’t too bad of an idea, but I’m not sure how much use it would really have. For the most part it would just be a big memory hog to store all of the states of every turn.
[/quote]
True, and in some ways this could be done better, perhaps with a simple graph. I like the Standings page as it is, but I’d also like to see it in line graph form (i.e. ship production, ships remaining, and planets remaining all over time, and shown in 3 separate graphs, covering only the last 5-10 turns. Maybe I’ll work up some more diagrams for what I’ve got in mind, and post them for comment.

[quote]I’m not sure if I like the waypoint idea. For one, it would complicate the game somewhat in having more buttons to do what you can already do. Also, it encourages leaving a planet more poorly defended. I would rather myself send ships when I really want to. Also, with too much of that, you’ll just have countless fleets bombarding the screen, and that can not only be an eye sore, but a performance hog as well.
[/quote]
Hm, you’ve definitely got a point about cluttering up the screen. It’s one of those features that have come to mind as I play, but certainly not nearly as important (or even necessary) a feature as multiplayer. I’m all for the game automating as much of the play as needed so I can focus on the larger strategy, but I agree that it could turn into an ugly mess.

Hmmm that gets me thinking. I’d definitely then want to have a save feature with multiple slots. That would be more practical if I introduce a story mode with designed maps and goals and such… woah… but until then, it’d still be nice to have a save feature :slight_smile: Also, when multiplayer support is added and you go to hit the Save, a popup would appear on the other player’s screen saying, “Player Bob has requested a save for this game, would you like to save?” If yes, both players get the save written. If no, the first player gets a message, “Player Sue rejected the request to save.” That way saves would be synchronized and next time you two connect in a game, then load, you can resume your previous multiplayer battle. I don’t recall seeing any game do this, and they should, because I want that in mine ;D When net code is in effect, I’ll certainly implement this.

As for graphs, I’ve already implemented a graph that shows planet count per turn, which makes a very neat graph to watch especially when trying to fine tune your AI you’re making for fastest conquering of neutral planets :slight_smile: The only reason it’s not in the current release is that I can’t get the damned scrollbar to behave how it should :stuck_out_tongue: I’m having a heck of a time with it. I have scrollbars working perfectly for so many things, but for some odd reason I just can’t make it work for this piece! I’ll figure it out though, and when I do, I’ll put it up and then make it more fully featured with checkboxes for various statistics.

I’ll contact you again in pm with the updated source so you can resume your play with the code :slight_smile:

As for a strategy guide… I’d be flattered. However I think I should make the game more interesting (hopefully with a story mode) before anyone would really have much to write in a guide.

As the game stands now, I don’t think a save is necessary. It doesn’t take more than 15-30 minutes to play a game with 30 planets. Although I haven’t tried a larger game yet.

Multiplayer would be good.

Could you implement a scanner for planets that you own? Each planet you own can scan out to 2 turns away to see incoming/passing enemy ships.

How about if the player could set a threshhold for a planet. Once the threshhold is reached, then it will move a player set number of ships to a specific planet.

ie. When planet A reaches 150 ships, move 100 ships to planet F.

This would keep the screen clutter down more, but still allow the player to automate some of the process.

As for saving, I like the idea of proposing a save to all human players, and having them either accept or reject the proposal.

Here’s something else I think would be cool. One of the problems with multiplayer strategy games is that if your losing it might be a long, drawn-out loss - boring to play, and you know there’s no way you can come back. This phase of the game is pretty boring (even if it’s victory-lap time for the winner). So, here’s what I think we could do: if a player is in a bad position, and wants to save the game to finish it later, let them offer this to all other human players. If anyone rejects this proposal, give the player who wants to exit the game the option to substitute themselves with an AI player of their choice.

Another alternative is to simply stop the game, give the players points based on their standings (total planets conquered, total ships built, etc.), and place them 1st, 2nd, 3rd and so on, and end the game. With this setup I think you can please most play styles, and people feel as if they get credit for their work.

Now, if we had a high scores table online, and a full blown ranking system, here’s what I think could be a cool idea:
So, a player decides they want to leave the game, for whatever reason (they’re losing, they have to eat dinner, have to go to work, etc.), but the game is still in progress. What do they do?

The player is presented with the following options, in order:

  1. Offer a “save game” to all players, contingent on acceptance from all players. The saved game is set to expire in, say, 1 week. That is, if play does not resume in 1 week, the game is automatically stopped and points awarded (#2 explains this better).
  2. If #1 is rejected, offer a “stop game” to all players, that is, just call the game as it is, reward players with points, and consider the game closed
  3. If #2 is rejected, and without having to get consensus from anyone, a player my leave the game, but is replaced by an AI of their choice. This allows the players who want to continue to play a chance to do so. At this point, the player who is leaving has their points calculated (as if the game is being stopped), those points are added to their global online standing, and play continues.
  4. If the last human player in a game wants to leave, they decide the outcome. Either (1) save the game or (2) stop it. There is no point in (3) replacing the last human player with an AI player.

As for AI players, either:
A) AI players are not ranked, OR
B) Maybe since there’s an API to write them, AI players are ranked on their own list - could be cool.

Okay, and if we had a server to store global standings, then this same server could also be used to store all saved games. That way you could locally manage “expired games” and update the global standings as needed. This would not, however, be a game server. That is, it wouldn’t have to be used to host actual games (thereby saving on bandwidth). But, if we had a central server, would could also do some cool matchmaking stuff.

So there’s some ideas I’m throwing out there.

One more note on global rankings:

I’m usually a fairly casual gamer of the strategy games that I play. It’s great that games offer standings and everything, but when you build your player community to anything beyond a couple hundred people, the casual gamers are always going to be at the bottom of the rankings, and that tends to take away some of the fun.

So, I also propose this: we could divide the rankings up into different classes by ranking. Let’s say we had a chess-like ranking system that gave everyone a number representing their overall skill. Let’s say for the sake of argument, that the ranking score goes from a range of 0-1000 (yes, I know chess rankings go higher). You could break this down into a number of classes - say the 0-99 class, 100-199 class, and so on, so players could feel like they’re working to be a the top of their class.

It helps alleviate that sense that, “I’m #1035 of 15000 players. I’m in the top 10% of all players, but it doesn’t feel that exciting because only the top 100 players get listed on the rankings page.” I hope you get my meaning here.

Anyhow, there’s some more things to chew on.

I like this idea quite a bit. If nothing else, it could be implemented and then tweaked later as people see they want to play differently.

I’m not quite sure about the class ranking idea. Saying you’re in the top 10% of all players to me means something better than saying you’re #1 in the loser class :slight_smile: Aside from that, how would classes be determined if not by global rank? Being #1 in the 100-199 class just means you’re ranked #100 in the 0-99 class doesn’t it? And what happens when you’re #1 in the 100-199 and you’re whooping everyone else non-stop? Shouldn’t you move up classes fluidly? To me that just makes the class distinction meaningless. Am I missing the idea?

How about I make it work like Halo 2’s Online Matchmaking? :slight_smile: The game matches you according to what type you want to play with someone of a similar level. There would be no distinction between one Level 12 and another Level 12 player then, so it wouldn’t be such an issue. People would very quickly move to their level and always be able to play games with people on a similar rank to them.

As for players leaving during >2 player multiplayer matches, I think there are 3 appropriate options for response:

  • The missing player should be replaced with a Dumb AI player
  • The missing player’s planets turn to neutral
  • The missing player’s planets go to the person that took his last remaining planet, or the person that took the most of his planets.

The last option I don’t like because that makes it unfair between the other 2 players. The second option would certainly be sensible, and the 1st option I think would be best. I say that because if players A and C surround B, and C drops out, A would still be counting on that surrounding strategy to take out B. If C’s planets go neutral, B just sucks them up and suddenly has a HUGE advantage because A can’t reach them. If it turns to a dumb AI, player A’s strategy doesn’t go completely out the window and player B is still in his same situation as before.

Also with 2v2 games, if I lost a teammate, I might rather have my teammate turn into a Dumb AI than suddenly be lost and fair game for my other 2 opponents. Also, replacing them with anything other than a Dumb AI would probably not be fair because all the existing AI’s above that can really beat almost any human :slight_smile:

Well, here’s the truth of it - I don’t like global rankings of anykind, and I really DO like Halo 2’s matchmaking service. I really just brought that idea up so I could sell you on the idea of storing saved games on a central server, and having matchmaking tools. So, yeah - as a player I don’t really care whether there are rankings or not.

Looks like we’re ready to start hammering out the details of this multiplayer thing and getting some implementation done - so I’m ready when you’re ready.

Any volunteers to do the netcode? :slight_smile:

I certainly will offer to do the code.

Here’s the deal - I’m going to be busy with other non-coding things at least until the new year. If by then no one else has volunteered, and things are still a go for the multiplayer, then I will delve into it as deep as needed to get it running. As a fan of the game, I’d like to see it expand as well.

Sounds great :slight_smile:

hey, I just tried Conquer on my MacOS computer. It looks cool. Once I got it going it was quite fun.

You should give a selection box that displays all the available AI types. Your method of adding/removing players was not intuative to me. It was confusing. I think the default should be to start a game with 1 human and 1 AI, which is what I was expecting. In the game, a tutorial on top of the planet display with some text pointing at planets would very helpful to start out with.

Sounds and music would be nice. Try www.soundrangers.com for some cheap sounds.

When a game is over I would like a link to the randomize planets section.

Your text fields don’t support the arrow keys or highlighting.

It runs very very slow here…

Ubuntu 6.06
java 1.5.0_08
Nvidia driver working (runs Enemy Territory smooth)
Geforce Fx5500, atlon 2500, 512MB

seems like it’s running without hardware acceleration, mouse moves like 0.5 FPS, couldnt get out of first window…
i had to kill the process…
Do I need some library?