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 / [STICKY] AppGameKit for Python chat

Author
Message
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 10th Mar 2018 17:13
Hi everyone! I hope that you've had the chance to look at AppGameKit for Python.

I made this thread for feedback and questions. There's also a community forum set up on the itch.io page.
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 10th Mar 2018 23:14 Edited at: 10th Mar 2018 23:14
Hey I think this is great, sadly I have not much time to check it out
nonom
AGK Developer
1
Years of Service
User Offline
Joined: 12th Nov 2017
Location: Aden
Posted: 10th Mar 2018 23:21
Uhmm, it opens a lot of possibilities. Great news, thanks!
kaband
16
Years of Service
User Offline
Joined: 22nd May 2003
Location: Chicago
Posted: 11th Mar 2018 03:56
Hi Adam,

I think this is a cool idea and it seems like you've put in a good bit of time and effort. I don't use python today, but I'm certainly aware of it and its flexibility. I think it would be useful to understand what the driver is for AppGameKit in Python - What can I do with AppGameKit in Python that I can't in Tier 1 and if I needed to do more than what Tier 1 offers - why would Python be a better choice over Tier 2? If you could elaborate on why AppGameKit in Python is useful over Tier 1 or Tier 2 and give a few concrete examples - it may help it get more traction.

Thx.
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 11th Mar 2018 06:19
@kaband: Python's flexibility is its main strength. One could kind of consider it tier 1.5 because it blends many aspects of both tiers together.

Possibly one of the biggest features Python has over Tier 1 is the ability to have classes. This is one thing I wished Tier 1 had while writing my game Toxic Terror. I wanted to encapsulate each monster type's behavior into its own class but instead I ended up assigning a monster type code to each monster and using a whole lot of IF statements throughout the code to check the type code and act accordingly.

With Python one could very easily set up a method (or class) to render each screen of the game and use a variable to hold which method to call as its current state:


Python has a pretty large community behind it, so this opens up the doors to using third-party modules, such as PyTMX for Tiled Map loading in addition to its own modules which have varying degrees of usefulness.

As for Python vs Tier 2, I think most will find it quicker to develop in Python, especially those comfortable with Tier 1. Granted if you're developing a game where performance and speed are top priorities, Tier 2 is your best choice. While Python isn't speedy, my experience with this project has shown me that it can run at least as fast as Tier 1, though it might require some tweaking to do so, but don't expect it to approach Tier 2 speeds.
Rick Nasher
1
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 11th Mar 2018 13:11 Edited at: 11th Mar 2018 13:12
I'm not into Python at the moment but might be, when going to make more use of my Raspberry Pi as on that platform it is almost the de facto standard I believe.
Might be easier to mix AppGameKit functionality with the already existing functionality there, but would have to examine if it holds any plusses in that respect over the AppGameKit Tier1 Raspberry Pi release.

Also afaik Python is kinda booming and also respected as an industry language (opposed to BASIC like languages, which I personally find a pity but hey), so if one can master Python *and* make use of AGK's functionality at the same time then new job opportunities may turn up. And possibly a whole new audience that will embrace AGK.

So.. a pretty good thing I think, for which we thank you.

GarBenjamin
AGK Developer
2
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 11th Mar 2018 17:20 Edited at: 11th Mar 2018 17:21
Like Rick Nasher said ^^^ I've never got into Python either. Certainly heard of it and many other languages many times but never had any need to check it out. Hopefully your work will be something that will draw more people into AGK2 and TGC communities.

I guess my only concern would be that part. That it doesn't segregate and take away from all lf TGC's work by allowing people to completely bypass TGC and just use their agk lib. But then as far as I know I think TGC put agk up on a source repo a while back so am not sure how exactly they make money from it anyway if people can now just download and build it (I mean it seems like only a matter of time before people out there would offer prebuilt binaries for download including the agk libraries).

Whew a lot of thinking out loud there. TLDR: As long as your efforts help TGC and the community here to grow and not conflict with those things I think it is great!
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
Ortu
DBPro Master
11
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 11th Mar 2018 19:04
I think describing it as a tier 1.5 sums it up pretty well.

Python shares many of the benefits of basic in that it is very quick and easy to just throw down some code and go without having to worry about all the bare metal details needed in T2

