Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / new version of agk 1.76

Author
Message
3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 7th Jun 2012 07:55
hu no thing on the forums I might as well post.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veterian for the military.
Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 7th Jun 2012 09:36
Wohoo! Can't wait to test it when I get home from work in 8 hours...

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 7th Jun 2012 09:52
AGKsplash seems to be still in there
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 7th Jun 2012 10:08
Textures now have some think black lines here and there around the border. Not around all sides of the border and not all textures!

I think it's the new texture repeat set to default wrap mode.

This looks really bad on WINDOWS. Have not tested iOS.

I am back to 1074 which is the last version where textures displayed fine without any alterations.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Jun 2012 10:43
Not sure why "createSprite" has a twin command "loadSprite" now... I thought "create" was more descriptive.

You "load" an image. You "create" a sprite, right?

polomint
12
Years of Service
User Offline
Joined: 3rd Apr 2012
Location: Lancashire, United Kingdom
Posted: 7th Jun 2012 11:46
hmmm, when oh when will we get an update for the playbook,

Blackberry App Development & ZX Spectrum Game Development.
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 7th Jun 2012 11:54
Quote: "Not sure why "createSprite" has a twin command "loadSprite" now... I thought "create" was more descriptive."

If I've read (and interpreted) the "Change Log" correctly, it sounds like the LoadSprite() command is used when creating a sprite directly from an image. e.g
a = LoadSprite("myImage.png")

But I see your point.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Jun 2012 11:59
Ah, I didn't pick that up. The only problem is whether people will remember to delete unused images that way using "getSpriteImageID"?

I guess good housekeeping isn't the job of the language...

Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 7th Jun 2012 12:03
Quote: " The only problem is whether people will remember to delete unused images that way using "getSpriteImageID"?"

Personally, I'm going to stick to the traditional method of:
img = LoadImage("image.png")
spr = CreateSprite(img)

Quote: "I guess good housekeeping isn't the job of the language..."

