Aug-30-2017, 06:15 AM
Hi all ! 9If you know a game example or whhatever else, using many files, I should be very glad. Thanks
my code here
Where can I find a little project example using main.py and other files
|
Aug-30-2017, 06:15 AM
Hi all ! 9If you know a game example or whhatever else, using many files, I should be very glad. Thanks
my code here
Aug-30-2017, 06:25 AM
There are alot of projects on github, so I' pretty sure you will find plenty there :)
Aug-30-2017, 12:33 PM
Here are a couple games i did a few years ago
https://github.com/metulburr/FloodIt https://github.com/metulburr/pong i used game.py instead of main.py You can also find a lot of completed games on pyweek.org and pygame.org
Recommended Tutorials:
Aug-30-2017, 01:17 PM
To MetulBurr: My screen 1280x720, so I think I cannot use your first game. Thanks
the floodit one is (500, 400)
and the pong one is defaulted to (800,600) with option to change So if you wanted it to be (500,500) you would do python game.py --size 500 500
Recommended Tutorials:
Aug-31-2017, 12:35 PM
Please, where can I find pygame?................................................................................................................................... File "/home/sylvain/PycharmProjects/ping/game.py", line 3, in <module>
import pygame as pg ImportError: No module named 'pygame'
Aug-31-2017, 12:42 PM
(This post was last modified: Aug-31-2017, 12:42 PM by sparkz_alot.)
You need to install it first. Presuming you are using Linux and Python 3.x use
sudo pip3 install pygame . I don't know if you actually need the "sudo" but it won't hurt.Note: Use this from the command terminal, not from the Python interactive shell.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch" Python 3.6.5, IDE: PyCharm 2018 Community Edition
If you are already have pygame installed....You need to make sure that PyCharm is invoking the proper python installation that has pygame installed. Or just run game.py from the downloaded directory from the terminal with
python (2.x) or python3 (3.x) I wrote the code so that either python version will run
Recommended Tutorials:
|
|