But it is also a bit more advanced, supporting classes and OOP, and has many great libraries available. (This weekend I'm working on getting this integrated with cefpython to use embedded chromium as a UI layer, this could be done in T2 but not T1, and i don't really want to bother with T2, so this is a good middle ground for me.)
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 11th Mar 2018 21:07
@Rick Nasher: Python is a fun language. It has some neat things that make it fun to use in my opinion. Definitely worth a try.

@GarBenjamin: From what I know, the only thing AGK-related that TGC has made open source is the IDE, not the library itself. Source: https://github.com/TheGameCreators

TGC agreed to license it for a trial run and whether it goes beyond that is up to the overall response. While a person can use this PYD for free, it does have some limitations: AppGameKit for Python is stuck at using 2017.12.12 for this trial. It also has a required "Created with AppGameKit" intro logo and mentions AppGameKit in the window title bar.

@Ortu: I'm curious how your cefpython project goes. Let me know if you find any problems.
c0d3r9
1
Years of Service
User Offline
Joined: 2nd Oct 2017
Location:
Posted: 11th Mar 2018 22:39 Edited at: 11th Mar 2018 22:40
I liked the system of Xors3D. There was dll and if you wanted to unlock the demo, you had to enter a key in the source code which you received when you bought it.
Without the key, it remained a demo version.
And if somebody would "distribute" his key on the internet, it would be easy to see who owns it.
This would open the gates for AppGameKit wide open to use with other languages. (required dll access)
Zigi
9
Years of Service
User Offline
Joined: 5th Jul 2009
Location:
Posted: 12th Mar 2018 11:33
This is not the first community version but none of them being developed any longer. They were always outdated and poorly documented and I can't see it about to change wit this version.
I'm appreciate your effort @adambiser and it is nice from TGC to give it a shot but I'm honestly don't know what TGC expect to achieve in the next 12 months with a limited, unofficial, unsupported and outdated version.
People might give it a shot but personally I would not risk it being stick with an old version of AGK.

In my opinion TGC should create an API that would allow people to add 3rd party language support and hook it up to the latest version of AppGameKit without any licensing issues. It would allow people like adambiser to offer support without making sacrifices like being stick with an old version and depend on TGC poor and selfish marketing decisions.
An API would still require AppGameKit being purchased and installed but I can decide to use 3rd party IDE and languages like Python and PyCharm with any version of AppGameKit I have installed.

That would be the best way imo.
GarBenjamin
AGK Developer
2
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 12th Mar 2018 13:41
Ah ok. I thought it was odd if they released source to agk itself. Editor makes more sense. Thanks.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 12th Mar 2018 14:26
@Zigi: I understand your thoughts and concerns.
To clarify a few things though: this has been officially licensed and I will be supporting the part of the code that I wrote. Yes, it is restricted to only using AppGameKit 2017.12.12, but it is not limited in any other way except that it shows a logo on startup and has AppGameKit mentioned in the title bar when windowed.
kaband
16
Years of Service
User Offline
Joined: 22nd May 2003
Location: Chicago
Posted: 12th Mar 2018 17:17
@AdamBiser - Thanks for answering my questions. It definitely helped me understand the benefits of using Python w. AGK.
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 2nd Apr 2018 23:43
The PYD has been updated so that it will work with Python 3.3+ instead of just 3.6. Available at itch.io.
The Next
Web Engineer
11
Years of Service
User Offline
Joined: 3rd Dec 2007
Location: United Kingdom
Posted: 3rd Apr 2018 09:06
I have stuck this at the top of the board will help people locate a place to ask questions.
Windows 10, Intel i7 3.8 GHz, 16GB DDR3, NVIDIA GTX 780 4GB Superclocked

pjsmith67
3
Years of Service
User Offline
Joined: 2nd Feb 2016
Location: Nebraska, USA
Posted: 3rd Apr 2018 17:00

I would love to use Python for my AppGameKit projects but I'm afraid to commit to it since this could get cancelled in a year.
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 3rd Apr 2018 17:07
@The Next: Thanks!

@pjsmith67: You are still allowed to develop with and distribute projects using the PYD even if the project downloads get removed after a year. It is currently locked at AppGameKit 2017.12.12 functionality though.
pjsmith67
3
Years of Service
User Offline
Joined: 2nd Feb 2016
Location: Nebraska, USA
Posted: 3rd Apr 2018 17:32
Unfortunately, I can't commit the time to this. I don't want to be in the middle of developing something and then have the plug pulled on it and I don't want to be tied to a specific version of AGK.

If I could use Python for AppGameKit projects now and in the future, I would switch in a heart beat. Not that I don't like Tier1, but I do miss having objects and classes.

This also assumes that a Mac version would be made available.

Don't get me wrong though, this is a wonderful idea (and great work!) and I really really hope it is successful.

adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 3rd Apr 2018 17:58
@pjsmith67: Understood. Even if you don't use it right now, you can still show support for it by using the promo code on the project page if you need to buy anything AppGameKit related.

I don't have a Mac myself so I can't compile for it or test on one. I don't have any Tier 2 Mac templates in my AppGameKit folder, but if tier 2 works on Mac, this project should be able to as well in the future.
EdzUp
16
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Citadel Cyberspace
Posted: 5th Apr 2018 08:26
Another thing to take into consideration is that Python is the educational defacto standard in the UK. TGC could make a killing marketing it as such with a bit of Polish
-EdzUp
gerdich
1
Years of Service
User Offline
Joined: 16th Apr 2018
Location:
Posted: 5th May 2018 12:08 Edited at: 5th May 2018 12:36
Wouldn't it be better to concentrate on a source base that is compatible with Cmake for Windows, MacOS and iOS and Android? This would easily allow to link from Python, Delphi, Borland C++ and many more.
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 5th May 2018 14:04
I'm not familiar with cmake, but I don't see how it would really change anything relating to this project except for how the compilation of the pyd file is done. The pyd is essentially just a Tier 2 project.
gerdich
1
Years of Service
User Offline
Joined: 16th Apr 2018
Location:
Posted: 6th May 2018 12:18
Aren't you using boost/python?
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
gerdich
1
Years of Service
User Offline
Joined: 16th Apr 2018
Location:
Posted: 13th May 2018 12:19
Will there be a Version of the Visual Editor that creates Python Tier 2 code?
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 14th May 2018 07:32
I don't have the Visual Editor so I don't know how it works or how the outputted code looks. If I get it sometime, I will look into it.
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 28th May 2018 00:25
For those interested, I've release a new version of the PYD. The full devlog entry can be read at itch.io.

Summary:
* Added an Application class that handles the creation and destruction of the AppGameKit window. An instance of this class should be used in a with block and is recommended instead of using the create_window and destroy_window methods.
* Renamed draw_text method to print_value to avoid confusion with AppGameKit's new DrawText command.
* Renamed set_draw_text_color, set_draw_text_font, set_draw_text_size, and set_draw_text_spacing to set_print_color, set_print_font, set_print_size, and set_print_spacing respectively.

All files on the project page were updated.

New sample code:

basjak
9
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 24th Jun 2018 18:35
Just found out that AGK_python is available. Am in.

adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 25th Jun 2018 05:23
I've been working on a simple Wolfenstein 3D style FPS engine for this and will be releasing it on github when it reaches a more finished state.
basjak
9
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 27th Jun 2018 00:57
unfortunately, my system is 64 bit. I couldn't download the 84bit python.
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 27th Jun 2018 01:01
You can find the x86 installer here: https://www.python.org/downloads/release/python-365/
Look for "Windows x86 executable installer"
I'm on Windows 7 x64 and am using it.
basjak
9
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 27th Jun 2018 15:14
although I did it right yesterday but still not working:



and the message is:
Quote: "
File "C:\Users\......\.......\TRIAL.PY", line 14
AGK.create_text("Hello world", 1)
RuntimeWarning: Image is too large, resizing to 0x0
Traceback (most recent call last):
File "C:\Users\......\......\TRIAL.PY", line 15, in <module>
AGK.set_text_size(16)
TypeError: Required argument 'size' (pos 2) not found
"
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 28th Jun 2018 14:32 Edited at: 28th Jun 2018 14:35
@basjak:
You need to use an Application instance with your script. This handles creating and destroying the window.

