Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » FreeStars » New Technology Browser
Re: Nice tech browser Wed, 01 March 2006 09:31 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
PricklyPea wrote on Wed, 01 March 2006 13:43

m.a@stars wrote on Wed, 01 March 2006 07:33

Along the way, I've found that the "init" byte is actually encoding hull initiative in the lower 6 bits plus something else in the upper 2 bits, interestingly akin to "ship class" info. Sherlock



A problem with all the bitpacking that goes on is that it makes things less human readable within a hex editor.


Hex? Yuck. Razz You should think BIN when dealing with the Jeffs' craft. Twisted Evil


Quote:

BTW, how do you know if it is 6 bits? I wondered whether it was 4,5,6 or some other number. I guess the Deathstar implies that it is at least 5 bits - but I haven't checked any code to verify.


Baybevet hinted at 6 bits long ago in r.g.c.s ("from 0 to 3 in the upper nibble, plus the 4 bits of the lower nibble"). But I found it by sheer trial and error. Embarassed

Anyway, code a bitwise "AND" of the Init byte with 63 and the Hull Initiative is yours. Very Happy

Now you mention it, it might be as low as 5 bits, indeed it gives the same results. Hard to ascertain with the current hull sample. Sherlock

By the by, here's my ad-hoc labelling for those 2 upper bits:

0: Unarmed
1: Small
2: Big
3: Bomber

Comments, suggestions, welcome! Smile


[Updated on: Wed, 01 March 2006 09:40]




So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: Nice tech browser Wed, 01 March 2006 09:52 Go to previous messageGo to next message
PricklyPea is currently offline PricklyPea

 
Lieutenant

Messages: 534
Registered: February 2005
m.a@stars wrote on Wed, 01 March 2006 09:31


Hex? Yuck. Razz You should think BIN when dealing with the Jeffs' craft. Twisted Evil



Normally it is easy to convert Hex -> BIN. However, it becomes more difficult when the Jeffs don't even respect nibble boundaries! Wink

"from 0 to 3 in the upper nibble, plus the 4 bits of the lower nibble").

Quote doesn't make sense 0-3 in upper nibble + 4 bits of lower nibble = 8 bits = whole byte??

>>>
Now you mention it, it might be as low as 5 bits, indeed it gives the same results. Hard to ascertain with the current hull sample. Sherlock
<<<

Easiest way may be to mod a hull to increase init using only the top bits and see what the init turns out to be. Quicker than tracing the code.

By the by, here's my ad-hoc labelling for those 2 upper bits:

0: Unarmed
1: Small
2: Big
3: Bomber

I agree with the unarmed and possibly big/small. However, my class ratings were based on assumption of more than 2 bits, so I have more classes Smile

Report message to a moderator

Re: Nice tech browser Wed, 01 March 2006 10:33 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
PricklyPea wrote on Wed, 01 March 2006 15:52

Normally it is easy to convert Hex -> BIN. However, it becomes more difficult when the Jeffs don't even respect nibble boundaries! Wink


I don't care about the size of the "nibble", as long as it's constant and makes sense. Razz


Quote:

"from 0 to 3 in the upper nibble, plus the 4 bits of the lower nibble").

Quote doesn't make sense 0-3 in upper nibble + 4 bits of lower nibble = 8 bits = whole byte??


That one threw me off at first, too. Confused Turns out that to go "from **a value of** 0 to 3" you need two bits. Wink + 4 bits of lower nibble = 6 bits. Twisted Evil

Quote:

>>>
Now you mention it, it might be as low as 5 bits, indeed it gives the same results. Hard to ascertain with the current hull sample. Sherlock
<<<

Easiest way may be to mod a hull to increase init using only the top bits and see what the init turns out to be. Quicker than tracing the code.


By all means, go ahead. Very Happy


Quote:

By the by, here's my ad-hoc labelling for those 2 upper bits:

0: Unarmed
1: Small
2: Big
3: Bomber

I agree with the unarmed and possibly big/small. However, my class ratings were based on assumption of more than 2 bits, so I have more classes Smile


Might very well be. There's after all a whole unexplained byte tagging along the "Init" byte. Sherlock



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: Nice tech browser Wed, 01 March 2006 10:57 Go to previous messageGo to next message
PricklyPea is currently offline PricklyPea

 
Lieutenant

Messages: 534
Registered: February 2005
>There's after all a whole unexplained byte tagging along the "Init" byte.

