Skip to content

Conversation

@Rikhav21
Copy link

This is the hackapet game that I made, I am not sure of this is how I was supposed to code it, but if there are any problems please let me know. My slack user name is Rmardia

@vercel
Copy link

vercel bot commented Jan 31, 2025

@Rikhav21 is attempting to deploy a commit to the Hack Club Team on Vercel.

A member of the Team first needs to authorize it.

@acornitum
Copy link
Contributor

Hey - no worries! I took a peek at your code - would it be possible for you to add CircuitPython to it? The actual hackapet hardware device only runs CircuitPython - we only use pygame in order to make it display on PC screen.

Go to setup here to learn how to install circuitpython: https://hackapet.hackclub.com/setup

Code guide here! https://hackapet.hackclub.com/guide The main difference in circuitpy and pygame is how you load the images in. You shouldn't need to change that many lines of code - the gameplay loop should mostly still remain the same!

Let me know if you have any questions :D

Note: don't open a new PR, just commit changes to this current thread + send a comment when changes have been made!

@Rikhav21
Copy link
Author

Rikhav21 commented Jan 31, 2025 via email

@Rikhav21
Copy link
Author

I have updated the code, and now it works with Circuit Python

@Rikhav21
Copy link
Author

Thanks for the tutourials.

@acornitum
Copy link
Contributor

Thanks! Small thing - instead of clock.tick(FPS), could you change that time time.sleep(0.1)? That's the circuitpy equivalent of it!

Also, running into an error when I'm trying to run it:

image

@Rikhav21
Copy link
Author

Rikhav21 commented Feb 1, 2025

I have updated it, and now it is compiling, I am so sorry for the amount of times that the code did not work.

@acornitum acornitum added the needs review needs acon to check over it , ,,,, label Feb 1, 2025
@acornitum
Copy link
Contributor

Getting an error when I try running your game again 😭

image

@acornitum acornitum removed the needs review needs acon to check over it , ,,,, label Feb 2, 2025
@Rikhav21
Copy link
Author

Rikhav21 commented Feb 2, 2025

That looks like it is because you did not install the folders with the sprites and backgrounds. Try downloading the entire file again, or check if the directory is the same, because it is working on my end,

@acornitum acornitum added the needs review needs acon to check over it , ,,,, label Feb 3, 2025
@DominicTYLau
Copy link

Hi, it seems like I ran into the same errors. Try changing the file paths to "backgrounds/home.png" instead of "/backgrounds/home.png".

@acornitum acornitum removed the needs review needs acon to check over it , ,,,, label Feb 6, 2025
@Rikhav21
Copy link
Author

Rikhav21 commented Feb 6, 2025

Now it is done.

@acornitum acornitum added the needs review needs acon to check over it , ,,,, label Feb 6, 2025
@acornitum
Copy link
Contributor

Running into another error :"D

image

Could you try to use gh checkout to run the game to see if you've caught all the errors? use gh pr checkout 53 to get to this branch then run your game!

@acornitum acornitum removed the needs review needs acon to check over it , ,,,, label Feb 9, 2025
@Rikhav21
Copy link
Author

Rikhav21 commented Feb 9, 2025

The odd thing is that it is running on my end. It looks like you still have the same problem with the files

@Rikhav21
Copy link
Author

Rikhav21 commented Feb 9, 2025

So it is actually pretty hard to catch all of the errors
Screenshot 2025-02-09 084246

@acornitum acornitum added the needs review needs acon to check over it , ,,,, label Feb 10, 2025
@acornitum
Copy link
Contributor

running into another error 😭 does the game work on your side when you play it?

image

@acornitum acornitum removed the needs review needs acon to check over it , ,,,, label Feb 10, 2025
@Rikhav21
Copy link
Author

Yes it does, which makes the errors weird. I think you might be having problems with downloading the image files, so try doing that again.

@acornitum acornitum added the needs review needs acon to check over it , ,,,, label Feb 10, 2025
@DJ-Laser
Copy link
Contributor

DJ-Laser commented Feb 24, 2025

I think the issue is that your images and the ones uploaded dont match. can you re upload the troublesome images and try again? Also make sure the code matches, I got it to run by changing these lines:

apple = displayio.TileGrid(
...
    tile_width=8,
    tile_height=8,
...
)
cactus = displayio.TileGrid(
...
    tile_width=16,
    tile_height=16,
...
)

@Rikhav21
Copy link
Author

I hope that this was the final update.
I did not realize the difference in files, so I just updated the code

@Rikhav21
Copy link
Author

Should work now. Last time, I promise.

@Rikhav21
Copy link
Author

Hi! I just wanted to ask if I could close the request because right now it is more than a month past the due date, and I have not been able to find the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review needs acon to check over it , ,,,,

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants