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 / AGK 2 Official Development Blog

Author
Message
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 17th Mar 2014 16:46
Still updating iOS to the latest build, for some reason the shader example project is completely black even though the shaders compile, while non-shader examples work ok. Hopefully it'll turn out to be something simple.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 17th Mar 2014 19:57
fingers crossed Paul, I can't wait to get hold of T2 AGK2 to finally complete my 2 projects in AppGameKit!
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 18th Mar 2014 14:22
iOS is now up to date and working properly. Moving on to MacOS.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 18th Mar 2014 15:39
While I am not currently interested in iOS and MacOS, it's so nice to hear about progress

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 19th Mar 2014 22:21
I'm very interested in iOS so its great that all works fine!
Don't forget working templates for T2 when the time comes to release the next update
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 20th Mar 2014 01:12
Mac is now up to date. Blackberry is looking less and less like a viable platform at the moment but I'll do a quick pass on it so that it can compile. It will probably be missing the new sound and music features, but anything common to other platforms like OpenGL shaders and Spine should work.

Given the progress so far I'm aiming to get a new version out this week, this will include both tier 1 and tier 2.
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 20th Mar 2014 02:00
Great! Thanks for all your work Paul
DARKHALO2K
20
Years of Service
User Offline
Joined: 4th Sep 2003
Location: UK
Posted: 20th Mar 2014 09:27
That's wonderful news. Thanks Paul.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 20th Mar 2014 09:30
Great

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 20th Mar 2014 15:41
Unless AGK2 will work on the new Blackberry10 platform then I think it makes very little sense to waste precious dev time
Tone Dialer
Valued Member
18
Years of Service
User Offline
Joined: 17th Oct 2005
Location: England, well a town in it !
Posted: 20th Mar 2014 21:05
@Paul

Thank you for you update on progress so far.

Blackberry should continue to be supported, it was part of the Kickstarter after all.

Quote: "
AGK is an easy to use cross platform game dev engine. Supporting OUYA, iOS, Android, Mac, Windows & Blackberry."


Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 21st Mar 2014 15:09 Edited at: 21st Mar 2014 15:48
Paul:
Using Alpha 2, shouldn't this code save a green image?




And this code should give me a green screen?


Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 21st Mar 2014 16:25
Thanks, you revealed an unrelated bug that would have been a pain to track down! It would cause sprites to not be visible on screen if any sprites were drawn to an off screen render target.

As for your question, note that when you call SaveImage in your example the image is still bound for rendering so can't be accessed. Setting rendering back to the screen before saving allows it to save the image. The following code would work
JohnnyMeek
10
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 21st Mar 2014 16:27
Does the spine integration work with the percentage resolution system?
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 21st Mar 2014 16:35
Hey Paul. I just wanted to make sure you saw this:
http://forum.thegamecreators.com/?m=forum_view&t=210413&b=41
Space Dream Studios was/is having issues with setting up push on iOS. I've not migrated to 1082x yet so can't confirm if this is a problem or not. Can you please check that push works on Android and iOS before the next release?

Also since Apple is declining apps with unused libraries do you think we need to do anything to remove push in iOS for apps that don't make use of it? Thanks!

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 21st Mar 2014 16:53
Quote: "Does the spine integration work with the percentage resolution system?"


I've just checked it and the sprites don't line up properly. It's possible I could fix this but the percentage system adds some very complicated maths to all the position and scaling transforms, so I'd rather people migrate to the virtual resolution system if they want to use Spine. At least until I can justify spending the time to fix it, either because of high demand or there is nothing better to work on.

Quote: "Hey Paul. I just wanted to make sure you saw this"


I've replied with what we found

Quote: "do you think we need to do anything to remove push in iOS for apps that don't make use of it?"


Currently we just get an email warning when we submit an app that contains the push notification commands but doesn't use them, but the lite version of the player doesn't include push notifications.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 21st Mar 2014 17:05
Paul:
Your code still doesn't give me a green image saved. Also did you check my other snippet?

