Steve Jackson Games - Site Navigation
Home General Info Follow Us Search Illuminator Store Forums What's New Other Games Ogre GURPS Munchkin Our Games: Home

Go Back   Steve Jackson Games Forums > Roleplaying > GURPS

Reply
 
Thread Tools Display Modes
Old 03-30-2011, 01:53 PM   #31
panton41
 
panton41's Avatar
 
Join Date: Jul 2005
Location: Jeffersonville, Ind.
Default Re: [Spaceships] Getting started on a Java-based ship builder

I'm planning on looking into more database options and talking to one of my professors for idea. Great thing about going to university, I have access to an expert in Java and databases. (The same professor offered to share his homebrew with me after I graduate.)
__________________
The user formerly known as ciaran_skye.

__________________

Quirks: Doesn't proofread forum posts before clicking "Submit". [-1]

Quote:
"My mace speaks Goblin." Antoni Ten Monros
panton41 is offline   Reply With Quote
Old 03-31-2011, 03:41 PM   #32
ericbsmith
 
ericbsmith's Avatar
 
Join Date: Aug 2004
Location: Binghamton, NY, USA. Near the river Styx in the 5th Circle.
Default Re: [Spaceships] Getting started on a Java-based ship builder

Quote:
Originally Posted by ciaran_skye View Post
If Eric doesn't mind, I'd like some pointers, based off his spreadsheet experience, about how to structure various parts of it.
I'd be more than willing to chat when you actually start getting into it. As I've said, I really don't know Java nor do I know much about databases... though Excel can be very much like a database when used in certain ways (such as I've used in my sheet), and there are certainly some pointers I can give you in regards to setting up the database for the back end of the program. In fact one of the major reworks of my spreadsheet for v2.0 was a complete revamp of the back end "database" portion of the sheet to address what I found out was a major weakness in the sheet. Had I written it as an actual program using databases it would have been much easier to address that weakness, but at any rate it'll be easier for you if you avoid it altogether by making things more scalable in certain ways right from the start.
__________________
Eric B. Smith GURPS Data File Coordinator
GURPSLand
I shall pull the pin from this healing grenade and...
Kaboom-baya.
ericbsmith is online now   Reply With Quote
Old 03-31-2011, 07:28 PM   #33
panton41
 
panton41's Avatar
 
Join Date: Jul 2005
Location: Jeffersonville, Ind.
Default Re: [Spaceships] Getting started on a Java-based ship builder

On Kuroshima suggestion (over Yahoo) I'm going to go with SQL Lite and build the database backend first. My plan is to have a Spaceship entity built roughly like this:

Code:
Spaceship ID			INT
SM				INT
cost				CURRENCY
WS				INT
CS				INT
Front1				INT
...

Center1				INT
...

Rear1				INT
...
From there I'd have an attribute for every item in the vehicle block. There's also be BINARY attributes for the various design switches. I'd also do separate entities for weapon and habitat modules and probably even shoehorn in a way to do something similar to what Eric's done with mix-and-match weapon mounts. I might even put in a few other of Eric's house rules as an add-on data file from the main one.

Probably I'd make the data files be SQL commands and simply have it recreate the underlying database on every load, after asking while files to include. It might take a performance hit at load time, but make up for it by being a fresh database every time and a well-documented language to code new files in. Ditto and saving and loading spaceships.

Eric, I'm going to tear apart your 1.x spread sheet and possibly use it for the raw data files if it's possible to extract that information. If you can suggest ideas about what to put into it I'd be more than happy to take them.
__________________
The user formerly known as ciaran_skye.

__________________

Quirks: Doesn't proofread forum posts before clicking "Submit". [-1]

Quote:
"My mace speaks Goblin." Antoni Ten Monros

Last edited by panton41; 03-31-2011 at 07:36 PM.
panton41 is offline   Reply With Quote
Old 04-01-2011, 01:49 AM   #34
Puppetminion
 
Puppetminion's Avatar
 
Join Date: Aug 2005
Location: Brisbane, Australia
Default Re: [Spaceships] Getting started on a Java-based ship builder

Possible problem, if you hardcode in the locations adding smaller systems becomes very hard.
I've got a reasonably complete FileMaker implementation done, and what I did was split the spaceship over several tables.
Weapons, habitats, open spaces are all fairly obvious but more importantly I used a spaceship table (for SM and ship wide stuff) and a systems table, where basically an entry is <ship ID>, <location>, <system>; eg Viper, F1, Laminate Armour. So if C1 gets split I rename it C1.1 and then add C1.2 & C1.3 records, all with a -1 SM modifier.

Also means I only needed to do a lot of stuff once rather than 21 times.

Don't know if that helps, but I can hope :)
Puppetminion is offline   Reply With Quote
Reply

Tags
design, java, software, spaceships


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Fnords are Off
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 05:22 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.