[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Troll] This Endian Up



> It still would be a good idea, because I intend to write a Java map editor 
> and such.  I am unlikely to save my maps as little endian, so...  :)  You 
> did mention you want improved design tools.  This is a problem that Java 
> can solve pretty easily.

Althought Java might have some advantage with GUI development it's still
not a simple task.

Been thinking I should make some of the class derive from a class that
simply reads the data files.  That way the editor can use the same loading
code instead of the duplicated code like it does now.

> Agreed.  I was actually surprised they did unsigned.  But then again, I 
> discovered some bugs in their tutorial on this information.  I was looking 
> at the section on bit manipulators to do the above (to be sure they work 
> the same as C) and discovered a long discussion on how you can do 12 & 13 
> and get 12.  They then had 12 written as 1100.  Which is definitely not the 
> case, since there are no unsigned integers in Java; everything is 2's 
> complement.  Bad, bad, bad....

Huh?  Do you mean the 12 should have been written as 00001100 (or with
more leading zeroes)?

> Besides, this is primarily a Linux game.  It 
> will fail on other platforms than Intel (Mac, etc.).

<sarcasm>So if made the file formats big endian it would automactically
work on all platform.</sarcasm>  No the opposite endianess still has to
convert.  When I started Troll Bridge I purposely made the file formats
little endian.  A desktop system is most likely Intel.  Linux on Intel
is the most popular.  So I felt they shouldn't require the extra
conversion.  (Probably the next most common Linux system is Alpha which
is also little endian.)

> A couple other notes.  Your code to decipher the sprite files needs some 
> more documentation describing the purpose of each variable.  I gave up 
> trying to decipher it, and just implemented it from the specs.

It does look like it could use some work.

> BTW, you should mention in the specs that all data is unsigned.  You don't 
> say that anywhere actually say that anywhere in the file format specs 
> (although it is obvious from the code).

People need to be more optimistic.  Down with negative attitude.  :)

> Finally, what's with the poor penguin?

Troll Bridge displays a different image on the corner of the title screen
depending on you're opperating system.  For Linux it displays the troll
with his arm around his pal Tux, the official Linux logo.  For Dos the
troll has a spear with killed Dosfish on the end.  (See Troll Bridge
User Guide system requirements web page for image.)  Java will need a
new one as well.  Perhaps the troll sipping some coffee.

Dennis Payne
dulsi@identicalsoftware.com