j-tesla / space-shooter Goto Github PK
View Code? Open in Web Editor NEWShmup with pygame
License: MIT License
Shmup with pygame
License: MIT License
Add CONTRIBUTING.md with basic contributing guidelines so that beginners can get a direction.
There should be only one space after a keyword.
There is 1 occurrence of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/j-tesla/space-shooter/issue/FLK-E271/occurrences/
retro style is preferable
To check if a variable is equal to one of many values, combine the values into a tuple and check if the variable is contained in
it instead of checking for equality against each of the values. This is faster, less verbose, and more readable. <!--more--> ## Examples ### Bad …
There are 3 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/j-tesla/space-shooter/issue/PYL-R1714/occurrences/
I have encountered a bug at the launch of the program where I get the following error and the program stops.
Traceback (most recent call last):
File "main.py", line 571, in <module>
main_menu()
File "main.py", line 59, in main_menu
if click:
UnboundLocalError: local variable 'click' referenced before assignment
This can be reproduced by putting the mouse pointer in the region of play
or instructions
button and then running the program.
Since collidepoint() will return True, the conditional statement inside gets executed.
This bug can be fixed by either moving click = False higher up or by rewriting the program and putting the event loop further down or putting the collidepoint() check inside the event of MOUSEBUTTONDOWN
The first way is easiest, however I feel the third method is "correct" way of doing it because:
play
or instructions
button at that point in the program, andclick
For starters, can store 'the highscore' in a txt file (or a json file). Can be updated if required after each game.
Hello, though i am new, still i have made little changes,like ability to shoot with the left mouse click and also while using mouse as refrence for x coordinate of player it proved much fun for me
Tried to fix this issue but couldn't.
If you would like to merge the changes that i mentioned above, then i could make a pull request.........
Originally posted by @AshAman999 in #15 (comment)
Give it a small time interval after spawning before it can be hit by a asteroid.
Make it blink in that time interval
Asteroids shouldn't disappear when they hit the ship just after it spawns. They need to pass through the ship. Previous updated (#18) managed to prevent the explosion and health reduction. (#15)
hits = pygame.sprite.spritecollide(player, mobs, True,
pygame.sprite.collide_circle)
The True
in there is causing this. Figure out a way to make it False
without changing causing any effects.
DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using int is deprecated, and may be removed in a future version of Python.
menu_button = pygame.draw.rect(
In a wildcard import, all public names defined in the module are imported. It is advised to explicitly import the values needed or modify the module being imported from and define all to restrict the names to be imported.
There are 2 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/j-tesla/space-shooter/issue/PYL-W0614/occurrences/
Currently the only action that can be done at the GAMEOVER screen is to close the window.
I would like to implement a "Back to Menu" and maybe even an "Play Again" button.
It would be highly appreciated if this issue can be assigned to me as I have already started working on it.
As per the new Hackoberfest rules update, the repos need to have "Hacktoberfest" in the topic in order for the PRs to count towards Hacktoberfest.
source: https://hacktoberfest.digitalocean.com/hacktoberfest-update
I'm assuming you don't have any problem with it as you have labelled some of the issues in this repo as "Hacktoberfest".
The link I've sent also has instructions on how to do the same.
Instead using game art from open game art, use original content.
Nested if
statements can be collapsed into a single if
statement by separating their condition using and
operator. Merging collapsible if
statements increases the code's readability. ### Not preferred: python if condition1: if condition2: dosomething()
### Preferred: python if condition1 and condition2: dosomething()
There are 5 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/j-tesla/space-shooter/issue/PTC-W0048/occurrences/
Instead of directly starting the game on start, add a menu.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.