Jump to content

Working port to Ios


Guest SyntaxError

Recommended Posts

Technically its possible to run on an iphone BUT you need to run in an aspect ratio that is supported by the BG 2 interface. I hear there is a widescreen mod that would let it run in widescreen.

 

If you were to run just stock BG2 an a non 3:4 ration you would experience either graphical distortions or SDL would wrap the overlap starting at (0,0). I experienced both these issues while getting landscape mode working.

 

As far as playability, I still dont know for sure. enabling wide screen has produced an unforseen problem where the touch interface is rotated 90 degrees from the view such that the right 256 pixels dont respond to touch events only the area where the touch view and drawing view overlap respond. I know how to fix this i just haven't had time.

 

I see no reason why it wont run tho there maybe a few more instances of easily fixed crashes like the footstep sound. I dont have PST so i cant test it; again it ought to work as well as PST on any GemRB install.

 

The one problem i do see playing this on any touch screen device but especially one as small as an iphone is that the dialogue interaction choices are small and close together. The ideal solution would be to have a custom control appear on screen to present you with your choices in a larger more touch friendly way. I dont own an ipad or iphone so i'm probably going to leave that alone and focus on gemrb in general and the mac build. Does the android port address this situation at all?

 

until something is worked out to make dialogue less sketchy and dangerous i would save before any important interactions.

 

Somebody suggested installing a mod to increase font size and that may work comfortably, but again it not ideal nor have i tested it.

 

@avenger: perhaps i didn't really need to change the mask on that other call. I may have just gone find/replace happy. Well see when I merge this with the latest code what happens.

Link to comment

SyntaxError, for Android was made a widescreen mode, it would be great if same mode was made for Iphone/Ipod touch 4.

About the dialogue, i see a solution in making a double tap zoom in/out feature, it will solve all problems of little screen.

P.s. Sorry for my bad english, i am russian)

Link to comment

I have good news and bad news.

 

the good news is that I "fixed" the SDL touch area issue and BG2 seems totally playable now. I went a bit though the iranicus dungeon and found no iOS specific issues.

 

bad news is that the problem turns out to be inside of SDL and was not in fact related to my hacking of SDL to force landscape like i initially assumed. so even after this gets merged into the main gemRB tree you will have to build a custom SDL library with the patch referenced in this thread.

 

There is no fix in the latest repo source for SDL at this time, and that patch wont be committed because it isn't a fix so much as a hack.

 

@Arlechinoy

 

I dont think SDL supports zooming at all; this isnt like a regular iphone events and drawing are all controlled by SDL. If SDL supported zooming i could do that, but it would have to be implemented in SDL because GemRB never actually receives touch events. It would be possible to just have an auto zoom occur when dialogue is initiated and terminated, but i feel that would be annoying. all this is dependant on SDL supporting zooming.

Link to comment
the on screen keyboard can help in most dialogs - once you know the answer, you can open it and type the relevant choice's number.

 

Sure that would work but you would still need a means of summoning the keyboard. right now the keyboard automatically comes up when a textedit field gains focus and is dismissed manually that is the extent of virtual keyboard support. I would need a custom control that appears up when dialogue is engaged to bring up the keyboard and if im going to do that i may as well just make a custom #1-9 bar especially since that could be used by android as well.

 

Also worth noting that for gemrb to ket key presses from the virtual keyboard you need to pipe through SDL so dont bother doing anything directly with the keyboard. Technically SDL creates an invisible textfield and applies itself as a delegate so if one were to get a handle for that textfield (standard uitextfield i believe) you could give the field focus arbitrarily which would bring up the keyboard and provide SDL with the input so any intrepid programmers planning on developing GemRB on the ipad would be wise to remember this.

Link to comment

What's the status of this port? Is this usable on an ipad? What games is it compatible with?

 

Although I'm not really a c/c++ developer but an obj c one as yourself I might be able to contribute some few lines of code. Is the source/executable available?

Link to comment

there's nothing of the original but the claims and the video, so the recent activity is of a new porting attempt. Apart for the xcode build support that is being cleaned up and the sdl work that is not our fault, gemrb has been adjusted enough to work on ios. There's much room for improvement for better usability though, since a touch interface isn't something either engines were built in mind with.

Link to comment

Status update:

 

