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 9

Author
Message
unlikely
12
Years of Service
User Offline
Joined: 5th Mar 2012
Location: Ohio, USA
Posted: 28th Nov 2014 19:32 Edited at: 28th Nov 2014 19:35
@Timshark

Normally, you can set the current file operation location using SetFolder() or SetRawWritePath(), but I just tried and I can't get either of those to do anything on Mac.... Sooo, either I'm using these wrong, or there is a bug on the Mac side.

(I've even tried the simple SetRawWritePath(GetDocumentsPath()) )
swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 28th Nov 2014 21:01 Edited at: 30th Nov 2014 22:57
Found another bug. You can't have a type contain itself (which is expected since we don't have pointers within types) BUT you should be able to have an array of the same type within it. Arrays start out with a size of 0 and therefore don't recursively enter an endless loop of creating more UDTs. You can workaround it this way for now.

be careful though, as this

will crash. (which is the original reason for disallowing a UDT to contain itself)

Edit: Nvm it all works. I had a wall of text here regarding problems that actually resulted from the fact that you can't insert a reference into an array oops! My mistake. I really wish we could though. The power to use references anywhere would make AppGameKit perfect If you use this trick I posted you just have to remember that any UDTs down the chain won't be updated!

29 games
19
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 30th Nov 2014 20:04
Hi, just going to add to the issue that Impetus and Baxslash were discussing about initializing variables in sub-routines.

The order in which the variable appears in the code seems to be important, in that the line where the variable is initialized / defined needs to be above the any line where it is used.

So this crashes



But this'll compile:



The same is true for declaring types and arrays. This happened with V1 as well. I've never considered it bug or a problem but thought this was just how it worked. Odd how I don't have to move the print statement as well.

Having said all that, I just swapped the position of the two sub-routines and it still works, it just doesn't like the "inc test" line appearing before it's initialized if it's not in a sub-routine. Weird but hey ho.

swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 30th Nov 2014 23:09 Edited at: 1st Dec 2014 00:07
Found another bug. Passing 2 references of a UDT into a function crashes AGK.


Here are the other 2 bugs I've listed recently. 1 2

JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 30th Nov 2014 23:19
It does NOT crash.



works correctly. How are you defining UDT?

-- Jim - When is there going to be a release?
swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 1st Dec 2014 00:07
Hm sorry about that. I tried it in a few places in my code and it always produced that result. It must have to do with what a UDT actively contains, I'l look into it later

JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 1st Dec 2014 00:26
swissolo - I think it's important to prove a bug with the smallest possible example. It's probably not the content of your type - it's more likely that the type has not been assigned before calling a referencing function.

-- Jim - When is there going to be a release?
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 1st Dec 2014 10:37
@ Paul

After doing
array.remove()
and resizing again with
Array.Length=Array.Length+1

The last index keeps the old value and is not emptied.

Run this:


I never want what I know.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 1st Dec 2014 11:46
None of the "AddSpriteShape" commands work... "SetSpriteShape" commands seem fine.
FunBotan
9
Years of Service
User Offline
Joined: 29th Nov 2014
Location:
Posted: 1st Dec 2014 15:18
Another bug here. Attemting to use #insert and getting
main.agc:13: error: Unexpected token "#insert"
Or, alternatively, compiler can crash. Anyway i couldn't get this directive to work.
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 1st Dec 2014 18:06 Edited at: 2nd Dec 2014 01:33
setvsync(1) is not correct on blackberry playbook

infact niether is setsyncrate(60,1)

by setting either of those i get ~58 fps and a slight screen tear (hickup) once every second.

i found the solution temporarly is to set the syncrate to 120 and write a timer delay of 0.015 seems to resolve the screen tear and put the framerate back to 60 (for blackberry only) i needed to use .0166~ for 60 fps on other devices...

fyi...

edit: does blackberry not support .bmp? i was testing out some code using bmp and i get the missing image shown instead of my character.

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Dec 2014 04:05 Edited at: 2nd Dec 2014 04:09
Quote: "1) [win/android] SetRenderToImage() and drawbox()/DrawEllipse()/DrawLine()