What I am trying to accomplish is to render to an image and have that image drawn to a smaller part of the screen. These snippets are only tests. When playing games on TVs you have to allow for overscan. RTA pretty much needs the screen edges so I want to code in an option to shrink the area of the screen drawn to. I don't know if there's an easier way to do this.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 21st Mar 2014 17:41
Quote: "Your code still doesn't give me a green image saved"


Probably because of the bug mentioned earlier, it works here.

Quote: "What I am trying to accomplish is to render to an image and have that image drawn to a smaller part of the screen."


Most TVs should have a "Just Scan" option so that you don't have to worry about over scan, but if you wanted to shrink the render area you could try something like this (media attached)


It will draw the scene to an image and then use a quad with a full screen shader to shrink the image when displayed to the screen. Quads are the preferred method of doing this as they are optimized for full screen rendering and you don't have to hide everything when changing render targets. Note this probably won't work until you have the bug fix mentioned earlier.

Attachments

Login to view attachments
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 21st Mar 2014 17:53 Edited at: 21st Mar 2014 18:02
Thanks Paul

I'll give that a try with the next version then. So much else to do right now anyway

Older TVs can have a problem with overscan. And releasing on OUYA means you need to deal with it somehow.

SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 21st Mar 2014 17:59 Edited at: 21st Mar 2014 18:00
Quote: "Unless AGK2 will work on the new Blackberry10 platform then I think it makes very little sense to waste precious dev time "


yes agk v1 even works with bb10...fyi

and yeah bb is prity much dead true enough. But no arguments here if they decide to release updates for it. I still own about 3 of those playbooks and they seem to work fine.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 21st Mar 2014 19:22
I've uploaded Alpha 3 to the downloads section with the following changes

Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 21st Mar 2014 20:38
Quote: "I've uploaded Alpha 3 to the downloads section with the following changes"


Thanks Paul

I had to give this one a go since you've worked so hard. It causes RTA to crash randomly. Sometimes in the beginning, sometimes after completing a level, sometimes when I quit etc. Even when I run the same build without recompiling. I have no idea what could be causing that. Works fine in 108.21. And this is without using any of the render to image stuff.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 21st Mar 2014 21:38
Quote: "I've just checked it and the sprites don't line up properly. It's possible I could fix this but the percentage system adds some very complicated maths to all the position and scaling transforms, so I'd rather people migrate to the virtual resolution system if they want to use Spine. At least until I can justify spending the time to fix it, either because of high demand or there is nothing better to work on."


we need this to work properly on standard resolution too
JHA
20
Years of Service
User Offline
Joined: 30th Dec 2003
Location: Massachusetts, USA
Posted: 21st Mar 2014 21:53
AGK 2.0 Alpha 3 is now available on your Product page!!

Where can we find a list of features and bug fixes for this version?

Thanks for the hard work Paul!!

Proverbs Challenge: http://pc.potentialsunleashed.com/
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 21st Mar 2014 22:46
JHA:
Read Paul's post a little higher up

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 22nd Mar 2014 00:05
Quote: "It causes RTA to crash randomly"


This sounds like it might be a player incompatibility issue. By chance did you use the online tool to build the APK? If so I forgot to update it to Alpha 3. I've updated it now so it should work.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 22nd Mar 2014 07:40 Edited at: 22nd Mar 2014 08:37
Paul:
No, this is on PC. With Alpha 2 I had a problem with the game crashing on exit, again on PC.

If you still have my project files you can test this yourself. Or let me know if you want me to send them to you again.

Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 22nd Mar 2014 08:32
BTW, this code works fine. No errors. And it also confirms that render to image now works properly.



JohnnyMeek
10
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 22nd Mar 2014 11:15
Quote: "I've just checked it and the sprites don't line up properly. It's possible I could fix this but the percentage system adds some very complicated maths to all the position and scaling transforms, so I'd rather people migrate to the virtual resolution system if they want to use Spine. At least until I can justify spending the time to fix it, either because of high demand or there is nothing better to work on."


