Jump to content

Blades of Exile Source Code Released


Recommended Posts

Yay!

 

The resource files don't work for me, though - either both the decompression programs I have lose them, or the compression program lost them.

 

Edit: Whee, down to 131 compiler errors!

Link to post
Share on other sites

Downloading from a different site didn't help. I'm decompressing them on an Intel Mac with Stuffit Expander 11 and with the Finder's built-in thing. I'm using ResKnife to look at them, but what tipped me off is that they take up no disk space.

 

Edit: Downloading the BoE demo does give me something with the resources in.

Link to post
Share on other sites

I'm also seeing zero-sized resource files. It looks like the compression was done using a program that doesn't know about resource forks. Possibly the best fix would be to convert them to data-fork-based resource files before compressing, since that is the preferred way to package resources in Mach-O apps anyway.

 

On another topic, has anyone set up a SourceForge project or similar to coordinate development of a "baseline" modernised version of BoE? Having a version control repository will make life much easier if there's more than one person that wants to work on it.

 

I have some ideas for future development directions, but they can wait until after the code actually builds. smile

 

Finally, allow me to join in saying a big "Thank you!" to Jeff and co. for releasing this.

Link to post
Share on other sites

OK, I messed up with compressing the files. I forgot what .zip format does to resource forks.

 

If you go to the source code page now there is a Macintosh download in StuffIt format. If you download that you can find the proper resource files.

 

- Jeff Vogel

Link to post
Share on other sites

Khoth, I haven't encountered a VCS that will handle resource forks out of the box. You could probably do some AppleDouble magic using commit hooks, but that's a pain. The first thing I did with the source was to move all the resources to the data fork by running "DeRez foo.rsrc > foo.rez && Rez foo.rez -o foo.rsrc -useDF" for each resource file. As I mentioned above, this is the Apple-recommended way to store them these days, since it helps apps to not get destroyed by zip.

 

I've made an XCode project that will build all three BoE apps (once carbonisation is complete). I've been doing some carbonising, starting with the character editor because it looks the easiest. I wouldn't want us to be duplicating effort, so maybe we should try to coordinate, and share a source repository?

Link to post
Share on other sites

One note about using XCode. The way I use resource files in XCode is to not include them in the project but to open them with HOpenResFile as soon as the program launches.

 

It's not optimal and I'll have to change someday, but it'll work for now.

 

- Jeff Vogel

Link to post
Share on other sites
Quote:
Originally written by Tesseract:
Khoth, I haven't encountered a VCS that will handle resource forks out of the box. You could probably do some AppleDouble magic using commit hooks, but that's a pain. The first thing I did with the source was to move all the resources to the data fork by running "DeRez foo.rsrc > foo.rez && Rez foo.rez -o foo.rsrc -useDF" for each resource file.
Easier solution:
Code:
dd if=foo.rsrc/rsrc foo.rsrc
No need to roundtrip through Rez format.
Link to post
Share on other sites

Could someone help me a little? I have no knowledge of how to compile something like this (running Mac OS X Tiger), so I would appreciate it greatly if someone would find the time to either give me a link to a page containing instructions, or write something simple out himself. Or something. Anything is excellent.

Link to post
Share on other sites

Is there no way to compile it and then run it in Classic mode? I do know that carbonizing is required before running it natively in OS X, but I'd think that there would be some way to compile it into a classic application.

However, I know virtually nothing about the process, so I might just be babbling meaninglessly. :p

Link to post
Share on other sites

It should compile/run in classic mode. While I'm not up on compiling applications like this, my abilities are far more in the scientific code which largely work independent of platform, you will need a C++ compiler for OS 9.

 

Just curious, is anyone actively going to work on carbonizing it?

Link to post
Share on other sites

If you are going to use XCode (a very wise idea), you will probably want to shoot straight for a OS X Carbonized version. Apple has made it difficult to do anything else. Forget Classic.

 

Once that is done, Universal is the natural next step. Once someone has a Carbonized version up and running, were that peson to ask me for Universalizing tips, I woud be happy to give them.

 

- Jeff Vogel