If I remember correctly, AppGameKit clears up all memory it uses upon exit (don't take my word for it though). But during the running of the app people who use load sprite has better become familiar with getSpriteImageID() .

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Jun 2012 12:13
Quote: "If I remember correctly, AppGameKit clears up all memory it uses upon exit"

I'm relying on it since I'm not currently deleting my own images on exit. It's not always practical to have all your images loaded at once though. I often load my menu images only when I start my menu or go back to it, then delete the images from memory while playing the game...

Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 7th Jun 2012 13:23
Quote: "If I've read (and interpreted) the "Change Log" correctly"


Hodgey, where do you see the change log? Is it once you've installed? If so would you mind posting it so I can see whats changed... I'm not sure whether to take the plunge or not... Thank you!
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 7th Jun 2012 14:59
Any news on edit boxes for Android? There's no new player available. I have no issues running on Windows so I'm not updating until I get a new Android player.

Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 7th Jun 2012 15:04 Edited at: 7th Jun 2012 15:04
Quote: "Hodgey, where do you see the change log? Is it once you've installed? "

It's just found in the location you install AppGameKit in but here it is for your viewing pleasure:



3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 7th Jun 2012 21:58
1.74 is the only version I got to work with ios.
1.76 can't figure how to make it work with ios.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veterian for the military.
Jimmanator
14
Years of Service
User Offline
Joined: 12th Nov 2010
Location:
Posted: 7th Jun 2012 22:05
Quote: "hmmm, when oh when will we get an update for the playbook, "

I would also like to know when the playbook update will come out.
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 7th Jun 2012 22:07
Thanks Hodgey. Not much of an update though. There seems to be a lot of issues in 107. Both new and old ones. The issues board is now on it's third page (201 items) due to new bugs introduced for each update of 107. Currently if you list defects you get 94. Part of this is because new items always get defined as a defect, even though it's an enhancement. There are 68 items on the list still flagged as new.

If TGC wants us to use the issues board they should maintain it better and also see that reported bugs get fixed before introducing new ones. It's like DBP all over again.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Jun 2012 22:26
3d, I have v1076 working fine in Mac and iOS.

What sort of problems are you having?

Did you download the 1076 zip file?

If you did, did you copy all of the directories to your Mac:


And, if you haven't, before you do, remember to copy any of your project directories in AGK/IDE/apps to a directory elsewhere so they don't get lost when you copy the AppGameKit directories. Macs wipe any everything when you replace a directory (unlike Windows which just replaces and adds).

And, having done all the above, did you replace the files in the Classes directory in your project with the ones from the new interpreter_ios/Classes directory? Some have changed since 1074 (I think).

What version of Xcode are you using?

Cheers,
Ancient Lady
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 8th Jun 2012 00:18 Edited at: 8th Jun 2012 00:20
Ancient Lady, load and display this sprite in 1076.



A thin black line appears on the right hand side. This happens on Windows. Did not test on iOS yet.

Attachments

Login to view attachments
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 8th Jun 2012 01:23
I'll try it on iOS tomorrow.

I am now 'home' from the 'office' (about 15 feet straight line).

Without actually trying it, I'm almost willing to bet it might be related to there being no empty space around the edges.

Can you provide a sample of the code you are using to load and display?

Cheers,
Ancient Lady
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 8th Jun 2012 02:43
Quote: "Textures now have some think black lines here and there around the border. Not around all sides of the border and not all textures! "


I've not seen this in my testing, are the ones without/without the borders a power of two in size? Does using SetImageWrapU(ID,0) on the image fix it?

Quote: "The only problem is whether people will remember to delete unused images that way using "getSpriteImageID"?"


Sprites created with LoadSprite( "image.png" ) will automatically delete their image when the sprite is deleted, since it is unique to that sprite.

Quote: "Any news on edit boxes for Android?"


I've not heard of any problems with edit boxes, so they have not changed in 1076, please direct me to any forum post detailing the problem.
3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 8th Jun 2012 04:21 Edited at: 8th Jun 2012 07:00
Ancient Lady I am using version xcode vr 4.0.2 I think that is the last version. I am ok with version 1.74 on the ios until I can find a stable one. I will install the next version when comes out and test it too. I copied the folders the same way for both.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 8th Jun 2012 07:38
Paul:
Issues 307, 308, 309 on the code.google.com page.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Jun 2012 10:32
Quote: "Sprites created with LoadSprite( "image.png" ) will automatically delete their image when the sprite is deleted, since it is unique to that sprite."

Paul, does that mean a new copy of that image is loaded each time it is used or does AppGameKit keep track of which images have been loaded already and re-use the image when it is called again?

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 8th Jun 2012 13:12
Baxslash I don't think there is any caching. Multiple copies of the image will be loaded if image is identical.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Jun 2012 13:17
That should be made obvious in the docs if that's the case. I hope it takes care of it, it would be a minor addition to the load of the command IMO.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 8th Jun 2012 13:22
Paul,

SetImageWrapU(ID,0)
SetImageWrapV(ID,0)

solves the problem.

But then we are back to the original problem, where edges of sprites are cut off by 1 pixel.

This is really a very annoying problem.

Putting a transparent border around the corner is not an option. This would involve a total rewrite of a Photoshop exporting plugin. Other OpenGl Sdks display graphics as is, without enforcing any extra transparent borders.

I have provided image samples, so testing could happen easily.

AGK has to display Images as is, not manipulate and crop them. Pixel artists are very considerate of their work and will start jumping as soon as they see 1 misaligned pixel or something out of place.

Other OpenGl Sdks have no problem with displaying images the right way, so AppGameKit should be nothing less.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 8th Jun 2012 16:04 Edited at: 8th Jun 2012 16:05
Quote: "does that mean a new copy of that image is loaded each time it is used"


Yes, if you want to share an image among many sprites you have to load it using LoadImage and assign it to the sprites as normal.

Quote: "solves the problem.
But then we are back to the original problem, where edges of sprites are cut off by 1 pixel."


Sounds like a filtering issue, you want it to render as close to edge of the image as possible, but to not sample beyond the edge. SetImageMinFilter(ID,0) and SetImageMagFilter(ID,0) would do this but then it would not be cross platform as a different screen resolution would look blocky. The only way to get a pixel perfect result is to design the graphics for the screen resolution and turn off the min and mag filter as above.

You could also try keeping the wrap mode at 1, but play around with SetSpriteUVBorder to see if you can find a happy medium.

Quote: "Issues 307, 308, 309 on the code.google.com page."


Quote: "StartTextInput() will not accept initial value"


Fixed in 1076

Quote: "StartTextInput() still won't go into landscape mode."


Fixed in 1075, once the player is updated on the store, or you can compile a new player with eclipse and NDK.

Quote: "CreateEditBox() is broken in iOS. "StartTextInput" type field is created, in portrait mode, and the virtual keyboard comes up, also in portrait mode. This edit field is one line only, no multiline, and appears separately from the edit box."


The portrait issue fixed in 1075 although getting the new player onto an iOS device requires compiling it with XCode. Using the StartTextInput box is by design, as you may be editing an edit box that is under the keyboard. The multiline issue needs some work, but it's not a high priority right now.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 8th Jun 2012 17:20
Paul the artwork is specifically done for 1 fixed resolution. I just want it to look AS DESIGNED, not filtered or bordered or whatever.

Right now using 1074 on iOS all looks ok but on Windows it has 1 pixel chopped off. iOs and Windows are both set at 1024 x 768 FIXED resolution.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 8th Jun 2012 17:31
3d, the current version of Xcode is 4.3.2.

Paul, I've tested v1076 orientation and the two text input types (TextInput and EditBox) in iOS and on my weird Android.

All works, the keyboard and input fields rotate as expected between portrait and landscape. And the ad click area works properly for landscape.

The orientation tests on my Android worked fine and my game stayed stable.

The orientation tests on iOS were iffy. My game would flip to the 'other' landscape, even though the AppGameKit code and Xcode setup both asserted that it should not. (google issue 342) I tweaked UntitledViewController.m to not allow changing orientation, except to my preferred. This will work for my game but is not the preferred method. I tried to create a Tier2 Xcode project to show the results of 'agk::CanOrientationChange', but was unable to run anything built in v1075 or v1076 (google issue 344).

I'm happy to see that the white flash has been replaced with a black flash. At least it looks better. But custom flash files don't display on iOS devices. (google issue 343)

Cheers,
Ancient Lady
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 8th Jun 2012 17:31
If you only need it to work at 1024x768 (iPad and Windows) then you can just turn off filtering and you'll get a pixel perfect result.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 8th Jun 2012 17:34
Turning off screen filtering using SetImageMinFilter(ID,0) and SetImageMagFilter(ID,0) got rid of the ugly lines BUT removes all anti aliasing making the artwork look totally pixelled.

no luck with SetSpriteUVBorder.

I'm at a loss here....
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 8th Jun 2012 17:42
Quote: "The orientation tests on iOS were iffy. My game would flip to the 'other' landscape, even though the AppGameKit code and Xcode setup both asserted that it should not."


Unfortunately Apple does not allow apps to force an orientation change, they will reject the app if it does. So the player starts with 1,1,1,1 and if it happens to be in an unwanted orientation when you call 0,0,1,0 then it has to wait for the device to reach the correct orientation before it can lock it. Doing as you have done and restricting it in shouldAutoRotate... from the start prevents it ever entering an unwanted orientation.

Quote: "I'm happy to see that the white flash has been replaced with a black flash. At least it looks better. But custom flash files don't display on iOS devices"


You may need to call Sync() twice as the first may be displaying an empty back buffer to the screen. I've attempted to fix AGKSplash in 1076 rather than remove it completely, can you let me know if it works for you.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 8th Jun 2012 17:45
Quote: "SetImageMinFilter(ID,0) and SetImageMagFilter(ID,0) got rid of the ugly lines BUT removes all anti aliasing making the artwork look totally pixelled."


That should be impossible if you are using pixel perfect artwork designed for 1024x768, unless you are using sub pixel positions such as 200.5 for an x position, which would then require filtering.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 8th Jun 2012 17:52
Paul, the double call to sync() did the trick! Thank you. And the black flash is all gone as well. I suppose it was related.

Quote: "Unfortunately Apple does not allow apps to force an orientation change, they will reject the app if it does."


Strange that. They have Xcode set up to allow the restriction of supported orientations. We'll have to see what happens when I finally submit my game.

Cheers,
Ancient Lady
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 8th Jun 2012 18:10
after some more testing...

On 1074 this makes all artwork look 99% good:




On 1076 I still get 1 pixel shaved off the sides sometimes...
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 8th Jun 2012 18:15
Quote: "That should be impossible if you are using pixel perfect artwork designed for 1024x768, unless you are using sub pixel positions such as 200.5 for an x position, which would then require filtering."


I am using only INT numbers for x y positioning.

The problem happens only on Windows. Could this be Nvidia card related?
on iOS all looks fine, at least on 1074.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 8th Jun 2012 18:25 Edited at: 8th Jun 2012 18:28
Quote: "They have Xcode set up to allow the restriction of supported orientations."


They allow apps to restrict rotations, but if the app is already in a portrait orientation and then wanted to change the restrictions to landscape (like AppGameKit does) then the user has to tilt the device to trigger the change to landscape, it can't be done in code.

Another way to put it is they allow you to stop an app entering a particular orientation but you can't force it to leave its current orientation.

Quote: "The problem happens only on Windows."


If you are using 1024x768 in your setup.agc file and SetVirtualResolution(1024,768) then I would expect a 1024x768 image to be pixel perfect with no filtering. If it is not then please email me the project and I'll take a look.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 8th Jun 2012 18:36
bjadams, I'm sorry it took so long to test.

I used your image on my Windows setup and in iOS tests. It looked fine to me. I didn't get any black line on either side.

Cheers,
Ancient Lady
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 8th Jun 2012 19:21
Paul after many weeks of mind boggling testing I have finally found the evil root of the problem!!!!

Let me explain....

I set my window size 768 x 1024. in core.cpp width and height are also set 738 and 1024. All is fine there!

The problem is that my Windows screen res is 1200 x 1024. One would think that that would be enough, but it's not the case!!!

What happens is that because the AppGameKit window has a Border on top the actual Window height is more than 1024. Hence the window does not fit on the physical screen resolution! Since the AppGameKit window is larger than the screen res, than AppGameKit automatically resizes the window down, and hence the filtering bugs!!!!!!!!

How I found out this.... AppGameKit was putting 5 pixel black borders on both sides of the window, to keep the aspect ratio because it was resizing the window down!!!!

I can now happily report that all works fine in 1076!!! Now I finally understand why everything worked on iOS!!!!!

I have seen some other similar reports on the forum and on FB... so check that your windows screen res is large enough for the agk window to fit in!!!

I am now going to fix core.cpp so that i can hopefully open a borderless window!!!
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 8th Jun 2012 19:28
Paul:
I got the beta player installed and my problems went away. Except for the edit box that is. I don't see why you are using the StartTextInput box. Instead I think it's up to the coder do make the edit boxes work on phones. This would make it much more like any other app. Twitter and Facebook are good examples. I have made my own edit box to work with the built in keyboard in Android. On PC it preloads the text I want to edit but on Android the edit box is blank. SetEditBoxText doesn't seem to do anything on Android.

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 8th Jun 2012 19:28 Edited at: 8th Jun 2012 19:32
Quote: "so check that your windows screen res is large enough for the agk window to fit in!!!"


Glad you found the cause

Quote: "Except for the edit box that is. I don't see why you are using the StartTextInput box"


We had some apps where edit boxes would be below the keyboard so instead of forcing the user to change their app, this seemed the better option.

Quote: "SetEditBoxText doesn't seem to do anything on Android."


If you are using the beta player with the 1076 compiler there may be a command table mismatch. Hopefully the new 1076 player will be on the store soon.
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 8th Jun 2012 19:41
Quote: "We had some apps where edit boxes would be below the keyboard so instead of forcing the user to change their app, this seemed the better option."


How about letting the programmer choose? You can use GetCurrentEditBox() to check if a box has focus and GetEditBoxText() to get the text and use StartTextInput() or create a new editbox to handle input. Seems very straight forward to me.

Quote: "If you are using the beta player with the 1076 compiler there may be a command table mismatch. Hopefully the new 1076 player will be on the store soon. "


I am using 1075. But will download 1076 and try that out as well.

I use SetDefaultMagfilter( 0 ) and SetTextDefaultMagFilter( 0 ) so I guess I won't have any problems with the graphics.

Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 9th Jun 2012 03:28
Quote: "They allow apps to restrict rotations, but if the app is already in a portrait orientation and then wanted to change the restrictions to landscape (like AppGameKit does) then the user has to tilt the device to trigger the change to landscape, it can't be done in code.

Another way to put it is they allow you to stop an app entering a particular orientation but you can't force it to leave its current orientation."


My current game project has a "2-player head-to-head" mode, with a button that flips the screen from (1,0,0,0) to (0,1,0,0) and back again. Do you think this is allowed?

Some days, the bear will eat you.
Some days, you'll eat the bear.
Today, I'm eating the bear!
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 9th Jun 2012 03:45
Quote: "My current game project has a "2-player head-to-head" mode, with a button that flips the screen from (1,0,0,0) to (0,1,0,0) and back again. Do you think this is allowed?"


Since on iOS AppGameKit doesn't force an orientation change, it'll just wait for the user to hold the device the way you want and then lock it to that, it will pass. On Android we do force an orientation change, and it's allowed.
Grumpy Jedi
14
Years of Service
User Offline
Joined: 16th Jan 2010
Location:
Posted: 9th Jun 2012 08:05
Starting with 1075 I started getting problems with sprites that are set to take up the whole screen using the percentage system, similar to what bjadams has been describing.

In my case the sprites are for my menus and take up 100,100 percent of the screen.

In 1076, along the right hand side of the image, it gets cut off by what seems to be 1 pixel.

In 1075 it was getting cut off on both sides of the sprite.

I tried the imagewrap and snap solutions but they did nothing for me.

I read bj's post about the "evil" root of the problem, but I'm not sure I fully understand whats going on.

This could however be due to the fact that I hit my head and sustained a concussion at the beginning of the week.

Now this was only happening on windows when I maximized the app to full screen, but I would have expected AppGameKit to handle the sizing correctly since I'm using the percentage system with their dimensions set at 100,100.

The starting app size is iphone landscape dimensions of 480,320 and my windows screen resolution is 1680,1050.

Is this behaving the way it should?

I haven't gotten around to testing on iOS with 1076 yet, technically I'm not supposed to be thinking too hard until the dizziness goes away

I'm just puzzled by this behavior since it never happened in 1074 or below.
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 9th Jun 2012 11:48
Got 1076 installed but got me some weird bugs in the Android player that I don't know what is causing them. Both of them are related to text objects, edit boxes, strings, arrays and reading from files. Works fine in Windows. Any idea what might be causing these problems? Worked great in 1075 except that I couldn't set the edit box text.

I got a weird game freeze that lasts a few seconds. A multiline text object, with content read from a file into an UDT array, doesn't display. After the freeze it doesn't appear to parse my unlock string that uses string tokens.

In my object editor (full of text objects, strings read from a file into an UDT array) I try to launch the edit box and the game freezes and then the player quits.

My WIP thread: http://forum.thegamecreators.com/?m=forum_view&t=196497&b=48

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 9th Jun 2012 12:55
Grumpy if your app is 480x320 and your desktop is 1680x1050 then there is no hanky panky happening from agk side.

your graphics should look perfect if the menu items are 480x320, as you say they are 100% of the screen.

However if you maximize the agk window on windows, then agk will resize and zoom up your window right? or does your window go full screen with a small 480x320 app in the middle?

What I did for myself, I just switched off the maximize gadget in core.cpp (t2)
Grumpy Jedi
14
Years of Service
User Offline
Joined: 16th Jan 2010
Location:
Posted: 9th Jun 2012 13:26
Quote: "However if you maximize the agk window on windows, then agk will resize and zoom up your window right? or does your window go full screen with a small 480x320 app in the middle?"


AGK resizes the app to windowed fullscreen when using the percentage system. My understanding is that's the whole idea behind the system, the ability to support a wide range of devices and resolutions with the same code.

The app starts in a 480x320 window, the menu screen images are 960x640(Retina display resolution) so they are being resized even at startup, but with no problems.

When the app is maximized is when the problem shows up and cuts off the pixels along the right hand side of the images(1076) or along the left and right sides(1075).

In 1074 and below there were no issues.

The problem did not show up on iOS devices in 1075 so I'm assuming that still holds true for 1076 but I have not had a chance to test it yet. It seems to only be windows related from what I've seen so far.

Quote: "What I did for myself, I just switched off the maximize gadget in core.cpp (t2) "


I like to start my app in iPhone resolution and be able to switch between the initial size and maximized for testing purposes.

Naturally I'd like to see the expected output when maximized so I know there aren't any problems before I go forward.

The only problem I foresee this creating, is that if I decide to release something on windows, I have to change the code and or images for that specific version which is only a small change, but then it isn't write once deploy everywhere anymore
Grumpy Jedi
14
Years of Service
User Offline
Joined: 16th Jan 2010
Location:
Posted: 18th Jun 2012 22:21
After taking some time off to let my concussion heal I got back to work on my project today...

I'm sorry to report that with version 1076, the problem of my screens getting cut off around the edges has made it's way into showing up on my iOS devices.

I am using the percentage system with the size of the graphics in question set to 100pct by 100pct.

I ran a test with my iPad using the 1076 version of the AppGameKit player installed and my menu screens were cutoff along the top.

As I said in my earlier posts this only started happening since 1075.

-----

Quote: "Since on iOS AppGameKit doesn't force an orientation change, it'll just wait for the user to hold the device the way you want and then lock it to that, it will pass. On Android we do force an orientation change, and it's allowed."



This is a particular problem for me as I need my app to start in landscape orientation no matter which way the user is holding the device when they start my app. I've tried setting the supported orientations buttons in xcode to only support landscape modes, but they seem to have no affect with AppGameKit?

Is there some way to force the xcode project to start my AppGameKit app in a landscape orientation even if the user is holding the device in portrait?

I understand that we cannot force the device to change from one orientation to another without the user turning the device, but can we force our app to start in landscape?

-----

If I can't get these problems solved it looks like I'm going to have to downgrade to 1074 and forget about releasing a lite version of my app with inneractive adverts as they have the click position problem in 1074. But with 1075/1076 while the ads work, my graphics get cutoff and the app is allowed to start in portrait orientation.

If I could somehow get the working parts of 1074-1076 rolled into one, I'd be all set.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 18th Jun 2012 23:11
To encourage the user to hold the iOS device in the correct landscape orientation (my game also requires one orientation), both my Default.png and Default-landscape.png are basically the same image. I take the landscape version, rotate it and save it as Default.png.

You also use the SetOrientationAllowed to only do the landscape. In Xcode, you use the project to say what orientation it is supposed to support and then you edit Classes/UntitledViewController.m, the shouldAutorotateToInterfaceOrientation function, to not use the agk::CanOrientationChange function and just set the one(s) you want to 'YES' and the others to 'NO'.

The agk::CanOrientationChange should make this work correctly, but it is not working just yet.

Cheers,
Ancient Lady

Login to post a reply

Server time is: 2024-11-23 20:12:58
Your offset time is: 2024-11-23 20:12:58