I need help debugging this game on working on

I'm working on this new game. You're controlling a spaceship and you're supposed to collect gems from the sky (the gems are picked randomly from 4 variations), but there are weird parts where the gems will be multicolored and choose two at the same time when it should only choose one. Also the game lags when the player collects a gem so if I get help on any of these problems that would be a BIG help!! :slight_smile: (BTW those who help debugging my game will be featured in the end credits! :smiley: )

The project link: Sky Ship by oscar robinson - Snap! Build Your Own Blocks (berkeley.edu)

Isn't this should be in #help:snap-help or #requests-to-the-community
(second option probably ) ? I would help but I haven't time to collaboration, sorry :frowning:

@oscar_robinson
I understand your lag.

EDIT: I fixed the script! The previous script wasn't the problem, but anyways, I fixed your bugs.


This is in the Gem spawner sprite.
Project link: Snap! Build Your Own Blocks

OMG thank you so much!!! I was trying forever to see what the problem was! :slight_smile:

Buuuuuuut the gems are now all multi colored and I would like them to be a solid color

Oh OK. I will help you with that as well!

thank youuuuuu!

I believe I have fixed it.

All you have to do is to scan if the Gem variable is 1, 2, 3, or 4. If it is one of those numbers corresponding to one of those gems, then it will set the variable to the number corresponding to the gem until the player collects them.

It still may be broken. That is the best I'll do (For now). I'll try to study the code a lot more and delete some scripts.

EDIT: @oscar_robinson can you give me your opinion on this?

It works much better! Thank youuuu! :smiley:

You're welcome! Happy to help!

Hey @oscar_robinson, I wonder what happened to Sky Ship? Did you cancel it or something?

I guess. I mean, I really don't know what else I should try and do in Snap! so I'm just bored right now... :frowning:

Know seems to care about platformers anymore, top-down rpgs are a no-go, arcade shooters I've already done, 3D FPS I've tried millions of times, so I seriously don't know what else I can do.

Maybe I could try making a 3D platformer? Like Griffpatch: 3d Maze v0.12 on Scratch (mit.edu)

That would be cool.

By the way, not to be rude, but...

Well, I'm not necessarily canceling the project, but it is a work in progress. When it is finished though, I will credit you guys! :slight_smile:

Why..?

@joecooldoo this is kind of off-topic but I don't remember the forum of which we were talking about cloud variables, repl.it, and other things like that.

But you said that "Well guess what. Cloud costs money" or "repl.it is chep and all" or something like that.

I think I found a cheaper alternative to your problem - Photon Pun.

Photon Pun is a server that most Unity devs use to make an Online Multipayler Gmae using Unity.

It's cheap for 20 people max on a server.

...but not if you have more than 20 people.
Also replit is 100% free (unless you want hacker, which it works fine without), and the option for just 100 CCU can be 19x the cost of a VPS.
Also the website states that Photon Pun is legacy, and that the new version is Photon Realtime.