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
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 26th Mar 2014 00:22
Paul:
Thanks I have run 2 tests without a single crash I am about to go to bed, just had to download and check. I will test more extensively tomorrow. I'll let you know what happens!

Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 26th Mar 2014 11:15
Paul:
Now I've been playing even more and not a single crash, even when I quit the game I also managed to get Compile, run and broadcast to work. So I can easily use this to work with. Thanks a lot for your hard work

However, I noticed some stuttering when I was playing the game maximized. So I did some testing. Running at 1280x720 with setsyncrate( 0,0 ) the game runs slightly faster on the intro and map compared to 108. But on the levels I get massive FPS drops, around half of what I get in 108. At the beginning of the first cave level I get 200 FPS instead of 600! And the game just feels less smooth at times, like very very tiny micro stutters. The levels use more sprites with transparency on that covers the whole screen or large parts of it. The RTA logo is a transparent sprite that covers the screen but that is still faster in Alpha 3. Something has definitely changed, and up to 70% drop in FPS between Aplha 3 and 108 is quite alarming. More graphically advanced games could have an even larger drop than me.

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 26th Mar 2014 14:03
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 26th Mar 2014 18:18
Quote: "Huzzah!"


Ah, I missed that one. Great

Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 27th Mar 2014 12:32
Paul:
Just posting to let you know that I did the FPS test on Alpha 2 with the same result as Alpha 3. I am not in a hurry about this, I get way over 60 FPS on my laptop anyway. But it would be nice if you could take a look at it at some point. Micro stutters are very noticeable in a platform game. And with a more graphically advanced game than mine, you would want more speed out of AGK.

Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 28th Mar 2014 10:54 Edited at: 28th Mar 2014 11:21
So, I'm trying Paul's quad example. But I can't see how to alter the rendered screen area. Quads are full screen and I can't seem to alter their size.

Never mind. Seems to work perfectly well with a regular sprite.

Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 28th Mar 2014 12:47 Edited at: 28th Mar 2014 12:50
OK, I got render to image to work fine on PC with not too much FPS drop. I can alter the size of the sprite I use to draw to the screen to shrink the rendered area. Works really nice and not very hard to do. I can click on increase and decrease to alter this in real time.

However, when i run this on OUYA I get problems. It's the exact same code that I run on PC. The resolution is set to 1280x720 and the size of the render image is set to the same. But the rendered image is only the center part of the screen. like I'm grabbing the center 1280x720 out of OUYAs 1920x1080.

I have no idea how to fix this within AGK. SetViewZoom() doesn't work with sprites fixed to the screen.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 28th Mar 2014 15:09
Currently AppGameKit forces render images to be a power of 2 in size, it will scale your 1280x720 image up to 2048x1024. I will need to do some tests to see if devices support non-power of 2 render targets.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 28th Mar 2014 15:33 Edited at: 28th Mar 2014 15:34
Quote: "Currently AppGameKit forces render images to be a power of 2 in size, it will scale your 1280x720 image up to 2048x1024."


If that was the case, shouldn't the result be the same on both PC and OUYA?

And it means I should be able to adjust UV to display the entire image, gonna test that later.

But shoudn't the top left of the image be placed at the top left of the sprite?

BTW, if it needs to be power of 2 then can't the rest be made full black or full transparent?

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 28th Mar 2014 15:41
Quote: "shouldn't the result be the same on both PC and OUYA?"


PC is an exception since it has supported non-power of 2 for a long time now, mobile devices are still catching up.

Quote: "But shoudn't the top left of the image be placed at the top left of the sprite?"


Images are expanded in all directions so the original image will be placed in the center of a power of 2 image.

Quote: " if it needs to be power of 2 then can't the rest be made full black or full transparent?"


Clearing the full image every frame would use up valuable fill rate
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 28th Mar 2014 16:22
Paul:
Altering UV works so it seems I can work around this It's just a bit annoying to have different results on PC and OUYA.

Thanks for the info!

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 28th Mar 2014 18:25 Edited at: 28th Mar 2014 18:26
@Paul
for compiler work:
(i need so often a fix array inside a type in type)


AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 29th Mar 2014 00:12
Quote: "@Paul
for compiler work:
(i need so often a fix array inside a type in type)"


Absolutely. This functionality is extremely useful.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 29th Mar 2014 00:26
Quote: "i need so often a fix array inside a type in type"


I'll see what I can do
Yaro
10
Years of Service
User Offline
Joined: 29th Mar 2014
Location:
Posted: 29th Mar 2014 05:41
I've been able to run my game on android using the web apk maker, but the AppGameKit IDE's "compile and broadcast" option results in a black screen after it detects, downloads, and runs, stopping only when I end the app.

Is this a problem on my end, or has it not been implemented yet?
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 29th Mar 2014 09:42 Edited at: 29th Mar 2014 09:43
For some reason the forum occasionally sends a mailback notification but when I come here the post is non-existent

Quote: "I'll see what I can do"


Great!

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 29th Mar 2014 12:17
Paul, quick question for you: In AppGameKit V1, when is touch input updated? If I put my finger on the screen, the call GetRawTouchCount(1), then take my finger off the screen, the call GetRawTouchCount(1) again (all of that without syncing), will the result be different? Or is this only updated at Sync()?

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 29th Mar 2014 18:27
Quote: "For some reason the forum occasionally sends a mailback notification but when I come here the post is non-existent"


That will be from Yaro who is a new member and on the automatic post moderation. It shouldn't really send notifications out.

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 29th Mar 2014 23:31
Quote: "That will be from Yaro who is a new member and on the automatic post moderation."


Ah, right. Auto-mod never occurred to me.

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 30th Mar 2014 09:20
for compiler work:
this still does not work with : or ;


AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 30th Mar 2014 11:06
Quote: "if a=10 then c=c+1 : a=0"


Type it out in multi-line format so we can see what you're trying to. Well, so I can see. I'm curious

Either:



Or:



Which?

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 30th Mar 2014 11:19 Edited at: 30th Mar 2014 11:20
@Clonkex
i mean exact in one row because my monitor is wide screen.
colon separated commands are standard in basic but the agk compiler say do not want at if then row.
i do not want split allways in much rows because loss of overview.

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 30th Mar 2014 15:00
Paul:
Could you upload new players for Alpha 3? The players available on the My Products page are for 108.

I would compile it myself but my Eclipse installation is currently a mess and would require a complete reinstall.

SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 30th Mar 2014 17:53
Paul should also fix the ouya iap and release a player on ouya for tgc.

I listed the iap problem in the alpha 3 thread...

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 30th Mar 2014 20:51
Markus, the ':' simply means put the commands on the same line. It does not associate the second command with the 'if'. If you want to do more than one command for an 'if' block, it needs to be in multiple lines without the 'then' and with an 'endif'.

The one line might work if you do this:


But I have my suspicions that it won't.

The AppGameKit compiler sometimes doesn't handle the line concatenator ':' well.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 31st Mar 2014 02:11
Quote: "but the AppGameKit IDE's "compile and broadcast" option results in a black screen after it detects, downloads, and runs, stopping only when I end the app"


I would check that you are running the correct AppGameKit player for the IDE version you are using. For example the 1.08 player is not compatible with the 2.0 compiler

Quote: "Or is this only updated at Sync()?"


Only updated at sync() or swap()

Quote: "if a=10 then c=c+1 : a=0"


Since : is equivalent to a new line I would view it as

otherwise things get complicated

Quote: "Could you upload new players for Alpha 3?"


The players that I can distribute are in AGK/Players, Apple no longer allow us to compile unsigned apps so I can't include that one.

Quote: "If a=10 : c=c+1 : a=0 : endif"


I will aim to support this in the new compiler
Mychal B
13
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 31st Mar 2014 08:10
I think I may have found a small glitch in reference to V2.

I had a image in the media folder, and replaced it with another image with the same title. When I run the program it still uses the picture that was deleted for the computer, but over wifi it uses the new image. I'm sure restarting my computer will fix the problem, but I thought I'd let you know

