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 / Some other questions ..

Author
Message
Luca91
11
Years of Service
User Offline
Joined: 1st Sep 2012
Location: Italy
Posted: 8th Feb 2013 01:38 Edited at: 8th Feb 2013 01:44
Good night mates,
I have some question from long time, and I think that is come the time to ask :

1) My game is designed to be played in landscape mode only, but I don't know how to disable the ingame screen orientation. I mean, if I put my tablet orizontally , the screen orientation will change. I need to fix it in landcape mode, how can I do that ?

2) My game menu is designed to contain 4 buttons "Easy Levels" "Medium Level" etc... Each of those button when clicked will display the level list ( ie "level1" "level2" etc..) , by the way I can't put more than 12 buttons simultaneously ! So can I make a level menu with more that 12 selectable levels ?

3) The commands list on the agk website seems to be outdated. Can Somebody please point me to an updated commands reference where facebook "like" command is well explained ?

4) Is possible to create something like a Windows MessageBox ? I mean something like : "Good Job Mate, You Have Completed This Stage! Tap OK to continue" ??

5) I wonder if HTML 5 and linux deploy will ever be supported di AGK


Thanks mates, I'll use this thread for eventually other questions

During The Day I'm A Common University Student ...
During The Night I Become A SuperHero And I Write Video Games!
Wizzkid
AGK Tool Maker
17
Years of Service
User Offline
Joined: 14th Aug 2006
Location: Northern Ireland
Posted: 8th Feb 2013 02:11 Edited at: 8th Feb 2013 02:27
Hey,

Most of these questions have answers elsewhere so try to search first.

1) There is a command in AppGameKit called SetOrientationAllowed.

2) I haven't personally tried to use 12 buttons at once before so I cannot verify if this is a limitation or not, but there are other ways around this. If you use sprites as your buttons you can detect when a sprite is clicked, this is one possible solution. Take a look here.

3) If you go to the TGC website and then to your account you will find a section containing all your purchases. There is links here to download the latest beta version of AGK. In the beta you will find the most up to date help file with 3d commands and Facebook commands (they are under Extras)

4) Yes. Its a command simply called Message. You can find it here. However there is usually a more aesthetically pleasing way to display information that having an obtrusive Message box popping up on screen.

5) Well TGC have made Freedom Engine, development on it is currently on hold, but utilizes HTML5. As for Linux check out here!

Hope this answers your questions

Wizzkid

easter bunny
11
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 8th Feb 2013 03:09
I've attached an example code project that I use for for a Gui (the buttons) in my games, It might help you.

Click the red download button at the bottom right of this post to download the zip

There are 10 types of people, those who understand binary and those who don't

Attachments

Login to view attachments
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 8th Feb 2013 04:05
There is a limit of 12 virtual buttons.

But you create your own 'buttons' (and they can be rectangular) with any image/sprite and then detect whether the mouse click is within the space of the sprite (or use GetSpriteHitTest).

This lets you have as many sprites on the screen as you want. I use an animated sprite with three frames (unselected, selected and locked) and change the frame as appropriate.

It is best to create use an array of structures (Tier 1) to hold information about each sprite button and a set of functions to create the buttons and check them for being clicked (return the button id or index of a clicked on button, or zero if none clicked).

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Luca91
11
Years of Service
User Offline
Joined: 1st Sep 2012
Location: Italy
Posted: 8th Feb 2013 14:25
Well thanks mates.
WizzKid your post is really useful but:
Quote: "4) Yes. Its a command simply called Message. You can find it here. However there is usually a more aesthetically pleasing way to display information that having an obtrusive Message box popping up on screen."


I was aware of that command, but I thought it worked only on windows. I'll try it later


MissJoJo Thanks for your code , I'll check it later

During The Day I'm A Common University Student ...
During The Night I Become A SuperHero And I Write Video Games!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 8th Feb 2013 16:00
The Message command works fine in Windows, iOS and Mac. It pops up a message with an 'ok' button to press to dismiss it.

However, it doesn't work that way in Android. There, it only displays the message in very small text at the bottom of the display and dismisses it after a few seconds.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Luca91
11
Years of Service
User Offline
Joined: 1st Sep 2012
Location: Italy
Posted: 8th Feb 2013 17:20 Edited at: 8th Feb 2013 17:20
Quote: "However, it doesn't work that way in Android. There, it only displays the message in very small text at the bottom of the display and dismisses it after a few seconds."


Oh :/ Well I think that I've to code my own messagebox so

During The Day I'm A Common University Student ...
During The Night I Become A SuperHero And I Write Video Games!

Login to post a reply

Server time is: 2024-05-07 16:07:27
Your offset time is: 2024-05-07 16:07:27