Help - Search - Members - Calendar
Full Version: Xbak An Engine For Betrayal At Krondor
GP32X.com - GP32 GP2X Pandora The Wiz - open source entertainment > GP2X > General talk [GP2X]
Pickle
FYI for all,
Im trying to port this over to the GP2X, it does compile and does start, but it crashes near the beginning. I do have the win32 versino working, so I think its just a matter of workng with the original developer to figure out whats going wrong on the GP2X side.
The game engine isnt completed yet, but once I make the minor changes neeeded (controls) it should be able to run on the GP2X nicely when it is finished.

Right now the engine plays some images from the intro and does a little bit of the 3d view.

xBak

(if any mods read this, I initialy posted this in the news section but didnt really want it on the main page, but im not sure if that was possible. So I think my original post is stuck in the bit bucket, if you can find it please just delete it)
virusx
That game looks nice. Never played the original.
I wish you good luck for this smile.gif
Pickle
QUOTE(virusx @ Aug 23 2007, 08:57 AM) *

That game looks nice. Never played the original.
I wish you good luck for this smile.gif


you can find the original in certain places where it is considered abandoned. I do have the original CD.
The game is an RPG and has a square based tactical battle system. You also move about the world in pseudo 3d. As you move you can see objects, such as people, buildings, tress, monsters, chests...so on. It was quite an amazing game at the time.
Betrayal in Antara was a sequel that improved on graphics, different world though.
Zeladin
Oh! Now this is something to look forward to! I also have the original stashed somewhere. I can't remember when I last had a PC that ran it though.

Anyway, good luck Pickle, I'll definitely be putting this on my Gp2x.
virusx
It reminds me a bit of Drakken on Amiga (Gosh, I played this game sooo much).
Pickle
QUOTE(Zeladin @ Aug 23 2007, 09:47 AM) *

Oh! Now this is something to look forward to! I also have the original stashed somewhere. I can't remember when I last had a PC that ran it though.

Anyway, good luck Pickle, I'll definitely be putting this on my Gp2x.


Just remember that the engine itself isnt finished, so its not a playable game yet.
hackgrid
Cool! The successor, Return to Krondor was great too!
Zeladin
QUOTE(Pickle @ Aug 23 2007, 03:57 PM) *

QUOTE(Zeladin @ Aug 23 2007, 09:47 AM) *

Oh! Now this is something to look forward to! I also have the original stashed somewhere. I can't remember when I last had a PC that ran it though.

Anyway, good luck Pickle, I'll definitely be putting this on my Gp2x.


Just remember that the engine itself isnt finished, so its not a playable game yet.
...Once its done smile.gif

I gotta watch those ambiguous sentences. If you need play testing etc, I'll probably be kicking around - but I can see this isn't quite at that stage yet.
Pickle
QUOTE(Zeladin @ Aug 23 2007, 12:53 PM) *

QUOTE(Pickle @ Aug 23 2007, 03:57 PM) *

QUOTE(Zeladin @ Aug 23 2007, 09:47 AM) *

Oh! Now this is something to look forward to! I also have the original stashed somewhere. I can't remember when I last had a PC that ran it though.

Anyway, good luck Pickle, I'll definitely be putting this on my Gp2x.


Just remember that the engine itself isnt finished, so its not a playable game yet.
...Once its done smile.gif

I gotta watch those ambiguous sentences. If you need play testing etc, I'll probably be kicking around - but I can see this isn't quite at that stage yet.


You can always gave the source from the link I gave and run on a x86 linux/win32 machine
InsertFaveGameNameHere
Oh wow oh wow. Please keep going with this one! smile.gif I still have BaK, it was released as freeware so can be legally downloaded if you find it online, they released it to promote the sequel I think. I wonder if it would look good on the handheld, hopefully we'll find out one day!

So is this open source or do you have permission of the original developer you mention?

Its great you're doing it either way, I wish you best of luck!
Pickle
QUOTE(InsertFaveGameNameHere @ Aug 24 2007, 07:33 AM) *

Oh wow oh wow. Please keep going with this one! smile.gif I still have BaK, it was released as freeware so can be legally downloaded if you find it online, they released it to promote the sequel I think. I wonder if it would look good on the handheld, hopefully we'll find out one day!

So is this open source or do you have permission of the original developer you mention?

Its great you're doing it either way, I wish you best of luck!


Thanks, im trying....

Im not sure if its freeware, I suppose it could be abandoned since dynamix no longer exists. If you have a source on this post it.

The original project is GPL, you can find it on sourceforge, just search xBak.
Lurkio
QUOTE(InsertFaveGameNameHere @ Aug 24 2007, 08:17 PM) *

what does GPL mean?