Don't have my structures with me (at work) and don't recall what this byte is. I don't recall any unknowns in the ship structure though so maybe I have something for this...

Report message to a moderator

Re: Nice tech browser Thu, 02 March 2006 05:10 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
PricklyPea wrote on Wed, 01 March 2006 16:57

>There's after all a whole unexplained byte tagging along the "Init" byte.

Don't have my structures with me (at work) and don't recall what this byte is. I don't recall any unknowns in the ship structure though so maybe I have something for this...



The byte between the "Init" byte and the 1st coordinates for the cargo slot remains officially unexplained. It does seem to carry mostly zeroed bits, though. Sherlock

Perhaps related: Where in the MT's name are stored the slot firing precedences for each hull? Confused Or are these found thru some math? Shocked



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: Nice tech browser Thu, 02 March 2006 06:21 Go to previous messageGo to next message
PricklyPea is currently offline PricklyPea

 
Lieutenant

Messages: 534
Registered: February 2005
m.a@stars wrote on Thu, 02 March 2006 05:10

Perhaps related: Where in the MT's name are stored the slot firing precedences for each hull? Confused Or are these found thru some math? Shocked


I just assume they are fired in slot order.

Report message to a moderator

Re: Nice tech browser Thu, 02 March 2006 06:29 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
PricklyPea wrote on Thu, 02 March 2006 12:21

m.a@stars wrote on Thu, 02 March 2006 05:10

Perhaps related: Where in the MT's name are stored the slot firing precedences for each hull? Confused Or are these found thru some math? Shocked


I just assume they are fired in slot order.


That could be a risky guess, as I'm seeing that "slot definition order" doesn't quite correspond with published "slot firing order" lists. Sherlock



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: Nice tech browser Thu, 02 March 2006 07:10 Go to previous messageGo to next message
PricklyPea is currently offline PricklyPea

 
Lieutenant

Messages: 534
Registered: February 2005
m.a@stars wrote on Thu, 02 March 2006 06:29

PricklyPea wrote on Thu, 02 March 2006 12:21

[email

m.a@stars[/email] wrote on Thu, 02 March 2006 05:10]Perhaps related: Where in the MT's name are stored the slot firing precedences for each hull? Confused Or are these found thru some math? Shocked


I just assume they are fired in slot order.


That could be a risky guess, as I'm seeing that "slot definition order" doesn't quite correspond with published "slot firing order" lists. Sherlock



You might be right. The code would have to cycle through the slot definitions to test for weapons, but it would also have to buffer this information since it also needs to reorder based on init.

Report message to a moderator

Re: Nice tech browser Thu, 02 March 2006 07:45 Go to previous messageGo to next message
Kotk

 
Commander

Messages: 1227
Registered: May 2003
m.a@stars wrote on Thu, 02 March 2006 13:29


That could be a risky guess, as I'm seeing that "slot definition order" doesn't quite correspond with published "slot firing order" lists. Sherlock


I dont think Jeffs paid special attention to firing order to have separate list for it. It give only slight effect in laboratory condition tests with missile Dreads and BBs.

I havent seen it ... so just speculating Wink but probably last slot fires first (on case of equal init) and the engine slot is probably first. Such layout helps to have shorter fuel usage and firing code.

The tool/mod makers who changed hulls and slots have probably figured the system out already?

Report message to a moderator

Re: Nice tech browser Thu, 02 March 2006 08:10 Go to previous messageGo to next message
PricklyPea is currently offline PricklyPea

 
Lieutenant

Messages: 534
Registered: February 2005
It would be easy enough to test for anybody who cares enough.

Report message to a moderator

Re: Nice tech browser Thu, 02 March 2006 08:47 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
Kotk wrote on Thu, 02 March 2006 13:45

m.a@stars wrote on Thu, 02 March 2006 13:29


That could be a risky guess, as I'm seeing that "slot definition order" doesn't quite correspond with published "slot firing order" lists. Sherlock


I dont think Jeffs paid special attention to firing order to have separate list for it. It give only slight effect in laboratory condition tests with missile Dreads and BBs.

I havent seen it ... so just speculating Wink but probably last slot fires first (on case of equal init) and the engine slot is probably first. Such layout helps to have shorter fuel usage and firing code.



Makes a lot of sense, indeed. But it seems I misremembered Embarassed the "Battleship firing order" I read long ago, as it turns out that both for BBs and Starbases, weapons slots fire in "slot definition" order. Very Happy



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: Nice tech browser Fri, 03 March 2006 05:01 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
PricklyPea wrote on Mon, 27 February 2006 20:29

