Jump to content

Finally, some progress!


Celtic Minstrel
 Share

Recommended Posts

Over the past week or two (or maybe it was three now) I've been hacking at Blades of Exile to erase all or most of the use of legacy libraries, in particular the Carbon library.

 

Today I finally managed to get the startup sequence to work, and some of the menu options (those that just display a dialog) also work. I haven't yet tried loading files. The dialog engine that I wrote years ago is working pretty well (it needed a few tweaks, of course, and in fact probably still does).

 

If all goes well, I'd like to release a build soon for people to look at. I'd like to at least have file loading functional first.

 

I was also wondering about one thing in particular. Some of the dialogs contain things like email addresses; should I leave those in? I'm asking because the dialogs are now stored as XML, so the email would be clearly visible in plaintext, potentially inviting spam. I could either remove them, leave them, or obfuscate them somehow.

Link to comment
Share on other sites

I'd imagine the emails were stored in plaintext in the .RC files (or mac equiv) beforehand, so it probably wouldnt make a difference to bots scraping the source code. Plus, the average spam filter is pretty robusy nowadays.

 

But for reals this is awesome news! iirc your dialog system was cross-platform via wxwidgets, right? If so, that puts us one step closer to a unified source :)

Link to comment
Share on other sites

No, this is the pre-wx version of the dialog engine (which used Carbon); I gave up on using wxWidgets. Instead I'm using a library similar to SDL. Most of what I'm doing right now is cross-platform, though; the main exceptions are menu management, some bits of the window management, and AppleEvents (to handle double-clicking a save file), which use Cocoa.

 

Beforehand the emails were stored in the resource files, so not exactly plaintext, but now that you mention it, they may have also been in RC files in the Windows code. If this is the case, I guess I won't worry about it.

 

By the way, I'd like to include all fonts the game relies on in the repository; currently none of them are there. I have files for all the fonts, and don't really see any issues in including Dungeon Bold and MaidenWord, but I doubt it's a good idea to include the Geneva font. Does anyone have suggestions for a good replacement font that looks pretty similar? I had also started using Silom as a replacement for Geneva Bold, so a replacement for that would be nice too.

Link to comment
Share on other sites

DejaVu Sans seems good. Linear also looks good, but seems to be quite a bit smaller, so we'd have to increase point sizes to use it.

 

DejaVu Bold seems too heavy, though; for the "bold" text I think I'd like something a little less bold, more like Silom.

 

By the way, is there a way to convert old links to the new forum?

Link to comment
Share on other sites

I've uploaded a build here if anyone cares to take a look. You need to put fonts called "Geneva.ttf" and "Silom.ttf" into the data/fonts folder before it will run. In the case of Geneva, that means changing the file extension to .ttf. (By the next build I expect I'll have replaced these fonts with free ones, rendering this step unneeded.)

 

I haven't tried, but I don't think saving the game works yet. I wouldn't say the game is playable at the moment; you can make a party, start a scenario, and play, but there are a lot of bugs, some of which might be game-breaking.

Link to comment
Share on other sites

Another beta build is available here. I think this one is actually playable; I fixed a number of major bugs that would have gotten in the way of playing through scenarios. Also, saving and loading works now (though not necessarily perfectly). I know of quite a few other bugs, but I think most of them are aesthetic, for example seeing through walls in combat mode, terrain not blacking out while resting, or missile/boom animations and monster movements not showing. I'm not going to fix the latter at this point; I believe it would require quite a significant reworking of the animation code, which I'd rather not do with the Windows codebase still not merged in.

 

Anyway, next step is to get a working scenario editor (albeit one unable to save), then I'll probably try to get the formerly-OSX source to compile in Visual Studio and work on merging in the Windows source.

Link to comment
Share on other sites

  • 7 months later...

And now for some magic transcript magic!

 

boe-transcript-collapsing.png

 

This differs a little from what was done in the Windows code, which collapsed Blocked messages and completely eliminated Moved messages. This change affects all messages - anytime the same message is printed twice in a row for any reason, it will be collapsed as seen in this screenshot. (This does include messages printed by special nodes.)

 