I assumed that spine integration would work with the percentage system, and that this was the preferred method of working in AGK. I know all my releases so far have used this system, so it would be great if you can make sure the spine implementation worked with this method.

Thanks.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 22nd Mar 2014 14:05
I don't get the percentage system at all. I find it best to work with a known resolution. The virtual resolution is the best thing I have worked with.

Alien Menace
AGK Developer
19
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Earth (just visiting)
Posted: 22nd Mar 2014 16:38
I agree, I am also befuddled by the percentage system. I much prefer working in virtual resolution.

Apps published: 4
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 22nd Mar 2014 17:13
All of my games use percentage system. If it isn't supported by Spline then Spline is a waste for me. I plan to continue the use of % system because I feel it is the quickest and easiest to design across multiple platforms (just draw something in Photoshop and change the ruler to % and measure - so easy and it scales to every screen size very nicely without the worry of having to fill up space on the edges)

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 22nd Mar 2014 23:34
Quote: "I don't get the percentage system at all. I find it best to work with a known resolution."


Yes!

Quote: "The virtual resolution is the best thing I have worked with."


Every one of my projects is set up to be fullscreen and the same width and height as the device it's running on. That's how I worked with DBPro, that's how I will work with every engine I will ever use.

Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 22nd Mar 2014 23:47
Clonkex:
I have a specific virtual resolution but allow for warying screen ratios. Then AppGameKit scales my art up to the user's resolution. So long as the screen is between 16:9 and 4:3 I don't care what the resolution is. I still only have to think 200x120.

Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 24th Mar 2014 06:34
Has anyone noticed a decrease in FPS when using 3D? My project went from getting an average of 620 fps to 580 with Alpha 3.
JohnnyMeek
10
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 24th Mar 2014 09:32
I don't think the argument should be about which is the better resolution system to use.
If spine is implemented then it should work with both systems, because that is how AppGameKit works.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 24th Mar 2014 11:31
My point was only that the percentage system is not used by all. I don't know how common each version is.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 24th Mar 2014 12:59
I personally never used the % system, but in the long run, AppGameKit should support Spine in every way
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 24th Mar 2014 13:46
Quote: "I personally never used the % system, but in the long run, AppGameKit should support Spine in every way"


Indeed.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 24th Mar 2014 15:25
Quote: "No, this is on PC. With Alpha 2 I had a problem with the game crashing on exit, again on PC."


Someone else just found a bug with deleting the most recent sprite or text object causing a crash, it might be related to this. I've attached a new version of the interpreter with this fix, place it in AGK/IDE/Compiler/interpreters and see if it fixes it.

Quote: "If spine is implemented then it should work with both systems"


It is not currently a high priority but I will come back and look at it.

Quote: "it scales to every screen size very nicely without the worry of having to fill up space on the edges"


The percentage and virtual resolution systems work the same way, so if one has black borders the other will, there is nothing you can do with one that you can't do with the other. The recommended method to deal with extra space at the edges is to use SetScissor(0,0,0,0) and GetScreenBoundsLeft() etc to position things at the edges.

Attachments

Login to view attachments
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 24th Mar 2014 17:33
Quote: "Someone else just found a bug with deleting the most recent sprite or text object causing a crash, it might be related to this. I've attached a new version of the interpreter with this fix, place it in AGK/IDE/Compiler/interpreters and see if it fixes it."


I didn't think this would help as I don't delete any sprites until I unload a level. Which always caused a crash with alpha 3 but didn't with this one. I still get random crashes all over, even in places I didn't get before.

If you can't figure this out I'll start deleting large chunks of code and see if I can find a cause. When I have the time.

