Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5 ... 13

Author Topic: Kobold Quest port status?  (Read 8655 times)

peterb

  • Bay Watcher
    • View Profile
Re: Kobold Quest port status?
« Reply #30 on: October 30, 2006, 12:08:00 am »

It was to you :-).  I'll look at the save/load code a little more carefully before sending mail to you directly.
Logged

popecharlotte

  • Escaped Lunatic
    • View Profile
Re: Kobold Quest port status?
« Reply #31 on: October 30, 2006, 08:04:00 am »

New version here. I think everything is sorted now, in particular saving and high scores now work. It turns out that the problem was in the loading of definitions - the stuff I'd written to replace the Windows-specific code didn't work. The save file format seems fine.

[ October 30, 2006: Message edited by: popecharlotte ]

Logged

Gezol

  • Bay Watcher
    • View Profile
Re: Kobold Quest port status?
« Reply #32 on: October 30, 2006, 03:21:00 pm »

I just tried the new Kobold Quest binary, and, alas, it's still not working for me. It still crashes when I try to start a new game, this time freezing for a while before it does(this time I get the message that the application has unexpectedly quit, incidentally). It's definitely getting closer, though- the text is fixed, but the cursor is invisible. And, interestingly, the kobold picture at the title screen still doesn't show up, but the bug he's holding does. I wonder if there's some display issues with the brown colors or something.

It sounds like you got it working on more than one machine, so this might be just some weird conflict with something on my computer. I might try it on a couple of other Macs later and see how it does on those...

Logged

peterb

  • Bay Watcher
    • View Profile
Re: Kobold Quest port status?
« Reply #33 on: October 30, 2006, 07:55:00 pm »

Gezol,

What would be super-helpful to me would be if you could open the console application, run the game until it crashes, and then copy the output of the console to me in an email.  You can send it to peterb - a t - gmail d o t com.

Thanks!   And yes, I've gotten confirmation that it runs on at least two machines now.  That certainly doesn't mean there aren't still bugs.

(and just to make sure:  you threw out the old folder and completely replaced it with the new one, right?  The issue in the old folder is that it had a save file generated on my machine, and I suspect endianness issues).

Logged

Gezol

  • Bay Watcher
    • View Profile
Re: Kobold Quest port status?
« Reply #34 on: October 30, 2006, 09:55:00 pm »

Yes, I did throw out the old folder before, so that shouldn't be the problem. I just sent you an e-mail. I hope I did this right...
Logged

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: Kobold Quest port status?
« Reply #35 on: October 30, 2006, 10:31:00 pm »

I've been reading about sizeof() and endianness.  It should be a fascinating and slow struggle.
Logged
The Toad, a Natural Resource:  Preserve yours today!

Zurai

  • Bay Watcher
    • View Profile
Re: Kobold Quest port status?
« Reply #36 on: October 30, 2006, 10:39:00 pm »

Endianness makes my head hurt. It's one of the few programming problems (along with networking) that makes me want to not be a programmer, heh.
Logged

nihilocrat

  • Escaped Lunatic
    • View Profile
    • http://nil.cjb.net
Re: Kobold Quest port status?
« Reply #37 on: November 22, 2006, 11:05:00 am »

has there been any more progress with this port? I downloaded the latest source from popecharlotte and plan to compile it on Ubuntu sometime this week.
Logged

DDouble

  • Bay Watcher
    • View Profile
Re: Kobold Quest port status?
« Reply #38 on: November 22, 2006, 07:29:00 pm »

^^^^

Wow almost one month gap between these last 2 posts. I don't use a mac but a cafe I like to go to only has two imacs, and I would love to play some DF there. I could probably get at least 5 people hooked (its a comics cafe, tons of nerds there).

Logged

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: Kobold Quest port status?
« Reply #39 on: November 22, 2006, 07:36:00 pm »

I don't know anything about how Macs store files, so I can't do that part without burning a lot of time.  I'm not even sure what all the issues are.  The way the data is stored in the game and the way they are written to a file by another OS aren't necessarily the same, so files wouldn't work between computer without some kind of header information in the file and routines that can convert from the save format to the storage format for a given system.  Perhaps there are other issues as well.
Logged
The Toad, a Natural Resource:  Preserve yours today!

segmose

  • Bay Watcher
    • View Profile
Re: Kobold Quest port status?
« Reply #40 on: November 23, 2006, 03:31:00 am »

ASCII Tekst files are mostly compatible between platforms, problems are floating points and time.
Logged

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: Kobold Quest port status?
« Reply #41 on: November 23, 2006, 03:37:00 am »

There are plenty of floating points and 32 bit integers and other variables that are saved to the disk.  If a "long" isn't 32 bits on another platform or the order of the 4 bytes is reversed, that would need to be accounted for, and I have no idea what other platforms do.  I'm not even sure how my own platform stores the 4 bytes.
Logged
The Toad, a Natural Resource:  Preserve yours today!

X

  • Bay Watcher
    • View Profile
Re: Kobold Quest port status?
« Reply #42 on: November 24, 2006, 03:58:00 am »

code:
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import struct
>>> struct.pack("i",7)
'\x07\x00\x00\x00'

One easy way to see int as 4 bytes LE.

X

Logged

segmose

  • Bay Watcher
    • View Profile
Re: Kobold Quest port status?
« Reply #43 on: November 24, 2006, 05:41:00 am »

What I meant was to simply store the data as text, no need to wonder on byte ordering.
As 0x000A gets stored as "10".
Logged

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: Kobold Quest port status?
« Reply #44 on: November 24, 2006, 02:55:00 pm »

This would increase the file size by quite a lot.  Right now, I copy things into a character array which is then compressed by zlib and saved.  It could copy the longs and other variables into the array as a number string instead (so a long would take 11 bytes, and a short would take 6 bytes), but it would be best to handle the issues prior to saving the file.  As far as I know, I'd only need to handle the one place where the longs are copied into the compression array, since after compression it's just a list of chars that can be saved easily.  So it's just a matter of knowing sizeof(long) and the endian issues for long (and other types) on the target system, and making the small number of "copy into the array" functions behave differently based on the OS.  Unless there are various things I'm missing, which is quite possible.
Logged
The Toad, a Natural Resource:  Preserve yours today!
Pages: 1 2 [3] 4 5 ... 13