Would be quite nice to be able to read the ship data and then to convert it into a html diagram.


Done. Very Happy

Could be better, both code-wise and display-wise, tho. Rolling Eyes

It's been tested for IE, but should work with other browsers, since the html tricks used are fairly standard. Sherlock

Where do I post/upload/send it?



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: Nice tech browser Fri, 03 March 2006 07:02 Go to previous messageGo to next message
PricklyPea is currently offline PricklyPea

 
Lieutenant

Messages: 534
Registered: February 2005
Can you PM it to me and i'll integrate it into starpedia and also provide a mirror on the same server. thanks.

Report message to a moderator

Re: New Technology Browser Sat, 04 March 2006 08:44 Go to previous messageGo to next message
PricklyPea is currently offline PricklyPea

 
Lieutenant

Messages: 534
Registered: February 2005
Anyone else wanting to download the code can get it from:

http://darkcluster.com/downloads/jshullbrowser.zip

Report message to a moderator

Re: New Technology Browser Mon, 06 March 2006 04:03 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
PricklyPea wrote on Sat, 04 March 2006 14:44

Anyone else wanting to download the code can get it from:

http://darkcluster.com/downloads/jshullbrowser.zip


It is not only hulls, mind. The code actually displays most of the main Items table as well.

Thanks for hosting it. Very Happy

