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 Version 2 Alpha 8

Author
Message
Native Tech
10
Years of Service
User Offline
Joined: 19th Jul 2013
Location:
Posted: 31st Oct 2014 10:57
Just wanna say that the new array commands in V2 are actually amazing, the flexibility of this language is awesome , its allowed for more fluent design and cut back on quite ALOT of lines of code required ... very glad I decided to jump on V2 thanks TGC

Native Technology
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 31st Oct 2014 19:26 Edited at: 31st Oct 2014 20:34
Trying to compile for android in tier 2 and get this error:



I am updating a project to alpha 8, I have kept my original template.h, template.cpp, AndroidManifest.xml and Android.mk as well as including the same facebook project as I did with alpha 7.

Any ideas anyone?

Edit: It compiles and seems to work fine if I just comment out the 3 lines of offending code in Core.cpp. I may have also been mistaken in that I may be updating from v1 for this app, not alpha 7.

Jambo B
14
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 31st Oct 2014 22:23
Native Tech: +1 on that. The new arrays are brilliant.
JohnnyMeek
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 1st Nov 2014 11:22
When I use the Chartboost adverts the images are all displayed strangely. They have a black box around them and are not full screen.

I've attached an image.

Attachments

Login to view attachments
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 1st Nov 2014 11:51
I've made a couple of APKs using Alpha 7.1 and there is no touch response on either my Kindle Fire HD or my new Asus Memopad 7, which arrived yesterday.

Any ideas?????

-- Jim - When is there going to be a release?
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 1st Nov 2014 21:12
I can confirm JohnnyMeek's chartboost issue, I am getting that too.

Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 2nd Nov 2014 00:05 Edited at: 2nd Nov 2014 00:10
That's not an "issue" with Chartboost. That's how their ads are displayed. They are not meant to be fullscreen. They all have that border around them, but you can customize the border in your app settings on Chartboost. They call them frames. However, as of Chartboost 5.0.0 the frames were not working correctly and they were investigating the issues. They may have fixed it by 5.0.3 (which is what Paul used). You guys can also set up video campaigns which, in my opinion, look great (only using them in dFenz AE on iOS at the moment).

Video ads (if fully watched) pay about $0.01 per view.
Interstitial ads - most pay per install, many fewer per click. PPI ones are anywhere from $0.50 to $15. It's nice when those ones that are over $10 come through. The average seems to be about $2 though.

I hope this helps.

EDIT:
Oh wait... are you guys talking about the greyed out area? I don't think that should be happening.... the whole screen should be greyed out. It looks like you actually have the app set up in Chartboost as a landscape app, so that should be correct, you might want to double check that in your Chartboost developer portal app setup. Unfortunately, I don't have any apps that are landscape to test my implementation of Chartboost vs. Paul's.
If I get a chance I'll try it, but I do have friends that use CB in landscape apps and this issue does not occur.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Nov 2014 00:48 Edited at: 2nd Nov 2014 00:49
Quote: "I am updating a project to alpha 8, I have kept my original template.h, template.cpp, AndroidManifest.xml and Android.mk"


I would stick with the new manifest and Android.mk files from the latest version and apply any changes you have made to those. Although it sounds like you are using an old Core.cpp or mixing the template version with the interpreter version, the latest template Core.cpp does not reference those variables.

Quote: "When I use the Chartboost adverts the images are all displayed strangely."


Fixed for the next version, the Android activity containing the advert was not set to full screen so was appearing as a popup.

Quote: "I've made a couple of APKs using Alpha 7.1 and there is no touch response on either my Kindle Fire HD or my new Asus Memopad 7"


