[Very tiny little micro game] šŸ What do you think about this?

:snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake:
:snake:
:snake: This project is not completed yet, but sometimes my collision and sound dont work, (I think its not :snake: my fault in this case, because when I played with just one enemy, everything worked fine),
:snake:and, apart from this, I would like to know what do you think about my project.
:snake:
:snake: Heresā€™s the project
:snake:
:snake: (They should add a an ā€œEmoji Text Formatā€ :wink: )
:snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake: :snake:

1 Like

Hi! Iā€™m not the best person to help you, but I think the design of the ships is pretty neat :slight_smile:
But I run into a problem (it happens as soon as the bullet hits the enemy), probably itā€™s just me missing a library :sweat_smile:
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 :blush:

Summary

NullPointerException
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)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.python.core.PyReflectedFunction.call(PyReflectedFunction.java:188)
at org.python.core.PyReflectedFunction.call(PyReflectedFunction.java:206)
at org.python.core.PyObject.call(PyObject.java:497)
at org.python.core.PyObject.call(PyObject.java:501)
at org.python.core.PyMethod.call(PyMethod.java:141)
at org.python.pycode._pyx53.shows$4(BetterShip.pyde:78)
at org.python.pycode._pyx53.call_function(BetterShip.pyde)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyBaseCode.call(PyBaseCode.java:125)
at org.python.core.PyFunction.call(PyFunction.java:403)
at org.python.pycode._pyx53.draw$2(BetterShip.pyde:39)
at org.python.pycode._pyx53.call_function(BetterShip.pyde)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyBaseCode.call(PyBaseCode.java:125)
at org.python.core.PyFunction.call(PyFunction.java:403)
at org.python.core.PyFunction.call(PyFunction.java:398)
at jycessing.PAppletJythonDriver.draw(PAppletJythonDriver.java:1370)
at processing.core.PApplet.handleDraw(PApplet.java:2476)
at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1547)
at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:313)

1 Like

Ok, thanks
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 :thinking: 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 :rofl:

shitboxe
(This is not a hit)
Thx for noticing my shitboxes, but for the sound, I Putin :wink: the absolute path bc it didnt worked from data folder as worked for the animations

1 Like

You welcome :slight_smile: sorry canā€™t be more helpful, what you are trying to do goes beyond my knowledge.

1 Like