Link to post
Share on other sites
Quote:
Originally written by *i:
It should compile/run in classic mode.
Yep, building it for OS 9 should be relatively simple if you have a copy of CodeWarrior.
Quote:
Just curious, is anyone actively going to work on carbonizing it?
Yes, Khoth and I are working on it. So far I have the character editor compiling with no warnings, now I have to get it to find the resources in the graphics and sound files.
Link to post
Share on other sites

I just put out new versions of the Windows source, which contain all of the files. Some of them were missing.

 

"Strange thing. There are files called LARGE.h MEDIUM.h and SMALL.h which are basically lists of towns from Exile 3. Are these files really necessary to compile BoE? I'm on Windows, BTW."

 

Those are superfluous files from Exile 3 put in there by mistake. Phear mah organizational skillz!

 

- Jeff Vogel

Link to post
Share on other sites

Hey, I'd like to say that I think it's great you've released this for your fans.

 

I also have a couple of technical questions. Are you releasing the graphics and sounds under the CPL as well? Are you generally ok with people using the oringal exile graphics in BoE for other projects? For example, I've wanted to put together some kind of simple tile based web game for a while, and the exile tiles that BoE, which I've always liked, would let me get around my general lack of artistic skill.

 

Has anyone set up a repository of some kind? I tried to get to khoth's page, but it looked like his site was down. Has anyone tried putting the project up on source forge? That would be pretty handy, as most people are going to at least want to be able to start with whatever changes have already been made by khoth (or at least get ahold of the xcode project).

Link to post
Share on other sites

Status update: It compiles, and links, and shows the loading screen, and crashes when drawing the main menu screen. I don't know why.

 

Edit: Got past that, but it's still not quite perfect , and can't run scenarios yet:

Link to post
Share on other sites

Okay, I have a version that works well enough that people might want to see it. It's still a bit rough around the edges, and also rough in the middle, though.

 

If it doesn't work for you, let me know. If it does work for you, let me know too, because I currently don't know what the system requirements are, beyond "OS X".

 

Get it here: http://khoth.ath.cx/~khoth/

Link to post
Share on other sites

Neat! It seems to work fine with everything I've tried, with one exception: I don't think it reads old save files from the Classic app. Is it possible to make it do this?

 

I know Jeff's games generally don't, when they get Carbonized, but I don't have any idea what the technical reasons are for that (i.e. whether it's just hard or actually impossible).

Link to post
Share on other sites

Applications without icons bug me, so I resized the old BoE icon to 128x128 (OS X icon size) and pasted it onto the app. I have it available on my webspace . This archive is identical in very way to Khoth's with the exception of the old BoE icon pasted onto the app.

 

EDIT: I found a problem. It doesn't open BoE save files, even ones that you save with this app.

Link to post
Share on other sites

Nevermind. Apparently, it can't open it if you overwrite an older file, but if you create a new one, it works fine.

 

EDIT: If it can feasibly be removed, the dialog box that pops up at the beginning asking if you want to change your graphic settings refers top problems in pre-OS X Macs, so that should be removed since it doesn't have an option to not change and never ask again.

Link to post
Share on other sites
Quote:
Originally written by Kelandon:
Neat! It seems to work fine with everything I've tried, with one exception: I don't think it reads old save files from the Classic app. Is it possible to make it do this?

I know Jeff's games generally don't, when they get Carbonized, but I don't have any idea what the technical reasons are for that (i.e. whether it's just hard or actually impossible).
The save game file may be in a slightly different format in OS 9 and OS X versions. All it takes is one number saved in a different format or order to cause trouble.
Link to post
Share on other sites

The game format is exactly the same for Classic and OS X, and I've never had any trouble loading one of the other. It's only with Universal that you have to be careful with file loading. So this is odd.

 

- Jeff Vogel

Link to post
Share on other sites

Khoth's Carbonized build works quite nicely on my PPC machine. It looks a little "off" in windowed mode, though - the content ends up shifted to the left a bit (maybe 16 px or so), and the splash doesn't quite draw properly.

 

