GithubHelp home page GithubHelp logo

diddileija / diddi-and-the-bugs Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 3.0 208 KB

Diddi and the Bugs, my GameOff 2021 game.

Home Page: https://diddileija.itch.io/diddi-and-the-bugs

License: MIT License

Python 100.00%
game gameoff-2021 python pyxel

diddi-and-the-bugs's Introduction

Diddi and the Bugs

Nox License GitHub GitHub Repo stars GitHub forks

ko-fi

My Game Off 2021 entry.

Introduction

The Earth is under invasion. A fleet of giant bugs, bacteria, and viruses are outside of the planet.

In the meantime, Diddi was developing a secret spacecraft. When his friends told him of the invasion, Diddi decided to visit the brilliant Dr. Chuck (a scientist, and also an old friend of Diddi). The doctor gave him the L1-F3 experimental serum, that kills anything alive. That should destroy those bugs...

To ensure that those bugs will be destroyed, Diddi modified his spacecraft to convert it into a starfighter that energizes the serum and shoot it. Then, he named the starfighter Willpower. Suddendly, the Willpower goes outside of the planet, to start the fight...

Installation

Since the GameOff 2021 event is hosted by itch.io, the distributions are available there. The source code lives in this GitHub repository, but the stable distributions are available at itch.io.

The itch.io page for my game is here: https://diddileija.itch.io/diddi-and-the-bugs.

Once you are there, read the installation instructions and find the right distribution for you. If you don't find what you expected, feel free to open an issue on GitHub (or comment in the itch.io page).

Python version

If you will use Python get sure to have Python >= 3.8.

Building the zipped distributions by yourself

New since 2.0.0.

If you have a local clone of this repo, you can build the zipped distributions (those that we distribute on itch.io), If you have Nox and the Python required version (see above), run nox -s package. It will run a lot of commands to generate the source zip, the Pyxel executable and the Windows executable (if running under Windows). The final contents will be found on a dist folder 1.

Web support

Try out the latest dist: the Pyxel web version! You'll find this in the html_dist format of the game on itch.io, along with the source, the Pyxel-packaged and Windows-only versions.

You can also see the legacy, nightly web version (hosted online) here.

How to win

Use the energized serum to destroy 200 bugs and win! In the meantime, you can earn extra points by destroying space trash. Try to get all the points as you can!

Read the game guide for more information (and maybe a few hints!).

Game engine

This game is made using Pyxel, a Python tool for retro games. The executables are uploaded to the itch.io page manually each time a tag (release) is published here.

Contributing

Read this contributing guidelines for full details.

More resources

Discord server

There's a Discord server (officially named DiddiLeija's Server) where you can ask and share stuff related to Diddi and The Bugs! Wanna join? https://discord.gg/DfrHxT9ENy

Wiki

We have a wiki to keep some tips, records, and that stuff. It can be found at the GitHub repo's wiki.

Footnotes

  1. Contributor's advice: This folder is ignored by Git, so it won't be shown on GitHub.

diddi-and-the-bugs's People

Contributors

dependabot[bot] avatar diddileija avatar harshnarayanjha avatar marxml avatar pnomnom-web avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

diddi-and-the-bugs's Issues

We have a Discord server!

I recently opened a Discord server, to create a small "community" around Diddi And The Bugs. I expect this server to feed many future projects, so you can talk about this game at the #diddi-and-the-bugs channel. You can share tips, scores, and some related stuff.

If you want to join, click here: https://discord.gg/DfrHxT9ENy 1

