Lines 776, files 1
Alright, so I’m at a point where I’ve begun showing it off to a few friends. It’s cool enough to see for my first project. It’s got just enough to be a minimal app. It’s basically moving and shooting still targets now.
What I’ve got is :
- Basic movements down with mouse and KB+KP
- Shooting with hit detection. Plus shrapnel streams off the side in a perpendicular way.
- Can change sprite, I call frame, on the fly with 0-9 keys, if you hit an enemy, they cycle through the frames I’ve got made.
- FPS is shown at the stop, but I took that from someone else, but it’s a fairly basic:
frame_count += 1
if frame_count % 15 == 0:
t1 = time.clock()
frame_rate = 15 / (t1-t0)
t0 = t1
- No walls or boundaries for movement, but there is for bullets, because they need to be limited for memory’s sake.
What I’m looking to do now is add a basic AI, where it moves for a second and aims for another 1/2, then decides to fire if it can see an enemy.
Balls though, my math has never really been that great, but it’s sure as shit challenging using all the sine and cosine and atan2 stuff.
I’m also struggling with using PyGame’s Rects properly.