The fastfood zombie killer
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 31st Mar 2014 09:37
@paul,
ok great
in basic it is the new line cr/lr at end but your suggestion is better.
"If a=10 : c=c+1 : a=0 : endif"

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 31st Mar 2014 10:07
Quote: "Apple no longer allow us to compile unsigned apps so I can't include that one."


Absolutely typical!

Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 31st Mar 2014 10:16
Quote: "The players that I can distribute are in AGK/Players, Apple no longer allow us to compile unsigned apps so I can't include that one."


Well, it was the Android one that I was interested in anyway. I didn't realize it was included in the download, since it hasn't been in the past. Would have saved me a lot of time when I was working on the overscan setting for OUYA yesterday

MASTER OF PUPPETS
19
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 31st Mar 2014 23:49
Broadcasting to the 'AGK Player'(for Android) in 'AGK V.2 Alpha 3' is currently working?

I've tested with every version of the '.apk' I could find.

Initially the device receives the file, then screen flashes black for a moment as if it's attempting to execute. The AppGameKit Player screen then re-appears with "Last Error : Unknown Instruction 1361".

What am I doing wrong (besides everything, always) ?

|,,|, (Dead Knot Broken) ,|,,|
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 1st Apr 2014 00:35
I just installed the latest version from the Alpha 3 download onto my OUYA. The game runs on PC and using the online build tool.

I get these errors:
Failed to bind listening socket
Failed to connect to server IP

After trying again I get:
Unknown instruction 1406

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 1st Apr 2014 00:49 Edited at: 1st Apr 2014 00:51
: is just a separator in basic, i would not see as newline

If a=10 : c=c+1 : a=0 : endif //ok , it works already
If a=10 then c=c+1 : a=0 : endif //error message
If a=10 then c=c+1 : a=0 crlf //i would expect as normal

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 2nd Apr 2014 10:07
Quote: ": is just a separator in basic, i would not see as newline"


: is interpreted by the compiler as a newline. It's how DBPro always worked and it's how AppGameKit will work.

Quote: "If a=10 : c=c+1 : a=0 : endif"


This is how it should work.

Quote: "If a=10 then c=c+1 : a=0 : endif"


Well of course this won't work. The compiler (rightly) sees it as this:



You've used a then with your if so the end of that line is the end of the if-statement. The endif is just plonked there for no reason.

Quote: "If a=10 then c=c+1 : a=0 crlf"


crlf is not a command in AGK. I'm not sure what you want from this one

Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 2nd Apr 2014 14:34
Just posting for updates.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 2nd Apr 2014 15:03
WOW did not realise the RSS feed was dead for a whole month no wonder I missed this thread...

Tagging in before it gets too much to read up on...

Good Work so far guys

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 3rd Apr 2014 03:22
Quote: "WOW did not realise the RSS feed was dead for a whole month no wonder I missed this thread..."


Does this to me as well every now and then. I have to go through and find all the threads I'm following and re-follow.

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 3rd Apr 2014 10:25
@Clonkex
"If a=10 then c=c+1 : a=0 : endif"
ok : and newline is the same,i split into blocks what i see.
| If | a=10 | then | c=c+1 | a=0 | endif |
i not see any : or newline after "if", but there is a separation.
if the compiler would repalce the optional keywords first (Precompiler)
and in next step he begin his work it would work.
the optional keyword endif in single row syntax is also special.
i believe the agk compiler differentiate from single and multirow syntax whether
"then" was used or not.
...

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 3rd Apr 2014 17:40
Quote: "i believe the agk compiler differentiate from single and multirow syntax whether
"then" was used or not."


I don't believe endif is allowed after then in any situation whatsoever.

Quote: "| If | a=10 | then | c=c+1 | a=0 | endif |"


Now you're just making up random divisions about how you think the code should be recognised - that's kind of pointless, since the compiler doesn't actually see it that way.

Quote: "ok : and newline is the same,i split into blocks what i see."


Why are you ignoring the fact that : is a newline, which means : should be the only divider you use? :/

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 3rd Apr 2014 19:43
Here is an interesting question when parsing strings that I could use some opinions on. Should AppGameKit allow escaped characters such as \n \r \t and \" inside strings or should it function as it does currently where you have to use +chr(10)+ to insert special characters?

