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 for Python

Author
Message
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 18th Feb 2024 20:28
Good evening a couple of years ago I looked at this and thought this looks far too complicated . I took another look a couple of weeks ago and this time I decided to put in some effort. Glad I did as once I realized what all the under scores were for it was just like regular AGK. I would like to use Python as a stepping stone for Mojo and I'm hoping AppGameKit will work with Mojo as python does. We'll see I suppose. Print_value_screenFPS does not appear to work but so far everything else does .
Any advice or input appreciated . Enjoy your evening.
adambiser
AGK Developer
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 19th Feb 2024 04:15
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 20th Feb 2024 10:51


Hey Adam it is the screenFPS that I can not get to work. I have played with the code a fair bit so . with the screenfps line removed It did run .
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 20th Feb 2024 10:55
This is the way I intend to continue. could you please point me in the right direction.
Thanks for reading .
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 20th Feb 2024 13:13 Edited at: 20th Feb 2024 13:54
Hi Adam really enjoying using AppGameKit with python. The only thing I don't like is there is no goto officially . But apparently it can be done. I've tried a few things to cure this and am still looking at it. Thanks Adam .



the code above does do what it says on the tin and works great. screen fps works fine it was my mistake.

I get paid in a couple of weeks and I will make a donation then.

Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 20th Feb 2024 13:46
Hey Adam it is now working .


This is great thanks.
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 21st Feb 2024 01:07
Good evening . How do I write a program in Python with AppGameKit . I've had some good results so far but I don't understand how to use it without the goto command .
I guess I'm gonna have to do some serious reading . Something I have noticed is Python with AppGameKit is faster than I thought it would be. The last time I tried to use python was on a very rubbish laptop without AppGameKit and it was the fact it was just not a powerful enough computer to run things properly ( HP Stream ) . Does anybody know which is faster AppGameKit tier 1 or AppGameKit for python ? With mojo just around the corner I think this is the way to go . I'm still using tier 1 AppGameKit but my next project will be Python / AppGameKit . If I can work out how to program without goto . I can make a loop which is good . I figure that a way to do this is make everything a function and then call each one as needed , sort of gosub return. Thanks for reading and any input or advice appreciated.
adambiser
AGK Developer
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 21st Feb 2024 14:50
You found the problem before I logged in again. Yes, it was the "str ScreenFPS()" part. It can also be: agk.print_value(f"FPS = {agk.screen_fps()}")

The speed comparison between tier 1 and AppGameKit for Python is very close.

Bear in mind that AppGameKit for Python has some limitations at the moment:
* doesn't run on Android, iOS, or Mac
* distribution is limited on Linux.
PyInstaller can be used to make standalone Windows executables, though.

In the future, discussions specific to AppGameKit for Python might be better done at itch.io.

A lot of the code you have in your loop should be outside of your loop:

No need to delete jump1 and recreate it. The rest of these lines are set up code that can be above the while loop. That would go for the Tier 1 code as well.
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 22nd Feb 2024 12:31
I think switching to Python from Tier 1 is gonna be pretty seamless. When I first looked at this a couple of years ago I thought it would be too difficult but it is really nice to work with and knowing AppGameKit is a major step up from the start.
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 23rd Feb 2024 08:07
Yes I see as in limitations. Still very nice.
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 23rd Feb 2024 11:43
I'll take a look at pyinstaller shortly and we'll see what happens. Of coarse there is tier 2 but I don't want to go down that path. At the moment I'm trying to get into Python as a stepping stone for Mojo and I am hoping AppGameKit Python will work.
Cloud Walker
User Offline
Joined: 18th Feb 2024
Location:
Posted: 5th Mar 2024 16:33
Adam, how could I export games as an apk i made with AppGameKit for Python?
adambiser
AGK Developer
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 6th Mar 2024 03:08
There is currently no way to export for Android with AppGameKit for Python.
I would like to find one, but haven't yet.
Cloud Walker
User Offline
Joined: 18th Feb 2024
Location:
Posted: 6th Mar 2024 13:48
How about as an executable file for Windows? Do you have tutorials for It?
adambiser
AGK Developer
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 7th Mar 2024 14:39
Look at "appgamekit-pyinstaller-spec-example.zip" at https://fascimania.itch.io/appgamekit-for-python.
It uses PyInstaller to create an folder with all of the files for distributing on Windows, including an EXE.
Cloud Walker
User Offline
Joined: 18th Feb 2024
Location:
Posted: 10th Apr 2024 17:50
Hey, any updates in appgamekit with Python? And for instance, can i use machine learning with this?
adambiser
AGK Developer
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 11th Apr 2024 03:42
Last I checked the AppGameKit repo was being rebuilt and I would have to adapt my build process to accommodate it. There weren't any changes to AppGameKit lately that would have affected the Python version.
I haven't done anything with machine learning and this project.

Login to post a reply

Server time is: 2024-11-17 22:31:08
Your offset time is: 2024-11-17 22:31:08