Footnotes

  1. The old link (https://discord.gg/5XDWbyd5) is now broken, so we made a new one :)

Share your highest scores! (v. 3.x)

Yup, I know, I'm a bit late for this... But if you have a nice score, I'll be updating the related wiki, so please share your scores either here or at my Discord server!

Will be waiting for your scores!

Version 2.0.0 release tracker

This is the Diddi and the Bugs 2.0.0 release tracker. We've made a few cool, new features (see them below).

See resume of the changes

Contributor stuff

  • Provide a better environment for contributors (#32, #34, #39 and some related commits)
  • Automated the release process via nox -s create-packages (#39 and related commits)

New behavior, or gaming-related stuff

  • New feature: the messages bar, which is used as a "log" to show messages and special events (#37, #38).
  • New creature: the Monster, a special creature that appears once in the game and leaves 1000 points when destroyed (#41, and some related commits)
  • The "spacecraft trash" (or the "missile trash") has changed its aspect (f9b9fed, ec51d57)
  • Hidden a few "easter eggs" (Wanna find them? Take a look at the discussion from #13)

Dependencies

  • Moved our linting/formatting dependencies out of the Noxfile, and moved to a requirements.txt to receive updates (#34)
  • Updated several dependecies:
    • Pyxel: 1.6.7 -> 1.6.9 (#33, #36)
    • Black: 21.12b1 -> 22.1.0 (#35)
    • setup-python action: 2 -> 3 (#40)
    • checkout action: 2 -> 3 (#42)

Since we have changed part of the game's main functionality, this new release will make 1.x versions obsolete (and no longer supported), and we'll collect new scores and records from 2.x versions (something like #14, but using 2.x).

Currently, this project has the following contributors:

However, we hope the 2.0.0 release will atract new folks! ❤️

A breaking change has come in Pyxel 1.5

The 1.5 (and also 1.5.1) release of Pyxel (our game engine) have been released a fe days ago. However, this new version included a breaking change on pyxel.init, that made our game useless.

Pyxel 1.5 changed this:

pyxel.init(100, 100, caption="Title of the game")

to this:

pyxel.init(100, 100, title="Title of the game")

So we should fix that.

Easter eggs?

I'm looking for ideas and proposals of hidden features to implement here. Something that is not mentioned in the guide, but the users can find and use!

All ideas are welcome.

cc @HarshNarayanJha

Version 3.1.1 release tracker

Probably, this is the final release on the 3.x series (as we want to push new breaking changes soon)!

See resume of the changes

Community stuff

  • Fixed a misunderstanding in the Readme, about the Discord server (a9de7a2)
    • It turned out that web browsers and IAs understand the server's only made for this title, which is not the case 😛

Dependencies

  • Updated dependencies
    • Pyxel: 1.9.7 -> 1.9.13 (#106, #107, #108, #110, #113)
    • actions/setup-python: 4.4.0 -> 4.5.0 (#109)
    • Isort: 5.11.4 -> 5.12.0 (#111)
    • Black: 22.12.0 -> 23.1.0 (#112)

What's next for release 4.0.0

  • #117 is pending, which updates Black.
  • #118 is pending, which updates Pyxel.
  • @HarshNarayanJha is working on #115 (via #116), which will implement a breaking change -- a Special Attack!
  • Stay alert for further ideas, issues, etc. in the issue tracker! 😉

Adding in-browser support

As I commented on Discord, now that Diddi and The Bugs 3.0.0 is out, it's a great moment to prepare web support for in-browser playing! This issue will track that process.

cc @HarshNarayanJha

Support for `WASD` keys

By now, we can only move the spacecraft using the arrow keys. However, the WASD keys are very common in games, too. Actually, some games only provide support for those keys. We should give support for WASD keys (in our case, W -> Arrow Up, S -> Down)

Version 3.0.1 release tracker

This release gives official web support, that I've been waiting for since Pyxel enabled that feat 😁 1

See resume of the changes

New behavior, or gaming-related stuff

  • Enabled web support! (#93)

Dependencies

  • Updated dependencies
    • Pyxel: 1.8.22 -> 1.9.6 (#85, #86, #88, #89, #92)
    • Flake8: 5.0.4 -> 6.0.0 (#90)
    • actions/setup-python: 4.3.0 -> 4.3.1 (#94)

Misc fixes

  • Fixes from the package generator (348027b, 2ab6ee4)
  • Remove Python 3.7 and add 3.11 (#91)

You should see everything updated soon.

Footnotes

  1. I already mentioned web support on itch.io (my mistake), but now it's "officially" supported.

Issues with restarting the game

This is a bug I found while confirming #18. When you loose, pause or win, it's impossible to use the R key to restart. I don't remember this happened with old Pyxel releases, so maybe it's an upstream thing?

Support Python 3.12 in Github Actions

Is your feature request related to a problem? Please describe.

Python 3.12 has been a stable version for a while, but we haven't considered this version in our codebase (to be more precise, the GHA setup).

Describe the solution you'd like

Include Python version 3.12 right here:

python-version: [3.8, 3.9, "3.10", "3.11"]

I would prefer this to be a PR before merging into the mainstream, so we can fix any 3.12 syntax issues on the way.

Describe alternatives you've considered

I don't think we should consider having this project as a Python<3.12 game.

Additional context

Since the fix to this issue is quite simple, I've marked this issue as a good first issue, in case a newcomer wants to give this issue a shot!

Also, I've added the issue to the 4.0.0 milestone.

Version 3.0.0 release tracker

The 3.0.0 release is here! New major changes are here, the deps have been highly updated, and more further plans will come.

See resume of the changes

Community stuff

New behavior, or gaming-related stuff

  • The title menu! A new "welcome interface" for starting the game! (#60, #64)
  • Background stars! The background is now more colorful with a lot of stars (#73)

Dependencies

Coming soon...

  • Since Pyxel now supports web support, we're planning to add an in-browser option to play!

I'll follow the same process I've used in previous releases, just give me some time :)

Feat: Migrate to ruff?

Is your feature request related to a problem? Please describe.

Currently, our codebase is linted by a bunch of known tools: black, isort, and flake8. And they're fine, but sometimes a little slow.

Describe the solution you'd like

Ruff is a somewhat new linting/formatting tool. I haven't tried it yet on a GitHub codebase, but I've seen how other (way bigger) projects are using it, like Nox, and how their CI runtimes are way faster since then.

It turns out that Ruff covers what our current tools do (and even more), and does it much faster and clearly. I would like to adopt Ruff and eventually drop our current tools (which will be covered by Ruff itself).

Procedure

First, we have to add ruff 1 to the test-requirements.txt requirements file.

Then, in our noxfile:

@nox.session
def format(session):
"Run formatters."
session.install("-r", "test-requirements.txt")
session.run("isort", *files)
session.run("black", *files)
@nox.session
def lint(session):
"Check the style and quality."
session.install("-r", "test-requirements.txt")
session.run("flake8", *files, "--max-line-length=127")
session.run("isort", "--check-only", *files)
session.run("black", "--check", *files)

We'll replace all the session.run(...) lines with these few instructions:

  • format session: session.run("ruff", "check", "--fix", *files)
  • lint session: session.run("ruff", "check", *files)

And that should be enough. There's a chance that some Ruff checks will fail, if so you could run ruff check --fix . locally and then upload the fixed files ;)

Describe alternatives you've considered

Keep as-is, which is also a decent choice.

Additional context

I've marked this as a good first issue since I would like a newcomer to take this issue :)
Above I've left a few instructions in case somebody wants to push this forward (see the Procedure section)!

Footnotes

  1. At the requirements file, I would prefer to pin the latest version of Ruff (which will be safely verified and updated by @dependabot everyday), instead of mindlessly installing the latest one on each run. For example, the latest Ruff version (as of October 3th, 2023) is 0.0.292, so we should add ruff==0.0.292 to the requirements file, instead of a plain ruff 😉

Feat: Special, single-use move to wipe out the visible enemies

I think I want to resurrect this idea:

Or, player could use a special key combo. which can only be used once in a single play (like Z-moves, if you know pokemon...), and it will cause all the enemies/trashes on the screen to be killed, yielding very large number of points at once. This could be used when the player sees a large number of trashes on-screen...

Sounds like something possible!

Originally posted by @DiddiLeija in #13 (comment)

Version 1.2.0 release tracker

This will be the last 1.x version (if we want to work on #29).


There are a lot of new stuff coming in this release:

  • Bumped from Pyxel 1.5.6 to Pyxel 1.6.7 (#17, #23, #25, #30)
  • Fixed bugs for compatibility with new Pyxel versions (#22, #24)
  • Added support for WASD keys for doing the same than the arrow keys (#28)
  • We've hidden an easter egg! (See #18, #19, #26 and commit 2889ec0). Try to find it!
  • We've set a minimal Python version. For this release, it will be Python 3.7+ (commits f3449f8 and bf1d7a0).

A new contributor arrived with this release:

Feat: Gamepad enablement

Is your feature request related to a problem? Please describe.

This proposal is another alternative to the problem described in #124: the need of a higher accessibility, especially for mobile devices using our HTML dist.

Describe the solution you'd like

Enabling gamepad controls, at least for the HTML distribution, using a few tools provided by Pyxel.

Describe alternatives you've considered

My main solution to the accessibility issue is #124. But it would be great (and I'd say better) if we can implement both alternatives.

Additional context

cc @HarshNarayanJha, who's already made some interesting advances in #124.

FileNotFoundError while running `nox -s package`

Describe us the bug.

While verifying everything was ok, I ran nox -s package (our command for creating the several dists we publish) and got the following crash:

C:\Users\Diego Ramirez\diddi-and-the-bugs>nox -s package
nox > Running session package
nox > Creating virtual environment (virtualenv) using python.exe in .nox\package
nox > python -m pip install -r requirements.txt
nox > Looking for the destination path...
The destination directory ('./dist') already exists. Do you want to remove it? (y/n) y
nox > python -c 'import os, shutil; shutil.rmtree('"'"'./dist'"'"'); os.mkdir('"'"'./dist'"'"')'
nox > Generating the source code distribution...
nox > python -c 'import os, shutil; shutil.copy('"'"'main.py'"'"', '"'"'./dist/main.py'"'"'); shutil.copy('"'"'resource.pyxres'"'"', '"'"'./dist/resource.pyxres'"'"')'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Diego Ramirez\AppData\Local\Programs\Python\Python39\lib\shutil.py", line 418, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "C:\Users\Diego Ramirez\AppData\Local\Programs\Python\Python39\lib\shutil.py", line 264, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: 'resource.pyxres'
nox > Command python -c 'import os, shutil; shutil.copy('"'"'main.py'"'"', '"'"'./dist/main.py'"'"'); shutil.copy('"'"'resource.pyxres'"'"', '"'"'./dist/resource.pyxres'"'"')' failed with exit code 1
nox > Session package failed.

The main reason of the failure seems to be FileNotFoundError: [Errno 2] No such file or directory: 'resource.pyxres'.

After investigating, I found this is happening after #137 (and related tickets #138 and #141), when we changed how we name the resource files. We didn't update these naming rules in our noxfile, and now it's impossible to run the session.

How to reproduce

On a local clone (any branch after f4a74d5), run nox -s package.

Distribution

N/A

Environment

  • Python version (if applies): 3.9
  • Pyxel version: 1.9.18
  • OS: Windows
  • Diddi and the Bugs version: main

Add a "notifications bar" for messages

We can also make the game more interactive by giving a notification to the player from Diddi (who modified the spaceship, as in your story), that the player has unlocked a secret function of the ship....

Originally posted by @HarshNarayanJha in #13 (comment)


If we want to do this, it will be after cutting a release to save our latest modifications.

Post-jam goals

Hi visitors!

This project was made for the GameOff 2021 event. However, the end of that jam (in 2 days) won't mean the death of this project! 😃 Those who rated this game and commented here and here gave useful feedback. Thanks in advance to those who took the risk to try this game! ❤️

I found some important issues/improvements (starting with the creepy music! 😕) basing on those comments. Also, since I'm the owner and played lots of times, I noticed more improvements by myself.

To keep everything in the same place, I made a project board to track the goals we want to cover after the jam ends: https://github.com/DiddiLeija/diddi-and-the-bugs/projects/1

Feel free to comment here if you want more improvements soon 😉

Major feat: Hand tracking

Is your feature request related to a problem? Please describe.

Currently, the HTML version of the game can be opened almost everywhere. However, mobile devices cannot run the game without a keyboard connected. Quoting from the Q&A entry in our wiki, talking about the HTML dist:

Note: For use in Android devices, by now, you must have a keyboard connected (since gameplay requires pressing keys).

Describe the solution you'd like

@HarshNarayanJha and I were discussing a possible fix to this problem: Hand tracking (using some sort of machine learning?).

Since our game is mainly Python, we could combine Pyxel with another tool (we've proposed MediaPipe) to recognize a user's hand in the camera, interpretate commands and replace keys. The idea is based in https://nuitducode.github.io/air-pyxel-demo/ (from a French project I discovered).

There's still a lot of things to discuss and clarify, that's why I opened this GitHub ticket ;)

Describe alternatives you've considered

Keep as is, which would keep the issue.

Adding gamepad keys? See #128.

Additional context

N/A

Add a title menu

Is your feature request related to a problem? Please describe.

At our Discord server 1, we were discussing about having an introduction menu, instead of starting the game directly. It would be nice because starting inmediately is... a bit weird 🙃

Describe the solution you'd like

A title menu for the 3.x series. Since we want to merge this in a 3.x version, this will fit with #52, btw.

Describe alternatives you've considered

Keeping as-is.

Additional context

N/A

Footnotes

  1. See #45.

Fire Bug

There is an graphical issue in bullet firing, where if you keep the space button held for more than two consecutive frames, then a long continuous row of bullets will appear onscreen, which doesn't causes any damage to enemies...

To fix this, I will soon open a PR
fire_bug

Version 3.1.0 release tracker

Release 3.0.1 made web support possible just a few weeks ago. Now, this release provides a downloadable HTML to play in your browser, offline!

See resume of the changes

Community stuff

Dependencies

  • Updated dependencies
    • Black: 22.10.0 -> (#96)
    • isort: 5.10.1 -> (#98, #99, #103)
    • Pyxel: 1.9.6 -> 1.9.7 (#100 1)
    • actions/setup-python: 4.3.1 -> 4.4.0 (#102)

Footnotes

  1. Did anybody notice this is our 100th PR? 🤯

Version 2.0.1 release tracker

This minor release might be the last 2.x release 1. It only made a few dependency updates, and added some community stuff.

See resume of the changes

Community stuff

  • Added a Ko-fi button for possible monetary support (ff21467)
  • Made aesthetical changes to the CI (db6039a)
  • Document the dists generator, and clarify a few details (3169bba, fd408d6, 2c0e8cd)
  • Updated the contributors guide (8347162)
  • Added a dedicated Discord server! (#45, 2e08db2)

Dependencies

  • Updated dependencies:
    • Pyxel: 1.6.9 -> 1.7.1 (#46, #47)
    • Black: 22.1.0 -> 22.3.0

As you can see, this release didn't change the core behavior. The scores from this release will also be collected at #44, just like version 2.0.0.

Footnotes

  1. This is mostly because I have plans to refactor part of the game, and I'll do it on a 3.0 release. Still unconfirmed, but yet possible!

Overlapping Enemies

The issue is that whenever new enemies or trash is activated, chances are there that they may be overlapping, or partially overlapping. And due to varying speeds, they may overlap somewhere in-between.
overlapping_bug

Simplify the Nox session names

Is your feature request related to a problem? Please describe.

Both the GitHub CI and users depend on Nox for convenience stuff. We use it regularly for linting, formatting, and building dists. Though the session names aren't that long, it would be great to reduce them a bit more.

Describe the solution you'd like

A while back, I proposed the following name change in Discord:

  • check-quality -> lint
  • keep-codebase-clean -> format
  • create-packages -> package

Doing this should be quite simple, it's just about changing the function names in noxfile.py. For example, here's the keep-codebase-clean name:

@nox.session(name="keep-codebase-clean")
def keep_codebase_clean(session):

Describe alternatives you've considered

Keep as is. Again, it's not a big deal, but an improvement would be nice too ;)

Additional context

I've tagged this issue as a good first issue. I would like a contribution from a new folk, and I think this issue is a great start (even for a one-shot contribution). Of course, if no one takes this, I'll do it.

Share your highest score! (version 2.x)

This is the 2.0.0-specific version of #14. Please share your highest scores with the latest version of Diddi and the Bugs (no matter if it's the highest ever, just share your greatest job). You can share a commentary about the strategy you used or something like that.

Each score will be stored at our wiki, right here.

cc @HarshNarayanJha

Major feat: Add-on support

Is your feature request related to a problem? Please describe.

Though resource modifications have always been "implicitly" supported 1, it's never been a documented/encouraged feature. But it turns out that such modifications could customize each user's experience in a unique way.

Describe the solution you'd like

Add-on support. I mean, a way to support a secondary resource file that "superseeds" the main one. Of course, this will need a major refactor in our API to accept this "external source", but it's still possible.

A few other related ideas (that may come once we get the above things done):

  • Support modifying the background color (which, by now, will always be black)
  • Add the star appearance to the resource file, so these can also be customized.
  • Distribute a sort of "official DLC bundle" for free to get y'all started! 😃

Describe alternatives you've considered

Just document the possibility of changing the main resource.pyxres file 1?

Additional context

Feel free to provide feedback or your thoughts on this feature!

And thanks to @HarshNarayanJha for providing the initial idea (via our Discord server), that is highly appreciated!

Footnotes

  1. You always had the possibility to modify resource.pyxres, which contains the main image sources, the original music, etc. 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.