FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

3D Worm in JavaScript!!!

 


kevinalle
Hi everyone.
Look what me and my friend thomas programmed:
http://tekage.com.ar/uploaded/3Dworm/

Its the classic Snake game, but in 3D!!!
The "how to play" is in spanish, so I'll tradice it here:

First of all: you need Firefox (opera works). If you dont want to download firefox, there is a IE version here: http://tekage.com.ar/uploaded/3Dworm/ie.html

you move the worm on the plane with Up, Down, Right, Left, and you go "higher" or "lower" with Q and A.
Dont worry... you cant loose. Just try and catch as most apples as you can.

Yes, I know... you have to play around a while to get it going.. you can get lost. Tip: Use the shadows to orient yourselves.


http://tekage.com.ar/uploaded/3Dworm/

How much did you score??
dayveday
Wow, that could really easily get addictive! Two thumbs up...
kevinalle
OKEY...!
It seems that someone liked the game!
(or just needed some more frihP =P).
Thanks for your comments, we always appreciate them...
but... nobody told us... How much did U score??

Good luck!
K
varun_dodla
I tried to look into it and play .....but the server returns a connection refused error.....I have tried this with both the firefox link as well as the IE link.
Is your server down by any chance?
Azmo
Quote:
404 Error
The page cannot be found


Server problem? Tell us when it's working again, I wanna try it
kevinalle
jaj...
Its working fine...(I tryed the link above)
Its hosted on Frihost... so server problems are not my fault...
try again now please... Frihost servers are good but sometimes go down for just a liiiiiiiiiiiiiiiiitle while..
Thanks for your intrest
Aredon
Try the "Autopilot" mode I wrote for you.

Here's the bookmarklet:
Code:
javascript:setInterval(function(){
if((dirx!=0)&&(cabeza.x!=manzanax))return;
if((diry!=0)&&(cabeza.y!=manzanay))return;
if((dirz!=0)&&(cabeza.z!=manzanaz))return;
var e=new Object();
if(cabeza.x!=manzanax)e.keyCode=[37,39][Math.random()>0.5?0:1];
else if(cabeza.y!=manzanay)e.keyCode=[38,40][Math.random()>0.5?0:1];
else if(cabeza.z!=manzanaz)e.keyCode=[81,65][Math.random()>0.5?0:1];
e.which=e.keyCode;getkeypress(e)},100);void 0

(delete all link-breaks before using)

If you get lazy you can copy my search text from: my google search

If you don't know what a bookmarklet is:
1)Copy the coding (delete all the new-lines from the coding then recopy it into your clip board)
2)Open the game
3)Paste the one-line coding into your address bar in the same window as the game
4)Press the ENTER key.


It got as high as 91 within a few minutes while I was posting this message and watching it solve itself Very Happy
kevinalle
Wow!
It's incredible.
really, its excellent!
I didn't know these bookmarklet existed, but its really cool. I think I have already understood how to make them. I will read more about it all the same.

Hey, if I have your permission, I am posting your message in my website, http://tekage.com.ar.

Thanks a lot for this, aredon!
kevinalle
hi aredon.
If you check again the game, youll see I added a button whith yor script to the page.
Thanks again,
Kev
Aredon
kevinalle wrote:
Hey, if I have your permission, I am posting your message in my website, http://tekage.com.ar.

Permission granted. Although you might want to edit the coding for it a bit so a user can click the button a second time to exit from "autopilot".
Basically a clearInterval.

the bookmarklet

It may seem that it doesn't disable autopilot mode however it actually does however it deliberately leaves the worm moving endlessly in the same direction until the user takes over.

The reason its called a bookmarklet is because you can add them to your list of favorites or bookmarks as if it were a standard link.


The page really seems to lag when the worm gets long due to excessive image manipulation...
The current innerHTML approach used in pieza() and crearmanzana() is recreating the whole list of images and DIVs contained within pantalla. It would be more efficient to use new Image() or the document.createElement method in combination with the DOM appendChild method to add new images to pantalla rather than innerHTML and +=.
kevinalle
Code added.
Thanks again!
Yore right about innerHTML, I hadn relised...
I'll have to change that.
than you!!!!!
K
jabapyth
thas cool! (i got abt 10, then got bored)
the interface is (i think) too confusing. It took some time to figure out how high/low i was in relation to the apple, and then to actually get there.

tell your friend to add blocks (things you can run into)
kevinalle
you say we should make it MORE complicated by adding blocks??
We could make like "levels", or blocks apearing after eating some amount of apples, or after some time.
Nice tip,
Thanks
imagefree
nice game. Good Effort, but nothing happens when the snake touches itself.
Peterssidan
lol. cool game.
kevinalle
no... i know... nothing happens. but that would make it a lot more complicated...

thanks for your comments
jabapyth
heres an idea: you have two screens: one (the one thats there) and another from the snakes perspective. I think that would help with gameplay.
kevinalle
ok!
nice idea... I guess that is not as easy to program as the other screen, but sounds interesting!
If someone has some spare time, have a go
The code is open. Anyone can read it and enhance it.
Thanks!
Zeferman
I really like it, well done Very Happy
coreymanshack
wow, this is really neat, and to think that is javascript.. .man~!
kevinalle
yes... its quite funny to program in javascript.
Obviously it is not the best to make a game of this style... but its fun...

Im glad you liked it.
Thanks,
K
tekage
really nice game, hadn't had the time to chek it out till now.
why not submitting it to "experimentalgameplay"?
kevinalle
as you say..
the game is now in experimentalgameplay..
thanks!
mahirharoon
this is not 3d , the ie version is bad , instead use the main version for ie
SlowWalkere
kevinalle wrote:
Hi everyone.
Look what me and my friend thomas programmed:
http://tekage.com.ar/uploaded/3Dworm/

Its the classic Snake game, but in 3D!!!

Wow, that is awesome. I was a bit lost at first, but once you get the hang of using the shadows the game is pretty easy.

I've been tinkering with building games in Javascript/PHP for the past few days, so this was some good inspiration. Nice to see what a cool interface you can slap on some javascript code =)

- Walkere
Flakky
It's a nice game, simple but nice. It laggs above 100 points and you can't die, which is irritating because it isn't a challenge. The autopilot is nice addition.
kewiin
Wow me like. Its realy nice!
I played it for like a half an hour Very Happy Very Happy
phpc0d3r
It's alright. But I rarely even play "Snake". I just don't get addicted to games like this.
Great programming though Very Happy. Tell your friend Thomas that he did a great job.
kewiin
how long did it take to do this?
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.