Zylum's Worms - Java Style
Author |
Message |
TheZsterBunny
|
Posted: Wed Jan 19, 2005 10:46 pm Post subject: Zylum's Worms - Java Style |
|
|
So, I'm trying.
It's going well, but I've hit problems with corners. And worms sticking to the Y0 border.
They get trapped.
Its being done in an applet window. For the time being, drag your mouse around to move 'em.
Any Ideas on where I went wrong?
-Z
p.s. They say the most sincere form of flattery is imitation...
--edit--
Ok. Here
-Z
Description: |
|
Download |
Filename: |
WormMain.java |
Filesize: |
1.21 KB |
Downloaded: |
197 Time(s) |
Description: |
|
Download |
Filename: |
WormClass.java |
Filesize: |
2.27 KB |
Downloaded: |
191 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Hikaru79
|
Posted: Wed Jan 19, 2005 11:04 pm Post subject: (No subject) |
|
|
Zster... this is an applet... perhaps embedding this into an HTML file, and linking it would be ideal for those of us too lazy to start compiling? Ask me over MSN if you need hosting. http://thegoban.com is always open to you, my friend
|
|
|
|
|
|
zylum
|
Posted: Wed Jan 19, 2005 11:16 pm Post subject: (No subject) |
|
|
i didnt take a look at your code but it seems that you are initializing the _y to 0 and that your not changing the angle properly... also, it only works when you keep the mouse button down and moving. is that intentional?
good job so far, the colors are working and look nice and you seem to have gotten the movement of the cricles right
|
|
|
|
|
|
TheZsterBunny
|
Posted: Thu Jan 20, 2005 12:37 am Post subject: (No subject) |
|
|
H79, thank you for the offer, but I also have web hosting, I was too lazy to host it ^_^.
Besides I wanted to show the code. Thats the issue here.
I'm looking at the code, and I can't find where i'm setting the Y value to be 0.
I modified the code slightly:
-Added more color possibilities
-Converted from degrees to radians
-Added the ability to limit (rectangularly) the worm boundaries.
-Z
p.s. Yes, the mouseDrag repaint was intentional, Applets are a new thing to me, and I've yet to find a way to draw nicely without lagging out my comp. (feel free to help at any time hikaru)
-Z[/i]
|
|
|
|
|
|
Hikaru79
|
Posted: Thu Jan 20, 2005 11:52 am Post subject: (No subject) |
|
|
Here it is, for folks too lazy to compile it themselves: http://thegoban.com/worms/worm.html . ZBunny, you should edit your first post with this URL.
|
|
|
|
|
|
|
|