Report as inappropriate.

ndrwdslv presents ...

2013/4/16

# z_defense

New project to learn different stuff.

Hacked together sprite management classes from a stackxchange post.. see README

2121 views / 10 in the last 7 days

2 votes | 0 in the last 7 days

Tags: game with-source

Your browser does not support the canvas tag.
JetLennit

2013/4/16

If you ever want sprites that are based on games.... this place is amazing http://spriters-resource.com/
ndrwdslv

2013/4/16

Thanks, I'll check it out!
A new version of this scenario was uploaded on Tue Apr 16 21:08:35 UTC 2013 Initial path detection from an image. I made the image it's following the background, but it's not required. Also, note that the code is quite dirty.. and made from scratch, so I'll have to look around and compare/optimize. It should allow for different colors, thinking about start/end points. Need a way to create loops, and need to test curves.
A new version of this scenario was uploaded on Wed Apr 17 21:38:14 UTC 2013 New path.. challenge is to support those curves/angles. Not sure if it's possible. I'ld like to scan each degree in a clockwise manner, then calculate the move..
JetLennit

2013/4/17

I would open a discussion for the "I'ld like to scan each degree in a clockwise manner"
I would highly suggest using a different approach for defining the path. Instead of using an image, why not use a list of 2d coordinates? The enemy would move to the first coordinate, then the second and so on. This also would help with things like loops.
ndrwdslv

2013/4/18

Seems like an image would be easy to build maps.. whereas 2D coords would be exhaustive/strenuous. For loops, I was thinking of doing color coding at intersects.. Any scenario for doing 2d coords with curves and what not? I can see how it'ld work with straight lines, but have an actor follow a curved path with 2d coords?
ndrwdslv

2013/4/18

JetLennit, nevermind the scanning, looking at a 1px line and the way it behaves when curving, I only need to check diag too to support curves.. doing up the code right now
A new version of this scenario was uploaded on Thu Apr 18 07:17:49 UTC 2013 Finally got it working. Now I have to figure out how to do loops/intersects. Was thinking of color-coding intersections. Also need to cope with different move speeds (right now it's only 1px).
A new version of this scenario was uploaded on Thu Apr 18 07:40:48 UTC 2013 Quick update, sprite animation now works based on direction. It bugs on the non-linear movement, so I'll have to investigate and fix it tomorow.