I have "blue" square on the box and the ellipse with this code :
"


Fixed for the next version, you didn't provide source for the second image but hopefully it's covered by the same bug. I'll have a look at your other bugs.

Quote: "Found a bug. You can't return an object from a function and pass it directly into another as a reference. AppGameKit crashes/starts misbehaving."


Tested and works here, need more code.

Quote: "main.agc:9: error: "test" is being used without being defined or initialised"


Using the variable with Inc or Dec was being unnecessarily strict on the initialisation, the next version will let you initialise it below it's usage in inc/dec.

Quote: "I see some strange behaviour around for-next loops. sometimes interpretator just skips it. I think it is bug."


Thanks for the detailed example, I don't think I would have found the bug without it. It only happens if a particular For loop is run in the negative direction and then the positive direction, it didn't update it's comparison check back to positive. Fixed for the next version.

Quote: "new project template has CR-LF terminated lines but further when you paste some lines from anywhere IDE saves those pasted lines as LF terminated ones."


The IDE has a preferred line ending setting in the preferences->files section, but I don't know if it proactively changes the endings.

Quote: "You can't have a type contain itself (which is expected since we don't have pointers within types) BUT you should be able to have an array of the same type within it."


Sounds like you are playing with fire! The compiler and interpreter were designed under the assumption that recursive definitions wouldn't exist so if it does work then it is accidental and may break at any time.

Quote: "After doing array.remove() and resizing again with Array.Length=Array.Length+1
The last index keeps the old value and is not emptied."


Fixed for the next version.

Quote: "None of the "AddSpriteShape" commands work... "SetSpriteShape" commands seem fine."


AddSpriteShape requires physics to be turned on for the sprite.

Quote: "Another bug here. Attemting to use #insert and getting
main.agc:13: error: Unexpected token "#insert""


Fixed for the next version, turns out there were two bugs on #insert.

Quote: "infact niether is setsyncrate(60,1)"


Using a value of 60 is a special case and turns on VSync, this was because early versions of AppGameKit didn't have the VSync command so this was the only way to do it. using a value of 59 or 61 will return you to timer based syncing.

Quote: " does blackberry not support .bmp?"


Android and Blackberry do not support BMP, it wasn't a high priority since PNG is better in nearly every way.
Scary Little Rabbit
15
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 2nd Dec 2014 09:07
Quote: "Thanks for the detailed example"
thanks for your care.

error #1:
"too many stars, too many stares. disembody."
WIP: MIND!! | free fonts for your AGKs
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 2nd Dec 2014 17:21
So this steam delivered version is still "alpha" ?

Is this thread where I should post issues and not start a new thread?

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Dec 2014 17:27
I think new threads are better, makes it easier for me to reply one at a time. The Steam version is the same as Alpha 9 with a few modifications, but both stopped being Alpha quality a long time ago, I'll stop using the term on future updates.
CodeMonkey
11
Years of Service
User Offline
Joined: 6th Mar 2013
Location: Ireland
Posted: 3rd Dec 2014 02:58
These updates would be nice..

SetGlobal3DDepth: AGK cannot viably create 3D games at the moment because the depth sorting is broken. All 2D appears above 3D.

Shader Alpha: Allow shaders to set the alpha of 3D objects.
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 3rd Dec 2014 03:12 Edited at: 3rd Dec 2014 03:15
Quote: "Using a value of 60 is a special case and turns on VSync, this was because early versions of AppGameKit didn't have the VSync command so this was the only way to do it. using a value of 59 or 61 will return you to timer based syncing."

ok well the blackberry timer is out then and needs to be fixed.
when i set the sync rate to 60 it sets it to 58 and this causes a graphic screen tear every second and is mostly noticed on a graphic screen thats scrolling.

try it...
set your sync rate to 60
run this on your blackberry

setsyncrate(60,1)
do
print(screenfps())
sync()
loop

it will say ~58 which is just enough below to cause a screen tear once every second which can be seen if you have some graphics scrolling by. you will see a jolt (pause)/tear when its moving cause its not at 60 where the hardware is set to.

