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.0.22

Author
Message
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 12th Dec 2016 15:20 Edited at: 18th Dec 2016 16:47
I've uploaded a new version to the TGC download area and Steam with the following changes



The main new feature is support for UTF-8 encoded strings throughout AppGameKit for unicode characters and support for TrueType fonts that can display them. In order to maintain backwards compatibility the new fonts will not be used automatically, you must use SetTextFont to use them, or set UseNewDefaultFonts(1) at the start of your app to turn them on by default throughout your project.

Let me know if you have any problems.

Edit: Known Issues
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 12th Dec 2016 15:32
Thanks Paul! Downloading now.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 12th Dec 2016 15:33
Paul,

AWE-SOME !

(thanks for the sensors !
--------------------------------
Join us on dedicated AppGameKit WeeKChat :
https://week.chat/room/AppGameKit
damothegreat
User Banned
Posted: 12th Dec 2016 15:35
Thanks @Paul

Damo
Using Tier 1 AppGameKit V2
Started coding with AMOS
Anything is possible if put mind to it
SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 12th Dec 2016 15:50
Quote: " Using SetWindowAllowResize to disable resizing will now also disable the maximize button on Windows"

sweet ...no more borders if i disable that
Phobos70
7
Years of Service
User Offline
Joined: 14th May 2016
Location: Italy
Posted: 12th Dec 2016 16:20
Thanks Paul for your invaluable help!!!

Luigi
pinete
12
Years of Service
User Offline
Joined: 28th Jul 2011
Location:
Posted: 12th Dec 2016 18:24
Thanks a lot for your effort, Paul.
Best!
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 12th Dec 2016 18:34
Outstanding! Adding true type fonts has brought me back to AGK.
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 12th Dec 2016 19:07
Many thanks, very exciting updates! TTF is a massive time-saver.
adambiser
AGK Developer
8
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 12th Dec 2016 20:34 Edited at: 12th Dec 2016 20:35
Thanks for fixing the CreateSoundFromMemblock bug and for all the work you've done. Get/SetFilePos are also useful additions for me.

Is there a way to load an image and set its subimages information independently (without needing a subimages.txt file for the image)?
ie:

I would like to store a font image and its subimage.txt information together in a single memblock-based file, but I haven't found a way to do this and implement the subimages information.
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 12th Dec 2016 22:48 Edited at: 12th Dec 2016 23:01
Paul,

It seems that the SetRenderToImage command with -1 to use the depth buffer no longer works correctly since this new version (on windows and android players but maybe others)


Edit : sorry... it seems something has changed with the ClearScreen() command (that i removed to test in the 2.0.21 and it was working (ClearScreen() between the SetRenderToImage() and the Render() command ) .. now i have to use it.

But now everything is ok
--------------------------------
Join us on dedicated AppGameKit WeeKChat :
https://week.chat/room/AppGameKit
Abiz
11
Years of Service
User Offline
Joined: 14th Nov 2012
Location: Amsterdam
Posted: 12th Dec 2016 23:22
Just tried the TTF fonts on Windows, works great and looks awesome, however the same code doesn't work on Android. Yes, I included my ttf file in the media folder.
Here is the basic code

hom_font = LoadFont("fonts/Homenaje-Regular.ttf")
hom_id = CreateText("!abcdefghijklmnopqrstuvwxyz" + chr(10) + "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
SetTextFont(hom_id, hom_font)
SetTextVisible(hom_id, 1)
SetTextPosition(hom_id, 0, 100)
SetTextSize(hom_id, 78)

Works fabulous on windows, but not on Android.
Please don't say that android doesn't support truetype...
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 13th Dec 2016 00:13
@Abiz: Your code works fine for me. I just tried it with AngelineVintageDemo.ttf from http://www.1001freefonts.com/ and it works great on my duff old 4.3 Droid. Have you updated your player?
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Abiz
11
Years of Service
User Offline
Joined: 14th Nov 2012
Location: Amsterdam
Posted: 13th Dec 2016 00:40
Thanks for trying CJB, I'm using the built-in Android package (APK) builder.
I'm building a distributable package for my game, don't use the player.

So if the player works, than I have to assume that the built-in players (that are used to build the android package) do not work / are of a different version.
Your info helps tremendously in trying to determine the root cause of the problem.
Just in case you don't know the APK packages multiple libandroid_player.so files for use on different processors.
So those files must have a different version than your player is using or yours is using a different processors player....

I have just checked the .so files and they all contain the SetTextFont command (which is fir truetype).

I will test with AngelineVintageDemo as well.
Thanks




Abiz
11
Years of Service
User Offline
Joined: 14th Nov 2012
Location: Amsterdam
Posted: 13th Dec 2016 01:01
Same results: Here is my entire code
// Constants
FONT_SIZE = 12
FONT_ALPHA = 255
ypos = 0
text$ = "!abcdefghijklmnopqrstuvwxyz" + chr(10) + "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"


hom_font = LoadFont("fonts/homenaje.ttf")

hom_id = CreateText(text$)
SetTextFont(hom_id, hom_font)
SetTextVisible(hom_id, 1)
SetTextPosition(hom_id, 0, ypos)
SetTextSize(hom_id, FONT_SIZE)
// SetTextSpacing(id, -5)
ypos = ypos + FONT_SIZE
ypos = ypos + FONT_SIZE

ang_font = LoadFont("fonts/Angeline Vintage_Demo.ttf")

ang_id = CreateText(text$)
SetTextFont(ang_id, ang_font)
SetTextVisible(ang_id, 1)
SetTextPosition(ang_id, 0, ypos)
SetTextSize(ang_id, FONT_SIZE)
// SetTextSpacing(id, -5)
ypos = ypos + FONT_SIZE
ypos = ypos + FONT_SIZE

do
sync()

if GetRawKeyReleased(27) = 1 then end

loop

attached are output from windows & android

Attachments

Login to view attachments
CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 13th Dec 2016 01:55
Amazing work, Paul! It is very much appreciated!
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 13th Dec 2016 05:28
Quote: "Just tried the TTF fonts on Windows, works great and looks awesome, however the same code doesn't work on Android."

My mistake. Exported Android apps read files from their asset folder which requires a special file access command, which I forgot to use, so the font library can't load the ttf file. It works from the write folder though which is why the broadcast app works. I've fixed this for the next version, for now you can work around it by copying the font file to the write folder at the start of your app like so
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 13th Dec 2016 11:00
We need a "SetTextOffset" so we can control the origin for SetTextAngle.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Abiz
11
Years of Service
User Offline
Joined: 14th Nov 2012
Location: Amsterdam
Posted: 13th Dec 2016 12:04
Thanks Paul, will try asap.
Appreciate the help and quick reply.

Preben
AGK Studio Developer
19
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 13th Dec 2016 13:48
The best FIX you forgot to mention is, im now running with a 24bit depth buffer on Mac , if any of you tried to run with the 16 bit you know what i mean , Thanks Paul great release.
best regards Preben Eriksen,
Abiz
11
Years of Service
User Offline
Joined: 14th Nov 2012
Location: Amsterdam
Posted: 13th Dec 2016 15:03
Paul,
It is confirmed, this works in the android load. I use two fonts so here is my code


However, I see that these TTF fonts have not yet been implemented for other usage than text.
Cannot use for PRINT, cannot use for EDITBOX, cannot set as DEFAULTFONT, I can only set UseNewDefaultFont (which then uses the default system font with the UTF-8 character set).

Or perhaps I am missing something ....

Thanks again for your work-around.
IBOL
Retired Moderator
19
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 13th Dec 2016 15:51
I'm excited about the new fonts, it's always been a big bad issue.

But when i run the player, and minimize my app, and then return to it
all the text is a bunch of weird lines.

Anyone else seeing this?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 13th Dec 2016 15:57
Quote: "I see that these TTF fonts have not yet been implemented for other usage than text."

We can add commands to use custom TTF fonts for print and edit boxes, but I didn't want to delay this update any further.

Quote: "But when i run the player, and minimize my app, and then return to it
all the text is a bunch of weird lines."

What platform are you using, and can you send me an example?
bjadams
AGK Backer
15
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 13th Dec 2016 19:37
Personally I'm waiting for VisualStudio 2017 (as it will be a very lean and bloatware-free version of VS) to get back to do something with AppGameKit, so hope to see some working templates when it's out
Rickynzx
12
Years of Service
User Offline
Joined: 19th Dec 2011
Location: Troon, Scotland
Posted: 13th Dec 2016 23:26
Great update Paul,

True type fonts is one thing that was on my wishlist, this will be so useful, Also the firebase functions look interesting.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 14th Dec 2016 09:39
I'd like c# or java tier 2 support.
Scary Little Rabbit
14
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 16th Dec 2016 05:59
Paul Johnston wrote: "The main new feature is support for UTF-8 encoded strings throughout AppGameKit for unicode characters and support for TrueType fonts that can display them."

sweet! hope I helped indirectly to get it happened by doing my modest efforts here and there.
error #1:
'too many stars, too many stares. disembody.'
Unicode yours
Scary Little Rabbit
14
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 16th Dec 2016 08:34
I see no getTextAngle(). and I'd like to see setTextVerticalAlignment() btw and set/get text offset commands too.
error #1:
'too many stars, too many stares. disembody.'
Unicode yours
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 16th Dec 2016 23:38 Edited at: 17th Dec 2016 00:01
font = LoadFont ('font.ttf')
CreateText(1,"Hello World")
SetTextFont (1,font)
SetTextSize(1,120)
SetTextColorRed(1,255)
SetTextSize(1,120)


Not work: SetTextColorRed(1,255)

P.S. Plz, add WebView. Thx!
Behdadsoft
14
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 17th Dec 2016 11:59
Hi,

After Updated my AppGameKit to new version (2.0.22) and when I try to make apk file, it give me below error. I test it with several projects.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 17th Dec 2016 15:02
Quote: "Not work: SetTextColorRed(1,255)"

The red value may be 255 but the green and blue values are probably also still 255, so it will appear white. You could use SetTextColor( 1, 255, 0, 0, 255 )

Quote: "After Updated my AppGameKit to new version (2.0.22) and when I try to make apk file, it give me below error."

That error could be caused by installing over the top of an old version. Try deleting the "Tier 1" folder and running the installer again, you won't lose any of your IDE settings.
Behdadsoft
14
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 17th Dec 2016 16:06
Quote: "That error could be caused by installing over the top of an old version. Try deleting the "Tier 1" folder and running the installer again, you won't lose any of your IDE settings."


Thanks Paul, now work very well.
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 19th Dec 2016 15:41 Edited at: 19th Dec 2016 15:43
AGK no longer shows a text box on screen when calling StartTextInput() or CreateEditBox() - but it does still work invisibly
(on both PC and android)
life\'s one big game
spec= 2.6ghz, 1gb ram, 512mb gpu, directx 9.0c, dbpro and classic
damothegreat
User Banned
Posted: 19th Dec 2016 15:49
Results for me is:-

CreateEditBox(1) - creates a white box of which can input black characters - Default position - top left corner of screen

StartTextInput() - creates a white box with an grayer outline - to input black characters - default position - centre of the screen

So it works for me.

Please send a code snippet of yours not working expectedly

Damo

Using Tier 1 AppGameKit V2
Started coding with AMOS
Anything is possible if put mind to it
Carharttguy
7
Years of Service
User Offline
Joined: 8th Jul 2016
Location: Belgium
Posted: 19th Dec 2016 19:28
Very nice update!

Is there actually an update cycle? When is the next update? 1,2,3 months? Or do you update when you feel like there is another version done?
frittblas
10
Years of Service
User Offline
Joined: 15th Jan 2014
Location:
Posted: 20th Dec 2016 00:01
good job!

I asked this question before but never got an answer:

Will there ever be a way to create HTML5-apps from a Tier-2 project?

If not, maybe give some pointers on how to do it yourself.

This is huge for me and would really appreciate an answer.

Just give me something!

Cheers

/hans
f
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 20th Dec 2016 21:45
Quote: "That error could be caused by installing over the top of an old version. Try deleting the "Tier 1" folder and running the installer again, you won't lose any of your IDE settings."


What about on the Mac? When I try and to export to APK it closes AppGameKit down completely without any error messages at all. It worked fine in 2.0.21.

I'm going to have to go back to that version to release an update.
damothegreat
User Banned
Posted: 20th Dec 2016 21:51
It maybe conflicting with older versions of AppGameKit - try uninstalling any older versions first (preferably making a backup of the it in the apps directory first) and apply this only update

No one else is suffering unless your the only Mac user

If any other Mac users experiencing this then shout out

Damo

Using Tier 1 AppGameKit V2
Started coding with AMOS
Anything is possible if put mind to it
ChrisTheProgrammer
7
Years of Service
User Offline
Joined: 10th Dec 2016
Location:
Posted: 21st Dec 2016 05:08
Hi Paul,

I have confirmed the same problem as IBOL. I didn't find this thread until after I posted here...

https://forum.thegamecreators.com/thread/218457

Phone: Nexus 5
OS: Nougat - CM14

Everything looks great until the app is minimised, when it is restored the Font is a mix of blank and lines.

Best regards,

Chris
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 22nd Dec 2016 07:49
Damo, I deleted all versions and all linked files using a tool called TrashMe - AppGameKit doesn't actually install on the Mac so there's no proper uninstall option - and then re-extracted the latest version but I'm still getting the same problem. I tried a blank project too thinking that maybe it was my project that was causing it to close down completely in the latest version. It happens as soon as I choose the option to export to APK. I'm not seeing the window that pops up with all of the APK settings and options. AppGameKit just closes completely. I tried Googling the error message in the Apple generated error report but that's not helped. I've gone back to 2.021 now and will wait for a newer version, or will keep trying 2.0.22 each time the operating system updates.

Paul, can you please confirm that the APK export works as expected in 2.0.22 on a Mac? Also on macOS Sierra when you first run AppGameKit (i.e. a new version downloaded) it gets stuck verifying the app (like stuck forever). I had to run this line in Terminal (after searching online for a bit).

xattr -d com.apple.quarantine /Applications/AGK2.app

Paul, will the Apple generated error report I'm getting each time help the Dev team at all? If so, who can I send it to?
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 22nd Dec 2016 13:50
Hi Paul,

first of all, I would like to thank you for your great work of the agk product. I think I am not the only one who would like to know in which direction AppGameKit will develop. It would be nice if you could give some information from time to time on what you are working on.

I would like to know if further 3d physics commands will come. Are 3d-mathematics commands further expanded? Or even a plugin system to write own extensions for agk would be great. If it is technically possible at all. All these things have already been suggested in the feature request thread but we do not know whether these are accepted or rejected.

All this and other things would be nice to know. Whether they are in work, stand on the TODO list or will not come.
It should not be a promise. Just a look at what comes at some point.


best regards
MadBit

P.S.:
My suggestion would be to create a TODO-List as an own thread, in this forum. This you can updated from time to time (may be monthly ).
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine
Carharttguy
7
Years of Service
User Offline
Joined: 8th Jul 2016
Location: Belgium
Posted: 22nd Dec 2016 14:01
I just tested the Export to APK function on my macOS Sierra 10.12.1: Crashes indeed.
I don't know how it was with the previous version of AppGameKit, I never personally use the APK exporter.

Error report here: http://pastebin.com/0AReKeJ9

@MadBit: +1 for the TODO-list.
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 22nd Dec 2016 14:15
Thank you for testing that Carharttguy! It's good to know that it's not just a problem with my setup/system. Hopefully it will be fixed in the next version.
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 23rd Dec 2016 14:59
I have confirmed the same problem:

https://forum.thegamecreators.com/thread/218457

Phone: Zenfon 5
OS: Android 4.4.2

Everything looks great until the app is minimised, when it is restored the Font is a mix of blank and lines.

Attachments

Login to view attachments
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 23rd Dec 2016 15:29
Also confirmed problem with a resumed app's fonts getting messed up.

As a dirty workaround, you can check for GetResumed, and delete all text/fonts, then reload fonts and recreate text.

Example:

V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 23rd Dec 2016 16:20
CJB, It works, thank you!!!
NGP
AGK Developer
8
Years of Service
User Offline
Joined: 29th Dec 2015
Location: In the studio
Posted: 27th Dec 2016 12:40 Edited at: 27th Dec 2016 12:45
FONTS:
+1 to the problem (which affects the new default font, as well as any loaded fonts.)

The dirty workaround is a great idea, thanks for that CJB!
However, knowing exactly when the player has minimised/restored the app and then re-creating all in-game text for that moment is a painful prospect (depending on size and complexity of the project). Definitely needs a bug fix!


EXPORTING APK:

If I load AppGameKit directly (not using Steam) the 'export Android APK' function crashes AGK. It just closes without warning. However, if I load AppGameKit via Steam and export an APK, it works perfectly! (see app link in sig for working example)
AGK Linux user.
Tessellatus - a game of chance for Android.
ApkGames.Guru
10
Years of Service
User Offline
Joined: 25th Oct 2013
Location: England, UK
Posted: 29th Dec 2016 17:10
Thanks for the workaround CJB.

I didn't get any issue via the IDE or broadcasting to AppGameKit player, although the font did not load upon the live app launching on the device, so straight off the bat it shown the default system font and not the TTF, so not certain if the workaround will resolve, but I'll give it a go and keep it in mind
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 30th Dec 2016 08:51
@Paul, so far so good with the update. I do have one request about something that has nagged me forever.

RE: PrintImage (Save To Photo Library)

Using this command to save to the photo library on iOS/Android forces an alert box open every time that says "Message - Image has been saved to your photos folder" without any option for customization or to disable the alert outright. It also is not localized so always displays only in English. This can completely break the user experience and would be much better suited as a silent callback method similar to the GetHTTPResponseReady() method, so that users can handle it as they please. I would suggest a command GetImageSaveResponse() that would return 1 after the image has been saved successfully, so that the developer can display an alert or inform the user in a less intrusive and more personalized manner.

Related, I would like to have the ability to specify a custom album within the Photo Library (such as the app's name) for the images to be saved when using this command. I'm working on an app that may feature heavy saving in this manner and it'd be nicer to not clog up the user's main photo album with all of these images. But the alert is of higher priority to make customizable.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 30th Dec 2016 09:07
Quote: "although the font did not load upon the live app launching on the device"
This is another "Known Issue" - You need to:


Before attempting to load your font.

This is to do with the new font system not looking in the correct place(s) for the font files. Paul mentions this in the OP.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign

Login to post a reply

Server time is: 2024-03-19 11:22:46
Your offset time is: 2024-03-19 11:22:46