[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4752: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4754: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4755: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4756: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
The Gaming Union • View topic - Lets start drawing some ships

Lets start drawing some ships

A 2D turn based stratgey simulator to be played in conjuction with SWFA

Moderators: nickersonm, insecttoid3, Corran_Horn

Postby Bern » Sat Oct 25, 2003 6:30 am

I have created a very simple little app that we can use to develop ship models.

FIRST MAKE SURE YOU HAVE THE LATEST JRE (JAVA RUNTIME ENVIRONMENT)

you want any JRE above 1.4.1, get it here.



at this link select the JRE link for Windows under the "Download J2SE v 1.4.2_02" section. its about 1.4 MB. install it on your comp by following the instruction. you need to do this so that you have the XML classes the sim uses.

after you get that the zip will work fine.



this zip comes with three things:
galsim.jar - the code for the tester
galsim.bat - batch file to run the tester
directory "models" with a test.txt file in it.

the tester works with this one file and reads it and is able to display the cruiser in the other post. by modifying the contents of this file you can draw anything, but dont change the name or it wont work.

KEY STROKES TO USE IN THE TESTER
arrow keys - move the view around the ship.
z and shift-z - zoom in on the ship

how do you draw it. the smarter of you guys will be able to figure it out quickly but here is what you need to know.

basically a model file for a ship contains lines that signify coordinate points for the sim to draw. Each line contains multiple coordinates. Each coordinate is a set of three integers representing the x, y and z coordinate.for instance.

5,0,10

x is back of ship to front(negative to positive)
y is left of ship to right (negative to positive)
z is below ship to above (negative to positive)

so 5,-6,10 is read by the sim as 5 behind center, 6 to the left of center, and 10 above center. its a 3d coordinate and the whole sim is based on sets and sets of 3d coordinates.

Consider each unit of measurement to be a meter, meaning 5 meters, 6 meters, and 10 meters respectively.

each set of coordinates on the line will be joined by the sim in a polygon. The LEAST amount of coordinates you can have on a line is TWO, meaning a line MUST have at least 6 numbers on a line (2 coordinates of 3 numbers each).

easy, huh?

so, i will give one more example. lets say i wanted to draw a ship that was triangular shapes with the point being the front of the ship. the line would look like this

-40,-20,0,-40,20,0,40,0,0

lets break it down:

first point (-40,-20,0). this is the back left corner (its 40 to the back of center, 20 to the left of center, and 0 above (midline of ship))

second point (-40,20,0). this is the back right corner (only difference is 20 is POSITIVE, thus right of center)

third point (40,0,0). this is the point of the nose. its center left to right (0 for the y) and centered up and down (like the rest of the ship).

use the TEST.txt file with the zip as an experiment to learn the effects of moving points around and such. It will become easy.

HINTS:

as you guys finish designs for ships you want, remember these things.

if they are good designs i have no problem using them in the game.

make sure to realize that 0,0,0 is the CENTER of the ship, so draw your points around it positive and negative.

try to be efficient with drawing. you could have the ship drawn with a bunch of 2 coordinate lines, each being drawn by the sim as a line (pt a to pt b). but by doing that you will make the sim work harder to draw your ship. Instead, put as many pts on one line as possible, so that the sim has to draw the least amount as possible. Example:

lets say we want to draw a horizontal square. you could do it this way:

(4 lines)
5,5,0,5,-5,0 (front right to front left)
5,5,0,-5,5,0 (front right to back right)
5,-5,0,-5,-5,0 (front left to back left)
-5,5,0,-5,-5,0 (back right to back left)

the sim would process each line in the file as a two coordinate shape, or a line. it would calculate each coordinate separately then draw a line between the two coordinates. so in the above case it would have to calculate 8 coordinates total. this is not efficient.

instead, put all the points on one line like so

5,5,0,5,-5,0,-5,-5,0,-5,5,0 (FR to FL to BL to BR)

The sim would draw a polygon following the four points and then actually finished the polygon by connecting the first and last coordinates. it has to calculate only FOUR coordinates here. For the grand scope of this game, a 50% reduction in processing will be enormous.

So, post your designs, pics, exchange text files and lets see whos the best artist out there.

oh yeah, like i said before, each number is a METER, so if you were drawing a ISD you would have the back points be like -800 X-coord or so and the front points would be 800 X-coord for a total of 1600 meters between front and back centered on zero.

Have fun.

[size="1"][ 25. October 2003, 01:54 PM: Message edited by: Bern ][/size]
Bern<P> <IMG SRC="http://www.tgu.org.uk/users/evr/images/gmsig.jpg">
<A HREF="http://www.thegamingunion.com/users/adam/evrdatabase" TARGET=_blank>Empire vs Republic Strategic Sim</A>
Bern
Junior Member
 
Posts: 1789
Joined: Thu Jan 04, 2001 1:00 am
Location: Newnan, GA, USA

Postby Big Hed » Sat Oct 25, 2003 9:37 am

Just one problem, when I try to open the .bat file there is some sort of exception and when I try to open the .jar (said it was executable) nothing happens. Now is this a function of my computer or my illiteracy? :D
Big Hed
 
Posts: 1313
Joined: Tue Sep 17, 2002 12:00 am
Location: Singapore

Postby Bern » Sat Oct 25, 2003 1:39 pm

you cant double click the .jar, just the .bat

the exception in the .bat im working on.

gotta get the latest jre.
* I have edited the post to include the instructions for getting the new JRE*

[size="1"][ 25. October 2003, 01:51 PM: Message edited by: Bern ][/size]
Bern
Junior Member
 
Posts: 1789
Joined: Thu Jan 04, 2001 1:00 am
Location: Newnan, GA, USA

Postby Big Hed » Sat Oct 25, 2003 2:40 pm

hehe I thought I was skipping something, thanks
Big Hed
 
Posts: 1313
Joined: Tue Sep 17, 2002 12:00 am
Location: Singapore

Postby nickersonm » Sat Oct 25, 2003 11:29 pm

Your format is very simmilar to raw format, so I was able to do this in a few minutes:

Image
Image
:D .

Raw format is something like:
<pre>x1 y1 z1 x2 y2 z2 x3 y3 z3
x4 y4 z4 x5 y5 z5 x6 y6 z6</pre>
but I'm sure you could find the exact specs on it from google. Anyways, for the above I just extracted the EvR ISD to raw format (after rotating it, figuring out the correct rotations took me a while ;) ), and changed double-spaces and spaces to commas.

- nickersonm

[size="1"][ 26. October 2003, 05:35 AM: Message edited by: nickersonm ][/size]
nickersonm
 
Posts: 1591
Joined: Sun Nov 12, 2000 1:00 pm
Location: Boulder, CO, USA

Postby Bern » Sun Oct 26, 2003 12:39 am

i just had a feeling one of you guys would be able to do this quite easily. hehe. great job nick.

hehe. awesome job. keep em coming.
Bern
Junior Member
 
Posts: 1789
Joined: Thu Jan 04, 2001 1:00 am
Location: Newnan, GA, USA

Postby Bern » Sun Oct 26, 2003 12:42 am

hmm. i wonder what would happen if i just change the code to fill the polygons.. interesting

i am officially excited now [img]smile.gif[/img]

plz send me the txt file for this one i gotta see it upclose
Bern
Junior Member
 
Posts: 1789
Joined: Thu Jan 04, 2001 1:00 am
Location: Newnan, GA, USA

Postby insecttoid3 » Sun Oct 26, 2003 1:09 am

Behold, the Turanic Mothership


Image
User avatar
insecttoid3
 
Posts: 1196
Joined: Tue Jun 05, 2001 12:00 pm
Location: From: From: From: From: From: From: From: From:

Postby insecttoid3 » Sun Oct 26, 2003 1:23 am

i got all of the turanic raider ships working, although the ion array frigate model only had the solar arrays on one side, so it only has em on one side in the app too
User avatar
insecttoid3
 
Posts: 1196
Joined: Tue Jun 05, 2001 12:00 pm
Location: From: From: From: From: From: From: From: From:

Postby insecttoid3 » Sun Oct 26, 2003 1:33 am

oooooooooooooh


purdy
User avatar
insecttoid3
 
Posts: 1196
Joined: Tue Jun 05, 2001 12:00 pm
Location: From: From: From: From: From: From: From: From:

Next


Return to Empire vs Republic




Users browsing this forum: No registered users and 2 guests

cron