Info
Pickle
I have both version win32 and gp2x versions compiling as stated before.
Win32 works, Gp2x is crashing

The problem is boiling down to opening of the resource files. The file is being opened, I proved that, but when a read is done the FAILBIT of the ifstream is being set. If anyone has some ideas on this I open to ideas. Heres the code:

void
FileBuffer::Load(std::ifstream &ifs)
{
if (ifs.is_open()) {
current = buffer;
ifs.read((char *)buffer, size);
if (ifs.bad()) {
throw IOError("BADBIT " __FILE__, __LINE__);
}
else if (ifs.fail()) {
throw IOError("FAILBIT " __FILE__, __LINE__);
}
} else {
throw OpenError(__FILE__, __LINE__);
}
}

Guyfawkes
Betrayal At Krondor is one of the finest games ever made, I had this when originally released and I remember bunking of college for a few days to play the game smile.gif
Pickle
QUOTE(Guyfawkes @ Aug 26 2007, 07:50 AM) *

Betrayal At Krondor is one of the finest games ever made


Agree!

Im making some progress debugging the GP2X version. I added some debug statements and I was incorrect in suspecting the ifstream. The file is being opened and read. The problem is a certain point in reading a buffer the file data the wrong answers are coming back, actually shifted by one byte, which results in a EOF.
For example the data will be 00 E8 06 in the file, the win32 version will give 06E8, where the Gp2X version will give E800. This portion of the code is using byte swapping functions from SDL_endian.h. I need to dig into it more, Im not sure if its limited to 16 bit, since I did one test with 32 bit version and both win32 and GP2X give the correct data.
Pickle
IT'S ALIVE! IT'S ALIVE!
icurafu
QUOTE(Pickle @ Aug 28 2007, 09:24 AM) *

IT'S ALIVE! IT'S ALIVE!


Congratulations, was one of my favourite games of all time. alonmg with StarControl 2 and Ultima7. (Which both exist on the gp2x)

However, I sold my GP2X a week ago for US$220. Hopefully I can use this on the F-200. smile.gif
Pickle
QUOTE(icurafu @ Aug 27 2007, 07:45 PM) *

QUOTE(Pickle @ Aug 28 2007, 09:24 AM) *

IT'S ALIVE! IT'S ALIVE!


Congratulations, was one of my favourite games of all time. alonmg with StarControl 2 and Ultima7. (Which both exist on the gp2x)

However, I sold my GP2X a week ago for US$220. Hopefully I can use this on the F-200. smile.gif


You know it would be realy cool with the touch screen. (Adding controls next)
icurafu
QUOTE(Pickle @ Aug 28 2007, 09:48 AM) *

QUOTE(icurafu @ Aug 27 2007, 07:45 PM) *

QUOTE(Pickle @ Aug 28 2007, 09:24 AM) *

IT'S ALIVE! IT'S ALIVE!


Congratulations, was one of my favourite games of all time. alonmg with StarControl 2 and Ultima7. (Which both exist on the gp2x)

However, I sold my GP2X a week ago for US$220. Hopefully I can use this on the F-200. smile.gif


You know it would be realy cool with the touch screen. (Adding controls next)