evidence supports that the timer on blackberry is running slightly lower then on windows,android or mac

xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 3rd Dec 2014 13:30
Can't figure out how to get Android working on Windows / MAC...
I don't know why i'm the only stupid here that can't develop on Android with AppGameKit in Tier 2.



george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 3rd Dec 2014 16:59
Quote: "I don't know why i'm the only stupid here that can't develop on Android with AppGameKit in Tier 2.
"

You are not alone. You can count on me!
tiNBlue
17
Years of Service
User Offline
Joined: 25th Oct 2007
Location:
Posted: 3rd Dec 2014 20:51
Just invested £50 on AGK2. These forums seem a bit badly organised. Can we not get some better structure going on for programming discussions so as to encourage more interaction especially from newcomers.

Everything in one single forum isn't great.

Failing that if anyone is interested I have created an AppGameKit subreddit.

http://reddit.com/r/agk/
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Dec 2014 22:40 Edited at: 3rd Dec 2014 22:41
What kind of organisation are you talking about? There's the general AppGameKit board that this thread is on, then there are boards for iOS and Android as well as boards for other platforms. Published games go in the showcase board, there's a game design section and Geek culture to keep the rubbish out of the main board.

What else do you think we need? (By the way, this thread is for reporting issues regarding alpha 9)

Quidquid latine dictum sit, altum sonatur
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 4th Dec 2014 13:46
@Batvink :
I think you should add those boards :

- BUGS : a board where we could post one thread for one bug should be clearer for Paul I think). When the bug is done, a simply [done] in the title could help the others to not post the same bugs)
Example of title for users :
[V2-alpha9]Bugs with...

- Tutorials/Guide : a section to post tutorials, video (youtube..), guide, and so... for new users and other users too.

- Tips : a Board to post code, example, tips (not a complete tutorial or guide). It could be like the base code, with the advantage of a forum (answers, discussion on code, other example in the answers...)

For the moment, we have some good examples lost in the showcase or in this board, between questions and general discussion on AppGameKit .

http://www.dracaena-studio.com
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 4th Dec 2014 14:35
Quote: "BUGS : a board where we could post one thread for one bug should be clearer for Paul I think). When the bug is done, a simply [done] in the title could help the others to not post the same bugs)"


I don't think everyone is aware of the bug reporting process:
[href=
Quote: "BUGS : a board where we could post one thread for one bug should be clearer for Paul I think). When the bug is done, a simply [done] in the title could help the others to not post the same bugs)"
]https://code.google.com/p/agk/issues/list[/href]

Quidquid latine dictum sit, altum sonatur
Effishen
10
Years of Service
User Offline
Joined: 13th Jun 2014
Location:
Posted: 4th Dec 2014 16:32
Hello!

I found a bug with AppGameKit and Facebook integration. At this point I'm not sure where the bug lies, whether it is in AppGameKit or Facebook.

Basically, when I create an App in Facebook, and use that App-ID to login with by compiled AppGameKit app, all is well and dandy.

Then if I change the "Namespace" field in Facebook, uninstall my app from my phone, and re-installing, I cannot login anymore. It says "Keyhash error" or something along that line.

Then if I remove whatever I typed in "Namespace" and save it, I will STILL be unable to login to Facebook, despite anything I do.

I basically need to delete the App from Facebook, and recreate the App in Facebook again, use the new different APP-ID and recompile my app before any login can occur.

Let me know if you need further information.

Effishen
Effishen
10
Years of Service
User Offline
Joined: 13th Jun 2014
Location:
Posted: 4th Dec 2014 17:03
ok this is really getting weird. Now for some reason (after some time) suddenly I cannot login anymore. (uninstall, and reinstall)

It says keyhash error.

Effishen
Effishen
10
Years of Service
User Offline
Joined: 13th Jun 2014
Location:
Posted: 4th Dec 2014 18:09
I think I may have solved it.

Still figuring out whether the problem is between the keyboard and the chair

Effishen

Login to post a reply

Server time is: 2024-11-25 15:34:36
Your offset time is: 2024-11-25 15:34:36