[Edit: I've added minor improvements to the hull display code. Still far from perfect, tho.]


[Updated on: Fri, 17 March 2006 06:00]




So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: New Technology Browser Tue, 23 May 2006 10:13 Go to previous messageGo to next message
ForceUser is currently offline ForceUser

 
Lt. Junior Grade
Stars! Nova developer
Stars! Nova developer

Messages: 383
Registered: January 2004
Location: South Africa
http://www.groep7.co.za/stars/techbrowser.htm

Micha has graced me with his superior PhotoShop editing skills and we've kicked around a few ideas on the Techbrowser (even a standalone version that we can make now) and the Ship designer and how they can be enhanced. I believe that if we add more eyecandy (because we can) and make the shipdesigning more graphical, we can attract and hold alot more players that are put off because of the lack of graphics.

I've thrown together a few Ideas and a few examples (thanks again Micha) of how this can beacomplished. If anyone has any ideas or a client writer is interested to use any of the ideas, post here/PM/email me or catch me on the IRC chat channel.

ForceUser



"There are two types of people in the world. AR players and non-AR players" Nick Fraser

Working on some new stuff: http://sourceforge.net/apps/mediawiki/stars-nova/index.php?t itle=Graphics
And the Mentor Database www.groep7.co.za/Mentor/ ZOMGWTFBBQ!! it still works lol!
Check out my old site with old pics at www.groep7.co.za/Stars/

Report message to a moderator

Re: New Technology Browser Tue, 23 May 2006 13:38 Go to previous messageGo to next message
Kotk

 
Commander

Messages: 1227
Registered: May 2003
ForceUser wrote on Tue, 23 May 2006 17:13

I've thrown together a few Ideas and a few examples (thanks again Micha) of how this can beacomplished.

Ship designer idea to have slots arranged to backround seem nice. Nod

Big hulls are probably trickier since there are lot more slots. Can you make Dreadnaught and Ultra Station hulls to look as convincing?

By the current freestars design ... slots of hulls (and also their visual locations) are defined in rule file to make it easily customizable. I paste Battle Cruisers (that you used to illustrate your idea) current definition here to illustrate the current design. Wink

Seems that SlotLeft and SlotTop of every slot of every hull have to be specified for every picture of that hull separately to let them to be arranged with background?

from MyModRules.xml

    <Component>
        <Type>Hull</Type>
        <Name>Battle Cruiser</Name>
        <HullType>Warship</HullType>
        <Costs>
            <Resources>120</Resources>
            <Mineral Name="Ironium">55</Mineral>
            <Mineral Name="Boranium">8</Mineral>
            <Mineral Name="Germanium">12</Mineral>
            <Crew>0</Crew>
        </Costs>
        <TechnologyRequirements>
            <Tech Name="Energy">-1</Tech>
            <Tech Name="Weapons">-1</Tech>
            <Tech Name="Propulsion">-1</Tech>
            <Tech Name="Construction">10</Tech>
            <Tech Name="Electronics">-1</Tech>
            <Tech Name="Biotechnology">-1</Tech>
        </TechnologyRequirements>
        <Mass>120</Mass>
        <FuelCapacity>1400</FuelCapacity>
        <Armor>1000</Armor>
        <InitiativeAdjustment>5</InitiativeAdjustment>
        <Slot>
            <Type>Engine</Type>
            <Number>2</Number>
	    <SlotLeft>0</SlotLeft>
	    <SlotTop>0</SlotTop>
        </Slot>
        <Slot>
            <Type>Electrical</Type>
            <Type>Mechanical</Type>
            <Type>Shield</Type>
            <Number>2</Number>
	    <SlotLeft>1</SlotLeft>
	    <SlotTop>0.5</SlotTop>
        </Slot>
        <Slot>
            <Type>Electrical</Type>
            <Type>Mechanical</Type>
            <Type>Shield</Type>
            <Number>2</Number>
	    <SlotLeft>1</SlotLeft>
	    <SlotTop>-0.5</SlotTop>
        </Slot>
        <Slot>
            <Type>Weapon</Type>
            <Number>3</Number>
	    <SlotLeft>2</SlotLeft>
	    <SlotTop>1</SlotTop>
        </Slot>
        <Slot>
            <Type>Shield</Type>
            <Type>Armor</Type>
            <Number>4</Number>
	    <SlotLeft>2</SlotLeft>
	    <SlotTop>0</SlotTop>
        </Slot>
        <Slot>
            <Type>Weapon</Type>
            <Number>3</Number>
	    <SlotLeft>2</SlotLeft>
	    <SlotTop>-1</SlotTop>
        </Slot>
        <Slot>
            <Type>General</Type>
            <Number>3</Number>
	    <SlotLeft>3</SlotLeft>
	    <SlotTop>0</SlotTop>
        </Slot>
        <PRTNeeded>War Monger</PRTNeeded>
    </Component>

Report message to a moderator

Re: New Technology Browser Wed, 24 May 2006 01:26 Go to previous messageGo to next message
ForceUser is currently offline ForceUser

 
Lt. Junior Grade
Stars! Nova developer
Stars! Nova developer

Messages: 383
Registered: January 2004
Location: South Africa
Kotk wrote on Tue, 23 May 2006 19:38


Big hulls are probably trickier since there are lot more slots. Can you make Dreadnaught and Ultra Station hulls to look as convincing?


*nod* It would be trickier, we'll see if we can make a few more hulls.

Kotk wrote on Tue, 23 May 2006 19:38


By the current freestars design ... slots of hulls (and also their visual locations) are defined in rule file to make it easily customizable. I paste Battle Cruisers (that you used to illustrate your idea) current definition here to illustrate the current design. Wink

Seems that SlotLeft and SlotTop of every slot of every hull have to be specified for every picture of that hull separately to let them to be arranged with background?


Well, I wouldn't know the specific details since I'm not much into coding, but I'm pretty shure that a coder/client writer can write an interface to translate those positions to the new positions. Like I mentioned on the link, the effort would be well worth it Wink

ForceUser



"There are two types of people in the world. AR players and non-AR players" Nick Fraser

Working on some new stuff: http://sourceforge.net/apps/mediawiki/stars-nova/index.php?t itle=Graphics
And the Mentor Database www.groep7.co.za/Mentor/ ZOMGWTFBBQ!! it still works lol!
Check out my old site with old pics at www.groep7.co.za/Stars/

Report message to a moderator

Re: New Technology Browser Wed, 24 May 2006 05:59 Go to previous messageGo to next message
ForceUser is currently offline ForceUser

 
Lt. Junior Grade
Stars! Nova developer
Stars! Nova developer

Messages: 383
Registered: January 2004
Location: South Africa
Ultra Station: http://www.groep7.co.za/stars/us.jpg
Dreadnought: http://www.groep7.co.za/stars/dn.jpg

If there ever is a situation that slots don't fit the pic, I'm not above "fixing" the model, but this most likely won't happen Wink

ForceUser



"There are two types of people in the world. AR players and non-AR players" Nick Fraser

Working on some new stuff: http://sourceforge.net/apps/mediawiki/stars-nova/index.php?t itle=Graphics
And the Mentor Database www.groep7.co.za/Mentor/ ZOMGWTFBBQ!! it still works lol!
Check out my old site with old pics at www.groep7.co.za/Stars/

Report message to a moderator

Re: New Technology Browser Wed, 24 May 2006 06:53 Go to previous messageGo to next message
Micha

 

Messages: 2342
Registered: November 2002
Location: Belgium GMT +1
ForceUser wrote on Wed, 24 May 2006 11:59


Dreadnought: http://www.groep7.co.za/stars/dn.jpg


Uhm, that's still the DEADnought picture. <g> Here the one without the typo:
http://home.scarlet.be/ert/freestars/TechB-DN.jpg
(note without compression, so 400KB)

mch

Report message to a moderator

Re: New Technology Browser Wed, 24 May 2006 08:17 Go to previous messageGo to next message
Kotk

 
Commander

Messages: 1227
Registered: May 2003
ForceUser wrote on Wed, 24 May 2006 08:26

Well, I wouldn't know the specific details since I'm not much into coding, but I'm pretty shure that a coder/client writer can write an interface to translate those positions to the new positions. Like I mentioned on the link, the effort would be well worth it Wink

Yes, sure it looks better. Smile

Rules file is no code, it is game rules defined. It is meant as input for both client programs and turn generator. Basically, what i wanted to say is that existence of a hull, its slots etc is part of game rules in Freestars. Client program is meant to have no knowledge about existence of "Battle Cruiser" hull and its slots before reading the rules.

I think to implement that idea we got to:
Make bigger versions of each hull picture.
Add some new fields to rules so to have layout for each picture.
Write a program so you can edit the slots layout in the rules.

Then you can edit the slot layout in rules; client can load the pictures and the slot locations from rules and display them. Nod

Report message to a moderator

Re: New Technology Browser Thu, 25 May 2006 06:00 Go to previous messageGo to next message
gible

 
Commander

Messages: 1343
Registered: November 2002
Location: Wellington, New Zealand

hmmm while you're at it...is there room in the ruleset for local cusomizations? iow if I make changes to the slot positions that don't affect the actual game play, will it break trying to use it with the "original" ruleset?

Report message to a moderator

Re: New Technology Browser Thu, 25 May 2006 07:39 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
Micha wrote on Wed, 24 May 2006 12:53

Uhm, that's still the DEADnought picture. <g> Here the one without the typo:
http://home.scarlet.be/ert/freestars/TechB-DN.jpg
(note without compression, so 400KB)
mch


Impressive! Cool

Indeed, one of the things I wanted to "import" from Space Empires. Very Happy

But if may presume to caution those who are better left to roam around unhindered, the nice layering of hull slots over hull picture *might* need an improved set of slot coordinates (plain integers from 1 to 16 perhaps no longer covering all cases), or perhaps even an extra set of coordinates both for those clients which cannot render such complex graphics and must resort to the "original" way and for those eye-catching clients which can do zoom-ins and outs and even (gasp) rotate the whole thing around. Sherlock



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: New Technology Browser Thu, 25 May 2006 11:08 Go to previous messageGo to next message
Kotk

 
Commander

Messages: 1227
Registered: May 2003
gible wrote on Thu, 25 May 2006 13:00

hmmm while you're at it...is there room in the ruleset for local cusomizations? iow if I make changes to the slot positions that don't affect the actual game play, will it break trying to use it with the "original" ruleset?

I am wondering why to have it as a "local" customization at all?

Sight ... is main sense of human being so confusing him visually has major effect on gameplay too. Wink

Maybe lets have same slot layout on all clients so "Battle Cruiser" looks same on all clients. Then we have one ruleset and no problems? Nod

m.a@stars wrote on Thu, 25 May 2006 14:39

(plain integers from 1 to 16 perhaps no longer covering all cases)

Slot coordinates are currently floats (not plain integers) in Freestars. Please eyeball the Battle cruiser hull definition i pasted. Wink


[Updated on: Thu, 25 May 2006 11:13]

Report message to a moderator

Re: New Technology Browser Sat, 27 May 2006 03:46 Go to previous message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
Kotk wrote on Thu, 25 May 2006 17:08

Slot coordinates are currently floats (not plain integers) in Freestars. Please eyeball the Battle cruiser hull definition i pasted. Wink



Doh. It seems I was using my integer eyeballs... Wink

So, is there any progress report from the development team? Cool




So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Previous Topic: FreeStars API Documentation
Next Topic: Writing a C# or Java client?
Goto Forum:
  


Current Time: Fri May 03 14:12:03 EDT 2024