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 / [SOLVED] Converting a game from pc to Android

Author
Message
Pfaber1
1
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 19th Apr 2019 12:54
Hi I'm going to try converting one of my Games to run on Android and was thinking what is involved . Was hoping it would just be the input controls . Is there much more to it ?

The author of this post has marked a post as an answer.

Go to answer

Cliff Mellangard 3DEGS
Developer
13
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 19th Apr 2019 13:06
Pretty much the problem with all various hardware..
I write all my later games to run on android and then pc to make it easier.

But should be pretty straight forward with controls simply if you only want it to run and then fix and expand.

I can only tell that you will use your 1-3 first apps to simply learn the steps to get it working properly.
But dont expect to get rich on adds anymore its awfull today.
Pfaber1
1
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 19th Apr 2019 17:19
To be more specific I need the virtual keyboard to pop up. How do I create it use it then delete it. This should keep me busy for a while. Thanks for the input . When I've worked this out I'll be onto virtual joysticks.
I was hoping this would take a couple of hours but a couple of days will be fine.
smallg
Valued Member
13
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 19th Apr 2019 18:23
not really, just inputs and making sure file names are exact as pc doesnt care about upper & lower case etc while mobile does.

for text input i usually use something like

life's one big game
spec= i5 4ghz, 16gb ram, Nvidia 1070ti gpu
Pfaber1
1
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 19th Apr 2019 18:51 Edited at: 19th Apr 2019 22:55
Thankyou that gives me something to play with and get the ball rolling.
Well I've had a play with it but not really in the mood today but will be getting stuck into it tomorrow. Got the jist of what needs to be done .
Once I've done the first one it should be easy enough to do the second. That AppGameKit player is a handy bit of kit .
Has anybody done a remake of a BBC micro game Elite . It was my favorite game 30 or so years ago and I'm thinking a remake would be a good project
for my next game . something similar anyway. I see what you mean about upper and lower case now when loading assets. Thanks for the tip.
Pfaber1
1
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 20th Apr 2019 15:51
Can somebody please tell me what is wrong with this code. It compiles fine but when I try and run it on my phone and press the button nothing happens.
setButtonscreenposition(1,600,550,100)
sync()
button1:
if getbuttonpressed(1)=1
DeleteVirtualButton(1)
sync()
goto start1
endif
goto button1

On pressing the button it should delete the button and goto start1 .
fubarpk
Moderator
14
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 20th Apr 2019 16:43
This post has been marked by the post author as the answer.

try

or


fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Pfaber1
1
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 20th Apr 2019 18:12
Thanks for that will try it now.
Pfaber1
1
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 21st Apr 2019 08:45
I'm still stuck on this problem.
tried setvirtualbuttonactive(1,1) and still no joy. It's like the button created is dead or inactive .
Any ideas as to why this would happen . I'm on a phone running Android pie 9 . Are there any issues?
Thanks for all your help .
fubarpk
Moderator
14
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 21st Apr 2019 08:51
createbutton() and addvirtualbutton() are different

fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Pfaber1
1
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 21st Apr 2019 09:20
well this still isn't working . Got me baffled . Here is what doesn't work. The button is on the screen but does nothing

AddVirtualButton(1,600,550,100)
SetVirtualButtonActive(1,1)
sync()
button1:
if getvirtualbuttonpressed(1)=1
DeleteVirtualButton(1)
sync()
goto start1
endif
goto button1


Pfaber1
1
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 21st Apr 2019 09:47 Edited at: 21st Apr 2019 09:51
AddVirtualButton(1,600,550,100)
SetVirtualButtonActive(1,1)
sync()
button1:
if getvirtualbuttonpressed(1)=1
DeleteVirtualButton(1)
sync()
goto start1
endif
goto button1
start1:
end




Just tried running the above code on it's own away from my main program and still does the same . tested it on phone and computer . It's gotta be something I'm doing wrong. Ideas anyone?
Pfaber1
1
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 21st Apr 2019 09:57
Hey fubarpk just checked out your apps on google play . An impressive collection . How much does it cost to put apps on the play store?
PSY
Valued Member
3
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 21st Apr 2019 10:01
Quote: "Hey fubarpk just checked out your apps on google play . An impressive collection . How much does it cost to put apps on the play store?"

25$ flat fee if I remember correctly, meaning you just pay once for your Google Dev account


PSY LABS Games
Coders don't die, they just gosub without return
fubarpk
Moderator
14
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 21st Apr 2019 10:26
Quote: "well this still isn't working . Got me baffled . Here is what doesn't work. The button is on the screen but does nothing "

there needs to be some kind of loop like my example which works
Quote: "Hey fubarpk just checked out your apps on google play . An impressive collection . How much does it cost to put apps on the play store?"

Thanks yeh only a one time fee much cheaper than appstore or even steam
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Pfaber1
1
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 21st Apr 2019 11:34
Hey fubarpk I figured out with your help where I was going wrong . I should of had sync() in the main loop . Thanks for your time .
Between goto button 1 and endif. Spent a whole day on that . That's something I'll never forget.
Bloodwire
3
Years of Service
User Offline
Joined: 26th Dec 2015
Location:
Posted: 21st Apr 2019 11:47
Another way to handle key input, is to create your own virtual keyboard and input handler. It's quite a bit of work though.
Pfaber1
1
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 21st Apr 2019 12:23
yes that was the road I thought i'd be going down originally but didn't find any virtual keyboard . I'm making progress now and hopefully i'll be done in a couple of days. There's no rush. I've got it all under control for now.
Pfaber1
1
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 21st Apr 2019 19:58
Time for an update . Finished converting my first game for Android from one of my pc games . Well pleased with it . Can't afford to go the play store root yet but will be as soon as I can afford it . 25 quid to put all my games on there seems fair . Gonna convert my maze game tomorrow should keep me busy for a few hours . Haven't looked at that code for some time so might take me a while to get my bearings . Thanks for all the advice.
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz

Login to post a reply

Server time is: 2019-07-17 08:00:28
Your offset time is: 2019-07-17 08:00:28