Well, I wouldn’t say I’m exactly crazy about doing my own, but it looks like I am for now. I’m subclassing java.awt.Component for all my bits and pieces and setting it all up to use accellerated images . . . VolatileImage mostly. It’s not terribly clean, and I’ve never been good at writing clean code, but it’s kind of working. So far I can display a GUI layout and content windows, all based on a master Layout.xml document. Not terribly robust ATM, but we’re working on that. Developing a thorough DTD will help a bit, as will cleaning up my API a bit more.
Running into framerate funkiness with mousemovements across my movement sensitive surfaces. Framerate limiter is there, but even as low as 30 it chunks. Not that it really matters in a turn-based game. For the most part, I’ve been trying to hold on to BufferedImages as long as possible before compositing them onto VolatileImages . . . mainly for the sake of preserving transparency on some things. I think they’re slowing everything down tho. And honestly . . . transparency’s not really at the top of my concerns ATM.
So I have the main display window, buttons, backgrounds . . . now all I need is to make some other happy display windows and a nice, happy way to display text interactively. Idea is you can issue orders . . . you’ll see how long/how many resources it’ll take to execute them. If you want it faster/cheaper the game will show you what orders you’ve issued already that will be affected. Then you can start prioritizing. That’s a VERY highly interactive set of text windows though. Not sure how easy that’s going to be to pull off. I guess we’ll have to see.
If there’s anybody with better ideas on how to do this, I’m all ears, but most of the APIs out there seem to be based on a render loop type of thing. This is a refresh only on demand type of setup . . . and only the components that need it.
Things are coming along right quick . . . especially considering my lack of time to spend on it.
And BTW . . . endgame boredom is precisely one of the issues I’m trying to address. That and micromanagement hell, which is equally obnoxious. As the game progresses, you should go from commanding single ships, to groups of 10 to 20, to groups of 1000, to massive fleets rather transparently. In theory, you should be able to tell a fleet “attack this system in this particular way” and the appropriate groups will break off and perform their respective tasks, all the while being easily commanded as you would one single ship.
We’ll see if it works out that way. In theory, EVERY game is great. sigh If only.
Anyway . . . if there’s any good examples, APIs, thoughts, or whatever, I’d appreciate them.