Just tested Alpha 8 on a Kindle Fire tablet and it works here.
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 2nd Nov 2014 01:21
[quote]Just tested Alpha 8 on a Kindle Fire tablet and it works here.[/quote

Right. It's the audio that's a bit of a problem. I will report.

-- Jim - When is there going to be a release?
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 2nd Nov 2014 10:49
It now appears to me that there may be serious problems with the new sound commands on Android. Paul - Please look at:

http://forum.thegamecreators.com/?m=forum_view&t=212419&b=41

-- Jim - When is there going to be a release?
JohnnyMeek
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 2nd Nov 2014 11:06
@Paul

The adverts on iOS are also wrong. They are about 1/4 screen size.
SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 2nd Nov 2014 15:54 Edited at: 2nd Nov 2014 16:51
edit: nevermind... got documents path to work finaly.

maybe we should get rid of the obsolite file commands as it gets confusing to work with...

SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 2nd Nov 2014 16:15 Edited at: 2nd Nov 2014 16:51
ok here is a bug on mac os. [works fine and as expected on windows]

setrawmouseposition(x,y) does not work correctly and positions the mouse in a completely different area than requested. also the values are not updated with getrawmousex,y untill the mouse has physically moved even though the mouse pointer moves to a much smaller location then requested.

so a combination error would be

setrawmouseposition(500,300)
getrawmousex() will not report 500 and infact will remain what the mouse value last was untill the mouse physicaly moves. strangly the mouse pointer moves and it does not go to 500,300 something much smaller like 100,100 [in there somewhere].

have a look please paul. I cant use my mac untill this is fixed.

SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 2nd Nov 2014 17:29 Edited at: 2nd Nov 2014 17:34
ok different problem with mydocuments...



i would expect this file to be written in the documents folder.
instead it gets written under documents/media

this creates all sorts of problems. if i make a new folder it will be under documents/media/new folder

if i select that new folder for writting it writes here
documents/media/new folder/media/ here...

empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 2nd Nov 2014 18:08
Don't know if that was already brought to attention, but according to the docs "MOD" is an infix operator, but apparently only implemented as a function. I found that extremely confusing.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 2nd Nov 2014 20:37
setspritescalebyoffset appears to scale from 0,0 of the sprite regardless of the offset.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Nov 2014 21:08 Edited at: 2nd Nov 2014 21:10
Quote: "It now appears to me that there may be serious problems with the new sound commands on Android."


Android doesn't appear to support 32bit float WAV files.

Quote: "The adverts on iOS are also wrong. They are about 1/4 screen size."


This should be fixed in the next version.

Quote: "setrawmouseposition(x,y) does not work correctly and positions the mouse in a completely different area than requested"


Fixed for the next version.

Quote: "i would expect this file to be written in the documents folder. instead it gets written under documents/media"


Use


Quote: "according to the docs "MOD" is an infix operator, but apparently only implemented as a function"


I've updated the documentation for the next version.

Quote: "setspritescalebyoffset appears to scale from 0,0 of the sprite regardless of the offset."


Works here
SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 2nd Nov 2014 21:16 Edited at: 2nd Nov 2014 21:22
thanks paul... i will try that out for the folder stuff.

i was just about to post you an example code for the mouse problem....but i see you have listed that as confirmed.

here it was anyways....

but i think you got it. works fine on windows ....just not mac





edit: yup the folder stuff works now....thanks paul!

CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 2nd Nov 2014 22:36
Thanks Paul. I thought I'd make an example to show the setspritscalebyoffset problem, but in the process proved myself wrong! Lol. Anyway here is the example code that shows setspritescalebyoffset working as it should!



Timshark
16
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 2nd Nov 2014 22:47 Edited at: 2nd Nov 2014 22:50
Extended fonts does not seem to work in alpha 8




using Mac os X - yosemite

I never want what I know.
SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 2nd Nov 2014 23:57 Edited at: 3rd Nov 2014 00:01
i see you can stack code now on the same line...however i notice a problem while doing so.


i would expect the program to execute the second line only if the first line was true with an if statement.

not a big deal if it was not planned for that... its easy enough to code around.

JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 3rd Nov 2014 00:21
Really? I think the a=a+5 should always fire.

-- Jim - When is there going to be a release?
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 3rd Nov 2014 00:22
Now we have extended fonts???

xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 3rd Nov 2014 00:35
Quote: "i would expect the program to execute the second line only if the first line was true with an if statement."


When you use an IF statement with THEN, it will only execute the very next command. This behaves identically to using IF statements in traditional languages without including curly brackets. i.e.:



The simple solution is to avoid THEN and instead use IF/ENDIF as such:



However, the wording in the manual for the IF statement can be misleading here, as it states:

Quote: "When an if statement is followed by the then keyword ensure any statements are on one line."


It should be reworded to indicate that when using the then keyword only the next statement will be executed conditionally.

I also would like to see semicolons supported for chaining multiple commands onto one line, as semicolon is the standard approach in all other languages.
SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 3rd Nov 2014 02:45 Edited at: 3rd Nov 2014 02:55
like i said... not a big deal. migrating over from darkbasic which does allow such statements to be processed like that can be confusing. thats all....


Quote: "if a=1 : b=1 : a=a+5 : endif"
now thats even more strange looking...lol (but i do see what you mean)

i will stick with the original way of doing it

looks cleaner to me... but being able to stack it as mentioned earlier would be my first option if it was available....which its not

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 3rd Nov 2014 14:37
It's quite common now to use multiple ad providers, if we add details for chartboost and admob then does agk automatically try both providers if we call CreateFullScreenAdvert() and the first attempt to load an ad fails?

MikeHart
AGK Bronze Backer
20
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 3rd Nov 2014 21:29 Edited at: 3rd Nov 2014 21:48
..
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 4th Nov 2014 14:08
IsSupportedDepthTexture() is not implemented.
MikeHart
AGK Bronze Backer
20
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 4th Nov 2014 15:35
Paul, is AGK2 automatically culling sprites from the rendering process if they are outside the view?
Native Tech
10
Years of Service
User Offline
Joined: 19th Jul 2013
Location:
Posted: 4th Nov 2014 19:33
GetDeviceVibrateExists()
SetDeviceVibrate(length#)
GetDeviceRamAvaliable()

Maybe its there already and I havent seen ir

Native Technology
SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 4th Nov 2014 20:25 Edited at: 4th Nov 2014 20:26
do we know if blackberry support is dropped?

if it is not.... when will it be back up to par with ios,android?

i have 4 of these playbooks kicken around and need to know if its time to toss them. lol!

Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 4th Nov 2014 22:08
Blackberry actually supports android now, so you might be able to just use their command line tool to repackage the APK.
http://developer.blackberry.com/android/
I imagine Google Play Services like IAP and such don't work with this, but I didn't read much about it. Would love to know if this works for someone.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 4th Nov 2014 22:09
Quote: "Extended fonts does not seem to work in alpha 8"


AGK does not support UTF-8 but if you change the encoding in the IDE Document->Set Encoding menu option to Western (Windows 1252) it should work.

Quote: "if we add details for chartboost and admob then does agk automatically try both providers"


If you provide both it will use AdMob, even if it fails. If you only set one then it will use that one.

Quote: "IsSupportedDepthTexture() is not implemented."


Fixed for the next version.

Quote: "is AGK2 automatically culling sprites from the rendering process if they are outside the view?"


Yes, it also automatically batches them for maximum performance.

Quote: "do we know if blackberry support is dropped?"


We are hoping to get Blackberry into the next version.
Timshark
16
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 5th Nov 2014 09:05
@ Paul

Quote: "AGK does not support UTF-8 but if you change the encoding in the IDE Document->Set Encoding menu option to Western (Windows 1252) it should work."


So it did. Thanks.

I never want what I know.
Timshark
16
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 5th Nov 2014 10:14
I tried to import an old project from v1 into v2 and get this error:
Quote: ".agc:74: error: Variable default value must be a float literal or constant""


at this line:

Global BulletTime#=Timer()


Anyone know why?

I never want what I know.
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 5th Nov 2014 10:18
Yes. You must declare before using it:

Global Bullettime# as float
BulletTime# = Timer()

-- Jim - When is there going to be a release?
Timshark
16
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 5th Nov 2014 10:22
@ JimHawkins

Ah. ok. thanks.

I never want what I know.
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 5th Nov 2014 11:15
I think this a significant step forward for AppGameKit Basic, because I think strict typing makes it easier for the compiler to catch bugs before they happen.

You don't need to stick ugly # marks or $ on any more. For ease of reading it might be a good idea to use some clear prefix notation:

Global fBulletTime as float
iCounter as integer
sWombatName as string

-- Jim - When is there going to be a release?
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 5th Nov 2014 11:43
I like # and $

Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 5th Nov 2014 18:33
I believe this should work as well. Since # already makes it a float. All the globals etc are "made" during compilation, so timer() cant be used when declaring a global.

Global Bullettime#
BulletTime# = Timer()

JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 5th Nov 2014 18:49
True.

-- Jim - When is there going to be a release?
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 6th Nov 2014 00:18 Edited at: 6th Nov 2014 04:35
Paul, a small bug with Tweens...



NEVER MIND, nothing to see here, I was imagining the whole thing, sorry, sorry.

CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 6th Nov 2014 00:35
Could this be a jump from the offset position to the not-offset position used by the tween? Without the delay, you never get to see the sprite in the offset position. Try changing the line:

to


xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 6th Nov 2014 00:43 Edited at: 6th Nov 2014 00:44
I brought up a similar tween issue long ago as well, it does not seem to support offset sprites. Internally, I assume it calls SetSpritePosition() instead of SetSpritePositionByOffset() and there is no way around this, so any offset data is ignored or behaves wrongly. In one app I'm working on that makes frequent use of tweening and offsets, I had to create a custom offset property to compensate for this oversight.

We should have SetTweenSpriteXByOffset() and SetTweenSpriteYByOffset() or a flag to indicate which positioning mode to use within the method.
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 6th Nov 2014 04:02 Edited at: 6th Nov 2014 04:34
@CJB - The thing is, without the delay, the sprite DOES start from the offset position. WITH the delay, it jumps to the not-offset position. Not really a bug, I guess, but still seems weird.

As xCept says, tweening doesn't seem to be designed to work with the offset. Which is a shame, because IMHO tweening should by default use the offset position. After all, you can still set the offset to be zero, zero.

EDIT: Oh! I went back and gave it a closer look, and you're right CJB, it IS jumping, even without the delay. I had to make the offset really big to notice it.

I still think it should use the offset position by default.

xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 6th Nov 2014 04:45
Agreed. Since the default offset is top-left anyway, this command when positioning by offset would behave identically yet still work as expected for those using a different offset. This should be revisited by Paul.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 6th Nov 2014 09:23 Edited at: 6th Nov 2014 09:24
Quote: "I still think it should use the offset position by default"

I agree as it allows more flexibility and ease of use
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 6th Nov 2014 10:36
You can manually add the offset by adding half the sprite width and height to the x & y values in your tween call.

Effishen
9
Years of Service
User Offline
Joined: 13th Jun 2014
Location:
Posted: 6th Nov 2014 12:12
Just a request, can we have the Function keys back? (e.g. F3 for finding next..etc)

Effishen
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 6th Nov 2014 13:24
Quote: "You can manually add the offset by adding half the sprite width and height to the x & y values in your tween call."


That's a good work-around for position, but what about the rotation angle? I'm thinking I'll use the tween functions to move a dummy invisible sprite around, then place the real sprite at the same location, adjusting for offset. This would be a major pain if I have a lot of sprites tweening around the screen though.

Still, I think the real solution would be for ALL the sprite position commands to use the offset by default. We could then get rid of ALL the "ByOffset" commands. This would break a lot of code, but... if a sprite's default offset was zero zero instead of the center of the sprite, then the behavior of the non-offset commands would stay the same.

Many folks might not even know that the default offset for a sprite is its center, and are manually setting the offset for each of their sprites.

I know this would be a bold move, but we're still in Alpha, and NOW is the time to make these kinds of changes.

Login to post a reply

Server time is: 2024-05-04 11:59:10
Your offset time is: 2024-05-04 11:59:10