This project is not completed yet, but sometimes my collision and sound dont work, (I think its not my fault in this case, because when I played with just one enemy, everything worked fine),
and, apart from this, I would like to know what do you think about my project.
Heres’s the project
(They should add a an “Emoji Text Format” )
Hi! I’m not the best person to help you, but I think the design of the ships is pretty neat
But I run into a problem (it happens as soon as the bullet hits the enemy), probably it’s just me missing a library
Also if the keys used to move are A \ W \ S \ D the fire key should not be F its to close to the others it makes for an awkward hand placement on the keyboard.
P.S.: If you found out how to do diagonal movement with the keys, please let me know
at processing.sound.AudioSample.rate(Unknown Source)
at processing.sound.SoundFile.rate(Unknown Source)
at processing.sound.AudioSample.play(Unknown Source)
at processing.sound.SoundFile.play(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
For your problem, I think its because you havent installed the sound (‘sound’) library.
You can delete line 4(where i add the library) 11(where I load the sound) 69(thi should be an if statement) 70(where I play the sound), or download it.
I personally drew the ships and projectile sprites, while for the explosion sprite I took it from here(where I also took the sound effect).
Yeah, F is pretty akward, and for diagonal movement, I have this old topic
(I will add diag movement asaiantl (as soon as im not too lazy) )
I found out the problem
enemxplosion = SoundFile(this,"C:\\Users\\user\\Desktop\\PDE-Projects\\AProj\\Python\\BetterShip\\data\\EnemExplosion.wav") this should be a relative path since it changes from computer to computer, I don’t use de Python Mode at all so I couldn’t made it work. But I do have the “sound” library installed and I tried:
enemxplosion = SoundFile(this,"EnemExplosion.wav") and moved the file to the root folder and yet it gave me the same error it’s likely that there’s more to this than the path to the file.
Also I noticed that the enemies hit box is shifted to the right, if the bullet is from the center of the image to the left it won’t register the hit, but from the center of the image to the right it will register even if you missed the target.
Overall I think it looks nice and it can make a neat time waster game for mobile. I did something similar for a class mini project once in Android Mode, but I lost the code
(This is not a hit)
Thx for noticing my shitboxes, but for the sound, I Putin the absolute path bc it didnt worked from data folder as worked for the animations
You welcome sorry can’t be more helpful, what you are trying to do goes beyond my knowledge.