Agreed. And so would Ultima 7. biggrin.gif
Cruel
Wow! Wow! Great game indeed!
I couldn`t even dream, that it would work on GP2X!

Good luck with it!
InsertFaveGameNameHere
Wow progress seems to be fairly rapid. So if you're working on the controls, how far aware are we from seeing a beta then? I wish I could help really...

So weird though, this is one of the games I thought 'would be amazing to see this on the 2X...' and within a month of me finding out about the 2X (and buying one not long after) its on its way. Amazing. Next someone will do an Elder Scrolls: Arena port...*looking around hopefully*
Pickle
QUOTE(InsertFaveGameNameHere @ Aug 29 2007, 02:36 PM) *

Wow progress seems to be fairly rapid. So if you're working on the controls, how far aware are we from seeing a beta then? I wish I could help really...

So weird though, this is one of the games I thought 'would be amazing to see this on the 2X...' and within a month of me finding out about the 2X (and buying one not long after) its on its way. Amazing. Next someone will do an Elder Scrolls: Arena port...*looking around hopefully*


um, i think you and some others have the wrong impression of what I have done so far and what the original developer has done.

The xBak engine itself is in a early stages and is not a playable game. I have not done any development on the xBak engine. My goal is to port what is done and have it running on the GP2X, so that when the engine progress's it can be quickly recompiled for the GP2X.
My post a couple days ago was to tell everyone that I had a version that running. Before I had a version that was crashing in loading stages.
There still some problems, right now im stuck at the main menu, but it is displaying.
1. I havnt hooked up a working mouse or fixed the GP2X controls (so i cant select any menu options)
2. Some gfx buttons are missing
3. Sound doesnt work on either (not sure why, i think ive compiled the sound libs correctly)

If the current version of xBak runs as expected, one should be able to watch the startup screen and credits. Go to the main menu and click some of the buttons into other screens. If one clicks start game it shows the intro movie slideshow and then loads up the 3d view, which only show a few objects around the starting point. You can go into the inventory screen, but nothing is really functional.

In summary if we can add the GP2X stuff now, then when the engine is ready it can be used right away on the GP2X. I dont think its beneficial to put up a beta, you cant do anything with it.
Please go to the XBak page for more information.

Apesandtapes
Thanks for clearing that up Pickle! It's still exciting just to know someone's working on it. Many thanks!
InsertFaveGameNameHere
Ah ok, I was under the impression the XBak for Linux was finished, I should have realised as I did wonder why the page on it seemed to be a bit work in progress-ish.

Well, not to worry. It's a good idea you have and you'd think more people would be working on the Linux PC crossover, so hopefully progress should be a tad swifter.

Maybe one day eh? Keep it up though - and update us as to the progress! smile.gif
Cruel
Uh, oh.. well okay, we will wait smile.gif

But all this sounds so exiting..
Keep it up, please.
Pickle
QUOTE(Cruel @ Aug 30 2007, 08:08 AM) *

Uh, oh.. well okay, we will wait smile.gif

But all this sounds so exiting..
Keep it up, please.


Well I personally dont have any influence on how fast the engine is completed, but I can make sure it will work on the GP2X when it is finished.

Update for the day, sound is working FINALLY! (only for win32 so far, havnt tried on GP2X yet.)
Pickle
QUOTE(Pickle @ Aug 30 2007, 10:16 AM) *

QUOTE(Cruel @ Aug 30 2007, 08:08 AM) *

Uh, oh.. well okay, we will wait smile.gif

But all this sounds so exiting..
Keep it up, please.


Well I personally dont have any influence on how fast the engine is completed, but I can make sure it will work on the GP2X when it is finished.

Update for the day, sound is working FINALLY! (only for win32 so far, havnt tried on GP2X yet.)

Second Update: GP2X controls added and they work!, isnt continous motion yet though. Some other bugs are popping up in the main menu. Also SDL_sound isnt linking in right, so no sound on GP2X yet.

Pickle
NEW UPDATE:

xBak demo is working without any problems without sound
joystick control works perfectly
only problem is sound, i cant for the life of me get it to work on the GP2X. It works with the windows port compiled from the same code. There are no linker problems. It just segfaults when it trys call a function read_midi_file.

Im almost ready to go ahead an release it without it.
Cruel
Yup! Please release what you have, can`t wait to try how fast it is! happy.gif
DJWillis
Simple reply. Awesome smile.gif.

BaK is great and getting it running on the 2X is a very good thing™

As for sound, xBaK uses a MIDI engine if I remember and SDL_Sound (been a long time since I glanced at the code, I was looking at a 2X port myself). Have you got the necessary libs setup in your tool chain?
Pickle
QUOTE(DJWillis @ Sep 3 2007, 04:33 AM) *

Simple reply. Awesome smile.gif.

BaK is great and getting it running on the 2X is a very good thing™

As for sound, xBaK uses a MIDI engine if I remember and SDL_Sound (been a long time since I glanced at the code, I was looking at a 2X port myself). Have you got the necessary libs setup in your tool chain?


I started with the setup put together by Yaustar, RC4. Which has the devkit and open2x tool chains. Im using the devkit chain at the moment.

I dont think im doing anything wrong in making the SDL_sound lib. The dynamic DLL for windows works, compiled from the same code. I put printf statements in the static lib for GP2X and traced to the function that seg faults. That proves that the lib is being compiled in, and some of the code runs.
I almost wonder if im running out of memory or something. SDL_sound does use malloc's, i was almost tempted to try some upper 32mb functions from the WIKI. Really as I think about it I should try just playing a small MIDI file in a very small app and see if it works then.

As always Ive been getting very good feedback from Guido the guy who's actually writing xBak. He also doesnt like SDL_sound and is looking for a replacement. I believe its only used to decode the MIDI clips and the clips are then fed back into SDL_mixer. If anyone has a better method, im sure he would be interested.
Pickle
Ok, i put together a release package with the windows and GP2X versions. Im sure it made into the archieves, I was getting license error, i guess we will see.
Its evildragon that approves the files correct?
Mr 2X
Archive problem: http://www.gp32x.com/board/index.php?showtopic=36916&hl=
Pickle
QUOTE(Mr 2X @ Sep 3 2007, 05:15 PM) *


ah thank you very much!
Cruel
Whoa! Thank you! It looks really really cool! I can even walk biggrin.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.