Please take the code and play with it, there is plenty of room for additions and fixes… Use it as a base for your own game or simply use it as a “guide” or whatever, it’s free.
-The Project-
The idea was simple:
Build a top down shooter with simple AI, that get more challenging over time.
Build basic weapon mechanics, single shot and automatic machine gun type
Be able to pickup items that affect the player, Health pods, and weapon pickups
Looks great! I was wondering if Panda3D could be used to effectively create 2D games and apparently it can. Thanks for sharing your code, I’m going to browse through it now.
thanks for the feedback, and sorry for the late reply.
I’ll try to explain how things work To make a bit more clear for everyone.
First the hit detection, this works with drawing line from your character to the mouse position. The first enemy in that line will be hit and takes damage.
Second, the item pickup. It does work in the video you showed it’s just maybe not as visible as one might expect.
For example if you pick up the weapon symbol, you’ll get an upgraded weapon (you can hold and keep your mouse button pressed for autofire with that weapon). Though, this can only be done once and all other weapon pickups have no effect which is due to the fact that we didn’t had time to implement ammunition to make them useful afterwards. Also in your video there still seems to be that bug that the second weapon is “invisible” sometimes.
The heal items only have an effect if you got hit by an enemy. You can see your health in the upper left corner of the screen (the little blue head) this will change it’s color as soon as your health change and get’s reset whenever you pickup that specific item.
Hope you further enjoy playing this and our other small projects, there are more to come.