I've currently gone down the allow escaping route, but it does mean that any unescaped backslash characters currently in a string will cause an error, for example

would now have to be written as

or
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 3rd Apr 2014 20:02 Edited at: 3rd Apr 2014 20:03
Paul:
I would very much like escaped characters. That would make it a lot easier to write strings. It would also be so much easier than figuring out the correct character code. Just make sure there's a list of all escaped characters in the help file.

"First line"+chr(10)+"Second line"
"First line\nSecond line"

"my/path/string" <- this already works for loading files anyway.

Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 3rd Apr 2014 20:03
I think it would cause some extra work for anyone converting from v1.

I like the idea, but I'm not sure there is a real benefit for the end users other than some added shorthand at the tradeoff of having to escape.

That said, I don't see anywhere in my code where I've used a backslash is in my keyboard handler. So maybe others have made use of forward slash like I have. And.. I like shorthand

I am reminded, however, that the parser often has problems with // inside of quotes and sometimes will see them as comment starts. Arrays declarations with fill must be written dim array[1] =[1,2] with no space between the equal and the left bracket. Many minor annoyances like that in the parser.

So I guess my opinions is pretty much neutral and I feel there are greater annoyances with the parser other than not being able to use escape characters.

Thank you for involving us in the process!

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 3rd Apr 2014 21:00
@Paul
i don't need escape in strings
but a command for setting the cursor position for print() i need more.
if i not want split the string, in other basic i can do this self with
s$=replace$(s$,"/r",chr(10))
s$=replace$(s$,"|",chr(10))
only some escape command are too less.
i need insert color or size,other font, reposition, then its more a script.

@Clonkex
because you can change software that it do what you want.
i wrote it with pipe char that you see the syntax is correct for the
human that input this code.
i wrote it with endif in single line because if "then" is a ":" it works in agk. optional means i can use "then" if i want.
also i do not like tripping hazards.

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Marl
12
Years of Service
User Offline
Joined: 19th Nov 2011
Location: Bradford, UK
Posted: 3rd Apr 2014 23:18 Edited at: 3rd Apr 2014 23:19
Quote: "Should AppGameKit allow escaped characters such as \n \r \t and \" inside strings"

It would be a nice addition, but how would it be handled by the len() function?

Currently len( "new"+chr(10)+"line" ) returns 8.

What should len( "new\nline" ) return ?

Nine, because that's how long the string actually is, or Eight because that is how many characters the string represents ?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 3rd Apr 2014 23:37
Quote: "the parser often has problems with // inside of quotes"


Not any more

Quote: "What should len( "new\nline" ) return ? "


8 because \n represents a single new line character

I'll keep reading the responses on this topic, I currently have it working both ways with a simple flag so I can come back and decide later.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 3rd Apr 2014 23:38
Wouldn't \n be the exact same as chr(10) when stored as a string?

"new\nline" = "new"+chr(10)+"line"

Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 3rd Apr 2014 23:41
Paul:
Since \n = chr(10) then why not allow for both? For example, do what PHP does and use both " and '. One is for escaped characters and the other is not. I haven't touched PHP in ages so I can't remember which is which.

Lucas Tiridath
AGK Developer
15
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 3rd Apr 2014 23:41
Sounds like you're doing great things with the compiler . Personally I would favour escape characters. In my opinion, they are more concise and clearer.

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 4th Apr 2014 10:03
what happens if someone edit in editbox \r but i want only a single line?

or if i want save strings it should be original not replaced with other chars.
so i think len should be this what i see in code.

How about this syntax
Print(Escape("blah \r"))

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 4th Apr 2014 10:46
Hi,

How about a flag to turn this on. So anyone coming from V1 doesn't run into issues but once they learn they can use this they can convert code and turn on the option in the compiler.

Rick

Development Director
TGC Team

Login to post a reply

Server time is: 2024-05-06 16:45:20
Your offset time is: 2024-05-06 16:45:20