|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
applet game
Hi, I am trying to make an applet game called snake. You know the snake game it easts and gets bigger. I have some problems with snake's movments.
if anyone of done the game and are willing to share your code it would be very greateful. thanks
__________________
Thank you for any help. |
|
#2
|
||||
|
||||
|
maybe you could specify your exact problem with it's movements...you might not need to look at someone elses code.
|
|
#3
|
||||
|
||||
|
you're right
I figured out myself thanks anyways |
|
#4
|
||||
|
||||
|
but I have another problem now
I have made some classes which are used by the main applet which have Image in them Code:
public Image img;
img = Toolkit.getDefaultToolkit ().getImage ("C:/WINDOWS/Desktop/c++/java/project/peace.gif");
when I run the applet in html page it gives an error Quote:
Anyone know why and how it could be fixed? P.S. (ALL FILES EXIST IN THE SAME FOLDER AND THE APPLET RUNS FINE IN "JAVA EDITOR") |
|
#5
|
||||
|
||||
|
img = Toolkit.getDefaultToolkit ().getImage ("C:/WINDOWS/Desktop/c++/java/project/peace.gif");
doesnt it need to be C:\WINDOWS\..... also, it has been a while since i used java, but i know with C++ you need '\\' instead of '\' |
|
#6
|
|||
|
|||
|
The problem is your game is applet. And it has NO access to any files on local mashine. Imagine any applet stealing any file from your computer - nonsence !
The only place applet has access is the host it was downloaded from, so try donloading your image instead of direct file access. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > applet game |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|