been busy with work and school. I am still in the process of merging my code patches with the rest of gemrbs code. I plan on finally testing this on a physical iOS device tonight or tomorrow. I hope it runs as well as it does in the simulator, but SDL on iOS has disappointing performance compared to OS X; its about 50%.

 

I have completed softwarekeyboard integration (everything works including delete now) and the keyboard will automatically appear when needed or you can summon it at any time using any 3+ fingered gesture. (may change between now and release)

 

currently im hacking something together so that 2 finger drags will act as a scrollwheel so you can both scroll text boxes and the viewport.

 

I may also implement shaking to pause if its not too annoying. :laugh:

Link to comment
Guest Jonathan

Syntax, you are my hero!

 

If it is not too much to ask, would you include a walkthrough for setting this up from scratch on an iPad (how to get gemrb and baldur's gate 2 up and running) when you complete this work of genius?

 

I know we can't pay for the game but I would love to donate towards the completion of an 'install guide'.

Link to comment

Installation shouldn't be difficult. All the gem rb resources will be in the app bundle and you can put the game files wherever you wish just like any other gemrb install. I can tell you jailbreaking will be required and so will iOS 4.3+ (that is the only SDK i have so i cant build lower)

 

Also i wouldn't expect this to run super well at full screen (1024x768), but i hope i am pleasantly surprised.

Link to comment
Guest Jonathan

Jailbreak and version should not be a problem. I'm running version 4.3.3 and am quite familiar with the jailbreak process.

 

One thing I am concerned about is the touch interface. I tend to use the right mouse button (click+hold and rotate the waypoints) to place my characters just right. Would it be difficult to work that interaction into the gemrb?

 

Also, you mentioned shaking the device to pause (as a possible add-on). That would be nice but you can pause the game by clicking on the 'clock' icon at the bottom left of the UI, as well as with the space key. Just thought I would save you the time if you did not already know about this feature.

 

An additional question... From what I understand of gemrb, it takes the place of the baldur.exe application (and in doing so, prevents the need for disc check). Do we mod the game to our hearts content on our PC and then just copy those files over to the iPad? Sounds too easy to be true.

Link to comment

I havent implemented much in the way of multi touch yet; heres what i have so far:

 

1. 3 fingered gesture of any kind displays keyboard.

2. 2 finger dragging is treated as mouse-wheel scroll intended for scrolling the screen and text, but this currently does nothing. I need to do some work in the gemrb core to implement this.

 

from my understanding of the SDL sdk a click and rotate as you describe should be possible, but i doubt i will take the time to implement it as i dont own an iOS device of anykind and that makes gesture programming and debugging rather difficult. Besides I dont even know if gem rb supports the rotation of waypoints. you should be aware that gemrb isnt the same thing as playing the bioware games and is not complete.

 

 

On a diffrent note im seriously considering making some contributions to the SDL project :laugh:

I needed to once again to delve into the SDL source code and make a hack to get gemrb to work with a retina display. All the touch coordinates are mapped to 480x320 so i had to go and multiply all the coordinates by 2! :hm:

 

tho on the plus side now that i have gotten it working on an iphone 4 im about to load it up and test it on my girlfriends phone. Ill be back with an edit regarding performance etc.

Link to comment
An additional question... From what I understand of gemrb, it takes the place of the baldur.exe application (and in doing so, prevents the need for disc check). Do we mod the game to our hearts content on our PC and then just copy those files over to the iPad? Sounds too easy to be true.

Yes, it's supposed to be that easy.

Link to comment

This actually seems to run pretty well on iphone 4 at 800x600; I havent the means to test on ipad.

 

Ill be throwing together a guide soon but for those who have the means to view the console log to figure out on you own what is wrong here is an iphone build

 

THIS BUILD WILL NOT WORK ON IPAD; ONLY IPHONE 4.

 

If you dont have the means to trouble shoot this on your own just stay away from it until better directions are available. I wont be able to answer any of your questions.

 

1. put the .app in /Applications

2. put the "GemRB iOS" folder in /private/var/mobile

3. copy your baldurs gate (or other) installation from your computer to /private/var/mobile

4. change the permissions on that folder so that the mobile user can read/write otherwise you wont be able to save

 

open the gemrb iso.cfg file in the gemrb ios folder and make sure your game paths are correct and that the game type is appropriate for whatever game you copied in step 3. you may also wish to change the cache directory to someplace more permanent just make sure the mobile user has read/write permissions and there are no foreign files present in the new cache location.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...