Haven't tried loading an old-style save, so no idea how that works. Issues with those are probably just a matter of a missing or an extra endian swap, though, and might not manifest on PPC anyway. Loaded its own savefiles just fine, though.

 

And yes, the initial "i can has 256 colors plz" dialog is completely redundant under OS X. Kill it with fire.

Link to post
Share on other sites

I've put out a second release, which adds an icon, removes the startup screen and makes savefiles compatable with the old BoE's (it was a struct alignment issue).

 

Note that this breaks compatability with savefiles created by release 1 (which is why I wanted to get this out as quickly as possible).

 

It'd be great if people who report it working also tell me what version of OS X they have. Currently, I don't know whether the requirements are 10.4, 10.0 or something in between.

 

As for documenting the internals, I'm currently not that interested in digging through looking at game mechanics, although documentation of file formats would help with universalisation and making a more compiler-independent file-loading mechanism.

 

My plans for the future are, in increasing order of time and decreasing order of probability:

1. Sort out problems in the current version and get it as good as the original BoE.

2. Carbonise the scenario editor.

3. Do some cleaning up on the code.

4. Fix longstanding bugs that can be fixed without breaking compatability with the old BoE (I'm not sure how many of these there are. Most of the "X doesn't work" are probably not in this category).

5. Add some helpful features like the ability to read PC graphics files.

6. Fix bugs that would break compatability (with notice in the scenario editor if you rely on something that woudln't work in old BoE).

 

I'm not sure where Universalising fits into this. I don't know how much work it is, and I'm not sure about the benefits. If it's fast enough already, there doesn't seem to be all that much of a point. If Warcraft III can run fine under Rosetta, I don't see why BoE couldn't. However, speed, ease of debugging or perfectionism might tempt me to. And don't let anything stop you from making it universal, if you want to.

 

Anyone else working on this is welcome to send me patches (ideally in darcs format), which I will apply if there's no good reason not to.

Link to post
Share on other sites

No! God, Khoth, you can't mean this... It's just two second ago I took the trouble to make an icon and put it up on my website for other people to enjoy it. Don't take it the wrong way, I'm pleased to no end with this carbonized copy, it's just that I wasted my time on that icon, with which I'm not quite happy...

 

Oh well.

 

EDIT: Og hod, I see others made one as well... Come on Thralni, read...

Link to post
Share on other sites

It sounds like you've done a super-excellent job. I'll try to take a look soon. We should discuss if/how I link to your work from the main site so a more general class of players can enjoy the game.

 

"I'm not sure where Universalising fits into this. I don't know how much work it is, and I'm not sure about the benefits. If it's fast enough already, there doesn't seem to be all that much of a point."

 

I think you're right. As long as Rosetta exists and your game functions properly under it, Universalizing is of questionable benefit. And it's a lot of work.

 

- Jeff Vogel

Link to post
Share on other sites

I've now put up release 3.

Changes:

Spell targeting and animations work.

Uses less CPU on idle.

Can read .bmp custom graphics files (it seems that the newer the computer, the harder it is to transfer a resource file over the internet without it getting lost or corrupted).

 

There's still the odd way the main screen window is a bit too small for the content, which I haven't got to the bottom of. There are no other known issues (but lots of unknown ones - go and find them).

 

Jeff - I should be thanking you. You've done a lot more for BoE than I ever will. As for hosting the thing, something more reliable and long-term than my personal computer would probably be good, in the long run. I'd suggest that after it's settled to a reasonably stable and polished version, you host Release 10 (or whatever it turns out to be) on spidweb.com, and provide a link to my page for updates and the repository.

 

Dahak - I don't imagine it would be hard, but what about diagonal movement?

Link to post
Share on other sites

Re: Hosting Blades.

 

When you have something suitably stable and tested ready, drop me an E-mail. (And, if you don't hear back from me, drop me another one. These days, spam filters eat things. This also applies, by the way, to people who submitted Blades scenarios which never appeared on our site. I'm thinking of Exodus.)

 

Re: Arrow key movement.

 

Wow, didn't Blades of Exile support arrow key movement? I thought I'd added that by then. It's a very good idea, even though no diagonals is a hassle.

 

- Jeff Vogel

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...