Pages

Se afișează postările cu eticheta 2022 news. Afișați toate postările
Se afișează postările cu eticheta 2022 news. Afișați toate postările

joi, 22 decembrie 2022

News : pygame-menu version 4.3.2.

This python package let you to use a menu for pygame.
You can find it on this webpage and documentation on this webpage.
This is simple to use it:
You can install easy like any python package using the pip3 python tool:
pip3 install pygame-menu==4.3.2 --user
I created a python file named pygame-menu_001.py and I add this simple example to test it:
import pygame
import pygame_menu
from pygame_menu import Theme
pygame.init()
surface = pygame.display.set_mode((640, 480))

def set_difficulty(value, difficulty):
    # Do the job here !
    pass

def start_the_game():
    # Do the job here !
    pass

mytheme = pygame_menu.themes.THEME_BLUE.copy()
mytheme.title_background_color=(0, 19, 76)
mytheme = Theme(widget_font=pygame_menu.font.FONT_FRANCHISE)

menu = pygame_menu.Menu('Main menu', 400, 300,
                       theme=mytheme)

menu.add.text_input('User :', default='catafest')
menu.add.selector('Difficulty :', [('Hard', 1), ('Easy', 2)], onchange=set_difficulty)
menu.add.button('Play', start_the_game)
menu.add.button('Quit', pygame_menu.events.EXIT)

menu.mainloop(surface)
This is the result of the running script:

duminică, 9 ianuarie 2022

PyGame : Pygame New Years Jams 2022.

I haven't written about this python package in a long time because I was busy with other solutions of everyday life, but here it should continue with new elements this year ...
If you want to create a simple game, make some graphics or learn very quickly the basics of programming, then I recommend python with pygame.
First of all, the syntax of the programming language is simple and allows you to focus on the programming side, and the implementation of the graphics is just as simple.
It seems that there are users and tendencies to bring to our attention the possibilities of this python package.
Since December 26, the well-known website itch.io come with Pygame New Years Jam.
All submissions was open from December 26th 2021 at 11:00 AM to January 2nd 2022 at 11:00 AM
I did not know this fact but you can find examples to download and test.
For this jam the submission is closed and voting is now in progress.
NOW same website comes with another Winter 2022.
You can find the rules on this webpage.
You may use any game engine to make your game and build for any platform you like, including mobile. For mobile, only APKs can be distributed on itch.io.
You can see more at this web page.