Another weird thing: With this file I can't use Compile, run and broadcast. It never stops. Instead I have to fist use Compile and then use Run.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 24th Mar 2014 18:20
I tried the code you sent me before and played 3 levels without a crash, is there a particular thing I can do to make it crash? I also tried the original Alpha 3 exe but still no crash. Have you tried uninstalling AppGameKit 2 and installing Alpha 3 from scratch?
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 24th Mar 2014 19:31
Paul:
That's strange. Could I be running out of memory or something? Rebooting my laptop doesn't help. Usually the 2nd time I start the .exe it runs better than the first time (which usually crashes in the beginning).

I haven't been able to install multiple instances of AppGameKit in the past. So I always uninstall what I got and then do a fresh install when I switch version. That way I always know that it should work.

I get constant crashes in alpha 3. But they happen randomly. Sometimes it crashes before the logo starts scrolling, sometimes after a level (probably the delete sprite bug), sometimes when I open up the menu on the map, sometimes when I scroll the map and sometimes when I quit.

I tried reinstalling alpha 2. No crashes except when I quit. Same with both END and x-ing the window. This doesn't happen to me in 108.

I'll email you a new .zip. The version you have was from the release version. Here's the full code, editor and all and in test mode. I have also compiled with a fresh alpha 3 release so you get my bytecode and everything. Try running that and see if it runs well on your computer.

Wait, I just made a fresh install and everything worked fine until after the level when the delete sprite bug appears. When I then recompile I get the errors. Let's try another fresh install and then your new .exe before compiling. Nope, instant crash. I'll send it all to you with your new .exe in the zip.

Sometimes (very rarely, 2nd time it happens) I get an error popup saying "Uncaught exception:" before it crashes.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 25th Mar 2014 01:16
Your new version does crash for me, it seems to be in attacks.agc near the very end where you call getspritenextcontact() in a loop. Inside that loop it looks like you are calling setspritephysicsoff() on the sprite at the other end of the contact, this deletes the contact and updates the contact list for both sprites which creates memory pointer problems when you try to get the next contact.

Until I can work out the best way to fix it you can work around it by deleting the physics after you've finished the contact loop.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 25th Mar 2014 09:27
Thanks Paul I'll fix that when I get home from work.

However, that code should only be running through while there is an actual attack in one of the levels. It doesn't run through while not playing a level. And REMing out the line doesn't prevent the crashes. Also, it doesn't seem to cause any problems while the levels are playing.

I guess the first thing I should try is stripping the code down to release state again and see what happens. But now off to work.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 25th Mar 2014 16:49
I cleaned and rebuilt the exe and the crash went away, so it might have just been using an old header which meant it didn't match the compiler version. Try the attached exe, this also includes a fix for the GetSpriteNextContact crash so you don't need to change anything.

Attachments

Login to view attachments
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 25th Mar 2014 17:20
I am going to give AGK2 a run through...
anyone tried the T2 templates yet?
Do they work fine on the latest xcode5 and Android ?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 25th Mar 2014 17:28
Quote: "Do they work fine on the latest xcode5 and Android ?"


They should, but I've not tested them thoroughly.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 25th Mar 2014 19:50
Quote: "I cleaned and rebuilt the exe and the crash went away, so it might have just been using an old header which meant it didn't match the compiler version. Try the attached exe, this also includes a fix for the GetSpriteNextContact crash so you don't need to change anything. "


This fixes most of the crashes. Sometimes it crashes after playing through a level. Again, this is random. I have tried multiple times and playing in different ways. Sometimes I can play through a lot of levels and sometimes it crashes after completing the first one. I can only think of 2 things that happens at the end of a level. The game is saved and a lot of sprites gets deleted.

Most of the time when I quit it crashes. But one time after playing a few levels it didn't crash. And once when I tried to open up the menu directly after starting the game it crashed. Opening up the menu doesn't do anything except showing some hidden sprites. So, it still appears to crash very randomly. But I do get less crashes now than before.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 25th Mar 2014 23:05
Try this one

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-19 22:32:25
Your offset time is: 2024-04-19 22:32:25