Newer releases of AppGameKit have a DrawText command and even though this project is built on an older version of the AppGameKit library, it seemed prudent to rename the draw_text method to print_value to eliminate any confusion. The name "print" is being avoid since "from appgamekit import *" would redefine the builtin print command.
The set_draw_text_color, set_draw_text_font, set_draw_text_size, and set_draw_text_spacing were also renamed to set_print_color, set_print_font, set_print_size, and set_print_spacing respectively making their names match the corresponding AppGameKit commands more directly.
An Application class has been added that handles the creation and destruction of the AppGameKit window. It is recommended that developers instantiate an Application object using a with block and place game code inside the with block. The create_window and destroy_window methods are still there, but using them is not recommended as they may become private methods in a later release.
The example have been updated to use this class.
import appgamekit as agk try: create_window() while True: agk.print_value("Hello, World!") agk.sync() if agk.get_raw_key_pressed(27): break finally: destroy_window()
import appgamekit as agk with agk.Application(): while True: agk.print_value("Hello, World!") agk.sync() if agk.get_raw_key_pressed(27): break
Get AppGameKit for Python
Leave a comment
Log in with itch.io to leave a comment.