Need help for school project! (2)

What's problem you are encountering?

So our deadline for this school project got extended by a week. The problem is that it doesnt run very smooth on the school computers. I was wondering if anyone could help me improve the code a bit, gameplay and perfomance wise. I am open to constructive criticism and suggestions!

Post a project example, link, or screenshot:
https://snap.berkeley.edu/snap/snap.html#present:Username=laulau&ProjectName=starfighter_final_2.1

The problem is that snap doesn’t handle clones nearly as well as scatch
That’s because either a: snap tracks a lot more about clones
B: snap is just generally slower
C: snap has trouble keeping track of all the clones

So reducing the clones would be the best bet

A second thing is reducing the number of when hat blocks
They check the condition every single frame so replacing them with something like forever if that doesn’t do that is more efficient

And thirdly. Instead of having the hat blocks run a single line of code, find the thing that triggers the hat blocks and put the block under them. This stops the number of conditions being looked at each frame
If you don’t want to do this you could replace the when hats with a broadcast those never look at the conditions and instead just run when they get the signal

I think the easiest ways to fix are:

  1. My original solution for the lag
  2. Switch all the when scripts to one "forever { if <...> }" loop

I agree with the other people who commented, it's probably slow because of lots of clones and when blocks. if you could make the ships fire more slowly, that might help.
by the way, I really like your game! it's pretty cool.

Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.