Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » FreeStars » For Client Coders
icon6.gif  For Client Coders Wed, 10 November 2004 15:42 Go to next message
dejan is currently offline dejan

 
Crewman 1st Class

Messages: 25
Registered: August 2004
Location: Belgrade, Serbia, Europe,...

Well I made some changes inside MyModRules and added some tags under <Components>, since Hull type compnents didn't have slot positions, so you was not been able to determine where some slot should be draw, and to avoid this I added <SlotLeft> and <SlotTop> tags, and Value for this tags represent top-left corner of slot, coordinates are the same as in math (xy coordinating system) and distance is measured in slot width and slot height, also I added <CargoTop> <CargoLeft> <CargoHeight> <CargoWidth> because Cargo can be bigger than 1x1 slot.

Also I plain to add <Info> in components this tag should contain description of item (users will see info in Technology Browser)

Report message to a moderator

Re: For Client Coders Thu, 25 November 2004 15:21 Go to previous messageGo to next message
TomT64 is currently offline TomT64

 
Petty Officer 3rd Class

Messages: 45
Registered: August 2003
How will you deal with slots that appear halfway between two on the left or right? i.e.

     ---
 ---|   |
|   |---|
 ---|   |
     ---


[Updated on: Thu, 25 November 2004 15:23]




- TomT64
GStars! - A FreeStars Client (currently dead)
http://gstars.sf.net/

Report message to a moderator

Re: For Client Coders Thu, 25 November 2004 15:28 Go to previous messageGo to next message
donjon is currently offline donjon

 
Lt. Commander

Messages: 808
Registered: November 2002
Location: Benque Viejo del Carmen, ...

If you were going to do something like that ... then it makes more sense to set a hexagonal grid.

Report message to a moderator

Re: For Client Coders Sat, 27 November 2004 15:39 Go to previous messageGo to next message
dejan is currently offline dejan

 
Crewman 1st Class

Messages: 25
Registered: August 2004
Location: Belgrade, Serbia, Europe,...

Tom, some slots have postiton with x.5 which is half of one slot, coordinates are decimal.

Report message to a moderator

Re: For Client Coders Wed, 01 December 2004 12:13 Go to previous messageGo to next message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
Hello,

As far as I understand how Stars! does it (as explained in StarEd docs), integer left/top tags are enough to solve all cases. The trick is that all "square" slots are assumed to be 2 by 2, except cargo slots, which need size tags.

This scheme needs some kind of validation of coordinates and sizes, to avoid overlap, though.

Construction yards in starbases have their own rules, too.

Hope this helps.




So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: For Client Coders Mon, 06 December 2004 17:36 Go to previous messageGo to next message
sborden is currently offline sborden

 
Crewman 3rd Class

Messages: 8
Registered: October 2004
Actually, what I was thinking about for customization's sake was just using slot numbers. Where the slots are is irrelevant. What matters is the number. With this in mind, simple graphics algorithms can find areas in a bit-map that are color-coded to slot numbers and use those areas to place components, etc.

This allows any ship configuration to be drawn, and it will behave just fine. But it could look like anything you want.

Example: Slot 0 is ALWAYS the engine slot (or the first orbital slot)

Slots fire in reverse order from highest. This makes it easier and leaves lower slot numbers for non-weapons.

Figuring out slot numbers then becomes a simple excersize in tracing slot firing order with the first-firing slot becoming the highest number, etc.

Ship drawing routine then puts appropriate components in the appropriate numbered slot, wherever on the graphic that may be. It doesn't need (or want) to know where the slot says it is located. It follows the underlying design bitmap.

This means the ship shape and physical slot placement becomes irrelevant to the server, as it should. These are cosmetic details for the game and should be handled by the clients.

I am working on specifications for this (and for so many other things... Going insane

Stuart B.

Report message to a moderator

Re: For Client Coders Mon, 31 October 2005 18:32 Go to previous message
Zardoz is currently offline Zardoz

 
Civilian

Messages: 2
Registered: October 2005
I have a idea for colocalte the slots ( and cargo slots, but only if we used sizes that are composite of the normal component slots...

Use a matrix wich numbers. Like :

--------------------------
| 1 | 2 | 3 | 4 | 5 |
--------------------------
| 6 | 7 | 8 | 9 | 10|
--------------------------
etc...
Each number represent a position of the slot. The matrix have postions for thes lots that are in the half hegith of the other,
because the 'boxs' of the matrix are half size of a component slot, so the number will be translated to the top-left corner of the slot in the desing window (but is controlaed by the client, making very powerfull and free).

Cargo slots, hare defined by two oposite corners (The Top-Left corner and the Botton-right) and the round cargo slot ( from the star bases , etc...) are defined by the a number that is the center of the round ( the matrix position) and other that is the radius.


[Updated on: Mon, 31 October 2005 18:34]

Report message to a moderator

Previous Topic: And other FreeStars! Client
Next Topic: Thousand Parsec needs testers!
Goto Forum:
  


Current Time: Fri May 03 18:05:08 EDT 2024