I might add an option to force a duplicate message; not sure if there'd be a use for that (either in normal game messages or for scenarios).

Link to comment
Share on other sites

  • 3 weeks later...

What used to be the Mac code base now compiles and runs in Windows. It's not playable yet, though - there are three or four major issues to resolve still. If there's anyone more familiar with WinAPI than me, perhaps they could help out with some of them.

 

  • Open File dialogs don't work, though Save File dialogs do, for some reason. The code path for the two is nearly identical, so I'm not really sure why it's not working. (By "working" I mean "the dialog is displayed".)
  • Tiled patterns are drawn in the wrong place; this issue probably has little to do with WinAPI, though it does go away if I don't put a menubar in the window.
  • Cursors aren't showing. I assume it has something to do with how I'm trying to create a cursor from a GIF file, using SFML to load the image, transfer it to an HBITMAP, and then transform it into a cursor.
  • When I step into Sweetgrove the scenario ends. I had this issue on Mac already and fixed it, so hopefully I can fix it again.
  • On a brighter note, the menubar works perfectly insofar as I can ascertain without the ability to load files, and preferences seem to be working perfectly as well (they're saved in "%APPDATA%\Blades of Exile\bladesprefs.ini"). I'm not sure if they're technically an INI file format, but each line is of the form "key = value" where value is true, false, an integer, or a space-separated list of integers enclosed in square brackets.

 

Also, someone might want to set stuff up so that Sylae's automated build system picks up this version rather than (or possibly in addition to) the older Win32 version. I've imported a lot of stuff from the latter version into this version, but there are still some things that haven't been brought in, like "Concise Town Report" and several more "text dump" options in the scenario editor. There are actually quite a few dead menuitems that haven't yet been implemented. Anyway, I'll decide whether to import or delete these options later, once all the basic functionality is working properly.

Link to comment
Share on other sites

Okay, I have a mostly working build for people to putter around with. I think the game is more or less playable, though there could still be some crashes I haven't found (the Mac version has been tested more than the Windows version, but Windows is more likely to crash on things like invalid memory accesses). The scenario editor is almost fully-functional; it still can't save scenarios, though.

 

Windows | Mac

Link to comment
Share on other sites

  • 4 weeks later...

I'm almost finished implementing the new scenario format, and hope to release another build for people to try out by this weekend, one in which you can actually create and try out scenarios. It'll probably be rather buggy since I haven't been able to test most of the new features (due to the lack of the scenario format implementation), and it's probably not a good idea to actually start designing a new scenario with it since I might make some incompatible changes to the format (though, since it's a plaintext XML format, you could probably correct those manually by editing the file).

 

-----

 

There's a minor issue with shops in that there's not enough space for the item info string, and I was hoping for some feedback on it. Here's what it looks like now:

 

boe-shop-sample.png

 

The space to the right of the I button is reserved for the scrollbar, when it appears. (I could shift things right when the scrollbar is hidden, but that doesn't solve the core issue.) As you can see, the cost string and the info string are overlapping. I was considering moving the item cost somewhere else, but I'm not sure where; perhaps moving it up (in line with the name) could work, though I'm not certain it can be guaranteed to not overlap with the name. Or maybe putting it next to the icon somehow. Another possibility might be to leave it where it is and render the info string in the "plain text" font instead of the "bold" font, or to tweak font sizes. Maybe there's a reasonable way to eliminate the prefix string "Cost:" without sacrificing clarity.

 

Any thoughts on this?

Link to comment
Share on other sites

So unless I stupidly missed something, the new Open Blades of Exile scenario format is pretty much complete... saving code is complete, and now I just need to implement loading code and make sure there aren't any obvious data losses.

 

It's literally a gzipped tarball containing various files. The schemas for the XML parts can be viewed on the repository in the rsrc/schemas directory; special nodes and map/location data have a custom format that is technically undocumented, though there are samples in the rsrc/boes directory. The archive can also contain custom graphics and sounds. At some point, it might also be possible to put in custom XML dialog definitions to be used for complicated special encounters.

 

Once I've implemented loading, I'll make sure it builds on Windows (last I checked there was at least one compile error) and release another build for both platforms.

 

(If anyone is wondering about the shops thing, I took Lilith's suggestion and cut out a chunk of the standard gold item icon to use there.)

Link to comment
Share on other sites

Update: I was sort of hoping to have a build released today (and said as much to ADoS), but first I got distracted by a few other things, and then I underestimated the time it would take for implementing loading. I'm about... one-eigth of the way through, probably? It's not especially hard, but it's time-consuming. I'll see how it goes; it's probably not something I can work on for six hours straight, but I think it's quite likely that I'll be done well before the end of next week, after which the only thing left is some testing (to make sure loading and resaving doesn't lose anything) and getting it to build on Windows. There are a couple of other things I want to do (like support for editing a scenario in unpacked form), but they're not absolutely essential, so I'll put them off until after the release.

 

Sorry, ADoS!

Link to comment
Share on other sites

And here it is. A version with a fully-functional scenario and a new scenario format. This version could probably be used for developing scenarios, though there are still likely a lot of bugs.

 

There's one major issue still with Mac custom graphics in legacy scenario, though. Some custom graphics files will fail to load. It should be possible to get around this by copying the picture to a BMP. There might be other ways around it (the cause of the issue is that my PICT loader doesn't support QT-compressed data embedded in the PICT resource).

 

Download: Windows | Mac

Edited by Celtic Minstrel
Whoops, released a Debug build
Link to comment
Share on other sites

Yes, I'm aware it depends on that, and I think I mentioned it earlier. (Note that according to the official download page, it can install on XP; however, the above build likely won't run on XP for other reasons.) We also noticed it doesn't work on WINE. ADoS is having much trouble getting it to work even on Vista (emulated) or Win7, though, and I can't figure out why; maybe you could help?

 

There's someone working on a Makefile system that Sylae could probably use in her MinGW build on the Jenkins site. I don't know if a MinGW build will fix all the issues ADoS is having, though.

Link to comment
Share on other sites

  • 3 weeks later...

Someone requested it, so here's a downloadable version of the Blades of Exile HTML documentation. It includes both the game documentation and the editor documentation; however, keep in mind that parts of it may still be out of date.

 

Download

 

By the way, I noticed that Sylae's copy of the docs is out-of-date now - is there any way to get them to automatically update as part of the Jenkins build process?

Link to comment
Share on other sites

Erdos (iasEnvy on github) was trying to work on a Makefile (for compiling the Mac version), but I think he actually made less progress than you did. I might start working on something too at some point.

 

Ligrev just said there was a build, but the documentation here seems the same. Do I have the wrong URL or something? These URLs are also hard-coded into the source code (in the function handle_menu_choice in all three *.main.cpp files), so if they're wrong, feel free to update them.

Link to comment
Share on other sites

I'm manually running builds to try and get the config going, sorry for the ligrev spam. Once I get everything up I'll update the URL and put a redirect in the old spot (the ~sylae url was supposed to be temporary anyway :p)

 

EDIT: Is done. There's a 301 at the old url for any bookmarkers.

Link to comment
Share on other sites

  • 2 months later...
  • 3 weeks later...

And now, another release! Lots of bugfixes, a few new features.

 

Download: Mac | Windows | Windows installer | HTML documentation

 

Note: There are still a few minor issues with the uninstaller; some things might not be removed properly. However, using the installer has the advantage of letting you double-click BoE saved games and scenarios.

 

There's also a makefile in progress (currently it works perfectly for compiling on Mac, but makes no allowances for Windows), so perhaps Sylae's automated build setup can finally be put to use soon. See it here (also notice build.sh, which is the main entry point for building the game).

Link to comment
Share on other sites

Just FYI, as of Wine 1.7.45, the VC++ package is installable in Wine and the game runs!

 

Edit: err, it runs, but is very slow and crashes a lot. I'll see if I can fix any of this stuff.

 

Edit 2: looks like an unimplemented function is being called somewhere. I think it might have to do with different C++ function name mangling on Windows vs. Linux? Not sure.

Link to comment
Share on other sites

It seems like that unimplemented function is something to do with threads. I already put up a new Windows version which should fix it (by using a different thread class).

 

If you're going to try and fix stuff, I'll go make sure I've pushed everything I have.

Link to comment
Share on other sites

The above works now. Thank you! Seriously, this is amazing.

 

Edit: still crashes on save in the Scenario Editor...

 

Really though I should not have offered to try and fix stuff, because

a) I'm not much good with C++

