Almost done for the Trekwar shipdesigner which allows you to custom fit your star ships with available components.
Posts Tagged ‘trekwar’
Trekwar shipdesigner demo
Friday, March 13th, 20092H or not 2H?
Tuesday, February 10th, 2009I decided to add Deuterium as a resource in Trekwar, it can be collected from nebulas or by owning star systems that have gas giants in them. Ships also now need deuterium to move, and can run out of gas if you don’t plan your logistics.

Deuterium and maintenance has been added to the menu bar, and fuel to the temporary fleet box
The need for speed
Saturday, February 7th, 2009I finally got around to implement the new ship system for the Trekwar game.
Ships are no longer static objects with fixed attributes (weapon, shields, armor, etc..).
All ships are no based on a specific hull, which has some base armor and crap, + X number of slots you can put equiptment in. Below is the starting ship of all factions in the game:

If you noticed that this is the design of a Maquis raider, give yourself a cookie!
I got lot of Starship components to add, and so far I’ve just added ‘Warp Core’, ‘Colonization module’, ‘armor’, ‘beam emitters’ (phasers) and ‘Shield emitters’.
One new thing I implemented today was ship speeds. Unlike in Civilizzation / Birth of the Federation, where units can only move 1 or 2 tiles each turn. Ships in Trekwar can have a speed of 1.0 (which lets it always move 1 tile each turn) or 0.7 like the colonization ship in the screenshot below:
The upper most ship is a scoutship with a speed of 1.0
The lower ship is a colonization ship with a speed of 0.7, that means when it starts moving it will generate 0.7 movement points.. this is not enough to move a full tile. The next turn it generates 0.7 more and then gets 1.4 movement points.. It can the move 1 tile, and has 0.4 movement points “to spare”.. On the third turn in this example it gets 1.1 movement points and can move again..
Ships with a speed below 1.0 will occationally “miss” a movement while moving a distance. Ships with speeds greater than 1.0 will occationally move 2 (or maybe even 3) tiles in a single turn.
Trekwar GUI updates
Tuesday, February 3rd, 2009Recently much of my spare time programming has gone to giving the Trekwar client a graphical overhaul.
Now I’ve managed to get most of what I broke, working again (Research and Starsystem Control), and I’ve added a glasspane that shows up and prevents the clicking of buttons (and thus creating a weird state of the client) while each tick is being processed by the server.

Currently the test galaxy is 100×100 tiles and takes about 0.5 seconds to load to client
Unlike the previous version of the game, it is now possible to have many windows active on top of the actual game map.
The system box (far left of the screen) has been changed to display more information, and next up is a complete redesign of the fleet box.
But before making the new fleet box and fleet management system, I’ll have to do some major rewrite of the internal ship system and logic, to support user created ship classes.
I’m looking forward to 8-10 hours of pure java and logic.. There is only so much Swing a man can take
The path we choose
Wednesday, January 28th, 2009Recently I’ve been continuing on my Star trek game, and doing part 2 of the GUI updates, I have to fix up the research view, as it was broken by the new UI.
I also made a new starship path system, and optimized some slow stuff in the drawMap() function

old design – aka: stupid dot system

new design – aka: ehm.. yellow lines?
After making the research view work again, it’s time to port the old starsystem administration UI into the new design. Followed by the new shipdesigner feature.
New Trekwar GUI
Saturday, November 8th, 2008Since I fixed that annoying memory leak, I’ve been working on updating the graphical client of the trekwar game. Instead of having the map as a own internal window, the map is now always shown. I also made a new menu in Photoshop (thank Thor for photoshop tutorials
)
Next up is implementing the new Shipdesigner system.
Bye bye memoryleak
Monday, November 3rd, 2008I finally got rid of that stupid memory leak in the Star Trek game I’m working on. It turns out when I optimized the use of JLabels I forgot about the action listeners, so the reference to the local copy of the game map was never removed from memory.
With a map update every 35 seconds, the client would go out of memory (200 MB) in 15 minutes, in where around 270’000 action listeners where in memory.
Now however the game can run smoothly for days:

Currently I’m working on a major overhaul of the GUI, and the game looks much better now. I’m gonna release the new screenshots when I get the client stable again and re-integrate the map window in a new way (soon)
ToDoList
Monday, October 27th, 2008Until quite recently I had lots of the stuff I need to do in a simple text file, but I tried out like 5-8 Task list, todo lists, project management applications and stuff like that. Until I finally found the thing I was looking for.
ToDoList is a brilliant program, with ALL the futures I wanted and then some.
What I was looking for was a nice tree-based task manager where each task could have a cost (time), and a progress indicator. Also storing notes is a must. The software also have lots of other features (allocating tasks to users, task statuses, categories, start and due dates, recurrence, etc…
I simply use it as a tree to keep track of tasks I need to do for a given project. Here is a screenshot of the application where I’ve added lots of task for the Trekwar2 game. I think this application is a GREAT tool for programmers, unfortunately it is only available for windows.
You can download the program for free from abstractspoon.com
Trekwar shipdesigner
Monday, October 13th, 2008I recently had a good idea for my Star Trek game, this would also solve the problem with some factions having very few ships designs, and might even allow me to add more factions (Ferengi, Dominion, Kazon, borg?), seeing that finding and balancing enough ship classes for each faction was the biggest problem with adding more factions.
It might even make it possible to add some more exotic factions (Xindi, Gorn, Breen, Son’a, Tholian, Vidiian, Hirogen, Tzenkethi or maybe even the Terran Empire
Instead of just having 4-5 static ship classes where all ships made of this class are identical, one could have a little star ship designer where you fit a hull with the components you want (warp drive, impulse drive, phasers, torpedo launchers, sensors, fusion reactors, shield emitters, armor, cloaking devices, troop transports, colonization and terraforming tools).
This means I will have to do some re-designing the next time I have time to work on the game (wont be that much, only implemented 2 ship classes so far)
According to my superior mspaint skills, the interface will look like this:
Goddamn memory leak
Wednesday, September 3rd, 2008Still havent been able to localize that damn memory leak in the Trekwar client. At least the server has no leaks
and can run for days only using around 15-20 MB of memory (galaxy with 10’000 sectors):

The client however will crash after about 10 ticks if the galaxy is really big. Have stared at the code for hours, with no result. I’m going to have to start some methodical and very tedious debugging to get this thing fixed ![]()