(The set_text_size call also needs the text object ID as the first argument.)
basjak
9
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 30th Jun 2018 21:10
It works. well done for the effort.
tsaulic
4
Years of Service
User Offline
Joined: 21st Jan 2015
Location:
Posted: 27th Feb 2019 13:16
I wanted to say thanks for creating this!
Over the years, I've used mostly Java/Python and recently Kotlin. I have some C/C++/Lua experience, but not much, since work always brought me to Java.
However, I really enjoy Python and I wanted to make a small game. Sadly, I don't like any Python game libraries, but this looks promising so far.

I sincerely hope TGC allow it to be updated to AGK2 so we can fully embrace Python game dev with AGK2 and make awesome projects. I'm interested in 2D only, so this is perfect.
Currently making a shooter with Tyrian2000 as inspiration.

Good luck and thanks again!
ShaunRW
DBPro Developer
11
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 2nd Mar 2019 02:16
I love this. Python is so much fun to program with, and even more so when combined with the AppGameKit command set. It just fits nicely. It's refreshing developing with AppGameKit + OOP whilst not having to worry about the complexities of C++.

I really do hope this gets the go ahead to continue. In my opinion, python support would make a great addition to the new AppGameKit Studio product. This alone would give me a good reason to purchase the new version.
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 7th Mar 2019 18:17
Great news!
TheGameCreators have informed me that AppGameKit for Python is allowed to continue long term and can keep itself updated to the latest AppGameKit Classic releases.
ShaunRW
DBPro Developer
11
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 8th Mar 2019 11:29
Excellent news Adam! Well done.
apocolyp4
8
Years of Service
User Offline
Joined: 10th Jun 2010
Location:
Posted: 10th Mar 2019 17:42
Ive updated my AppGameKit Visual Editor for Python support which allows you to run your AppGameKit Visual Editor created projects using AppGameKit Python. The update reduces the loading times and should be 2-3 times faster on start up.

It supports loading in Sprites, Text, Edit boxes, Virtual buttons, and Particles.

You can get the code for it here: https://github.com/apocolyp4/AppGameKit-Visual-Editor-for-Python

Either use the main.py file it comes with as a template or just copy these files into the root of your existing project:

VisualEditor.py
VisualEditor_Image.py
VisualEditor_Scene.py
VisualEditor_Scene_Entities.py
VisualEditor_load.py
VisualEditor_properties.py
VisualEditor_utilities.py


The README.md goes into detail on how to use it.

adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
ShaunRW
DBPro Developer
11
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 30th Mar 2019 05:24 Edited at: 30th Mar 2019 05:25
I have noticed the DrawText command is missing. Any chance this could be included when you update next? please
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 30th Mar 2019 05:37
DrawText has added after 2017.12.12. It will be in the next update. A little more than 100 commands were added since that version.

But yes! It will be added in the next update.
ShaunRW
DBPro Developer
11
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 30th Mar 2019 06:47
Ah, that makes sense. Looking forward to the update.
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 17th Apr 2019 08:31
AppGameKit for Python v1.3 has been released.
Download

The AppGameKit code base was updated to 2019.02.18. The internal Python code was updated to 3.7.3.

Several naming changes have been made. I originally handled AppGameKit's method overloading solely through optional parameters, which had a tendency to change the parameter order from what AppGameKit has. This update keeps AppGameKit's parameter order, but adds suffixes to the method overloads.
ie: load_image(filename) and load_image_id(1, filename)

Also, almost all methods had an 'id' parameter, this has changed to something more specific, ie image_id, sprite_id, etc, based upon what the id is, which is more in line with AppGameKit Tier 2's naming.

Further details can be found in the devlog on itch.io.
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 18th Apr 2019 22:44
Version 1.3.1 is out.
A quick fix.
* Fixed the handling of optional string parameters.
* Added an optional parameter to import_plugin that can be used to pass the command definitions as a string rather than requiring the commands.txt file.
* Errors generated by AppGameKit in methods that return None/void no longer cause crashes.

Login to post a reply

Server time is: 2019-05-25 17:55:11
Your offset time is: 2019-05-25 17:55:11