B) I'm mad busy right now (just started on a new job last week)

 

And also I've basically abandoned the idea of making a BoE scenario, at this point.

 

Your work is seriously impressive though. Just messing around in the Scenario Editor, I was able to create a wand that shoots slime and is powered by the weilder's intelligence. The level of control is astonishing.

Link to comment
Share on other sites

That's okay, there's no obligation for you to help fix things, after all. Still, if you happen to find time or motivation later, that would be nice.

 

For now, if you could send me the crash report from when you tried saving in the Scenario Editor (with the stack trace and everything), that would be great. (Or if it was an "Error!!!" dialog, then copy the error message with the Copy button and paste it here.

 

As for your messing around, I'm not really quite sure what you've done to make that wand, but I'm glad you like my work.

Link to comment
Share on other sites

Here's another release, with more bugfixes and some new features (like Resize Outdoors and Import Outdoor Sector, and recursive search for scenarios so that you can put them in subfolders).

 

Also, if you drop the docs into doc/ in the BoE directory (so that you have three folders editor/, game/, img/ under doc/), the game will use that when Help Contents is requested, rather than connecting to the online copy on Sylae's website.

 

Download: Mac | Windows | Windows installer | HTML documentation

 

The Windows Installer now includes the documentation as an optional module. The main advantage of using the installer is that you'll be able to double-click saved games and scenarios to open them; I'm assuming this won't work if you're running under WINE, though.

 

Note: There are still a few minor issues with the uninstaller; some things might not be removed properly. However, using the installer has the advantage of letting you double-click BoE saved games and scenarios.

Link to comment
Share on other sites

I discovered a bug in the above build that will cause loss of data in some situations when saving. The special abilities of your equipment will become corrupted, and in the scenario editor, terrain type abilities will also be shuffled. In particular, do not save on the above build if the party is split up.

 

I'll have a new build to replace it soon, maybe later today, maybe tomorrow (depending when I get around to it; feel free to poke me if you want it sooner) - the bug has already been fixed in my local repository.

Link to comment
Share on other sites

As promised, here's another release fixing the save/load bugs and some other things.

 

Download: Mac | Windows | Windows installer

 

Note: There may still be a few minor issues with the uninstaller; some things might not be removed properly. However, using the installer has the advantage of letting you double-click BoE saved games and scenarios.

Link to comment
Share on other sites

  • 2 months later...

And now, yet another release! This one includes lots of new graphics, thanks to ADoS. In particular, the new status effects and the party status effects finally have icons made specifically for them (rather than placeholders grabbed from Blades of Avernum).

 

Download: Mac | Windows | Windows installer | Documentation (note that the installer includes this)

 

Note: There may still be a few minor issues with the uninstaller; some things might not be removed properly. However, using the installer has the advantage of letting you double-click BoE saved games and scenarios.

Link to comment
Share on other sites

  • 2 weeks later...

The only things a failed shader would cause is chunks out of walls, pits, and water. If there's a shader problem you should also be able to see it in the bladeslog, which for Windows can be found at "%APPDATA%\Blades of Exile" (just press Windows+R and paste that in). On the Mac version it'd be in Console.app somewhere.

Link to comment
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.

 Share

×
×
  • Create New...