Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Help with Snake Game

Author
Message
Dark WEDNESDAY
21
Years of Service
User Offline
Joined: 23rd May 2004
Location: Hertfordshire, UK
Posted: 16th Aug 2004 04:49
Hi,
I recently downloaded darkforge's snake game from the codebase to use as inspiration for my game, but i can't work out how to add extra sprites to the snake to act as different parts of it's body (head and tail) and still keep it working. I can enhance the game to my liking but i can't change this. I know this may be asking a lot for help but i am a beginner who's having a shot at the comp.
thanks in advance.

I'm with stupid...oh wait, i am stupid!
Dark WEDNESDAY
21
Years of Service
User Offline
Joined: 23rd May 2004
Location: Hertfordshire, UK
Posted: 18th Aug 2004 00:53
Anyone...?
Thanks in advance to any help i get.

I'm with stupid...oh wait, i am stupid!
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 19th Aug 2004 21:18
Hello Dark Wed,

Firstly, get rid of that ridiculouly massive Avatar image!
170.97 KB is just too much.

Secondly, post up your code, along with the media ( if you want to ) so that we can see what you've done, and what you're tryign to do, then we can tell you where you went wrong.

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Dark WEDNESDAY
21
Years of Service
User Offline
Joined: 23rd May 2004
Location: Hertfordshire, UK
Posted: 20th Aug 2004 03:06
ok i've changed the avatar... didn't realise it was so big. My code is based on darkforge's. As i program on my laptop and surf on a desktop, i can't give you my code or media. But i can give you darkforge's and ask you a question...Here is the code:



When citrus attacks...you know when you've been tangoed!
Dark WEDNESDAY
21
Years of Service
User Offline
Joined: 23rd May 2004
Location: Hertfordshire, UK
Posted: 20th Aug 2004 03:09
Okay...Now how would i change the code as to make the snake into different sections yet still keep it working. So there is a sprite for the head and tail. Then, how would i rotate the head when it turns? If you can't answer...i'll try a 3d game instead so thanks for your help.

When citrus attacks...you know when you've been tangoed!
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 21st Aug 2004 16:50
Hmmm.

That code's not the best to model off of.

What I suggest you do though, if you really want to modify that code, is to make another sprite image ( for the head or tail ), then since the position of the head is donated by (x/16,y/16) then, you know where to paste the head sprite, which you should do, then set a variable to show that the head has been pasted.
Where you have the part where the rest of the tail is pasted, just do a check on that variable, if it is true, then paste the tail peices.

To rotate the image, you'll have to make it all sprites, as there aren't rotate image commands in DBC.

Hope that helped

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Dark WEDNESDAY
21
Years of Service
User Offline
Joined: 23rd May 2004
Location: Hertfordshire, UK
Posted: 21st Aug 2004 22:41
Thanks for the help Jess.
I'll try to get those ideas in motion. If I can't i'll try 3d as I have thought of a few ways to merge 3d and 2d graphics and keep it all working.
Thanks.
Bye.

When citrus attacks...you know when you've been tangoed!
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 22nd Aug 2004 17:50
Anytime!

Good luck

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy

Login to post a reply

Server time is: 2025-05-25 13:18:21
Your offset time is: 2025-05-25 13:18:21