Click here to Skip to main content
15,867,704 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi guys, a beginner here. I've been trying to develop my own rendition of Snake using C++ and openGL. This is a 3D game. I have done everything from the eating of food, the 3D look, the snake's movement, EXCEPT, the growing of its tail. I have done the tail growth manually. Meaning I made lots of tails, and had it addded onto the body of the snake everytime it eats. But that kind of method is really a hassle, really complicated, since you have to make a lot of variables, etc, and it makes the code a tad longer, and the tail growth is limited! I believe that the best solution for the tail is to use a linked-list but I don't really grasp the concept and syntax of a linked-list. I've been reading a lot of books and online sources, but I still don't understand. I have learned about queues and stacks too, but I don't know how to implement it on my code. :( I've been trying so hard to implement queues for days already, and I really can't figure it out. I need your help! :(

By the way, I don't want to post the code publicly. I would appreciate if you could send me your e-mails if you want to see it. THANK YOU SO MUCH FOR YOUR HELP GUYS.
Posted
Comments
Mohibur Rashid 14-Apr-13 8:29am    
You said you did everything from eating food, the 3D look and snake's movement, but you failed to catch the concept of linked list? linked list is simpler than making a 3d look and doing the movement.. anyway your question is not enough to answer
pasztorpisti 14-Apr-13 8:29am    
Is this an email collector for a spam robot or a well hidden linked-list homework?
[no name] 14-Apr-13 9:01am    
No one is going to send you their email address. There is also no reason at all why you would not post your code here along with a description of the problem you are having with the code snippet. There are probably hundreds, if not thousands, of freely available snake games out and I can't imagine that your implementation is all that special.
[no name] 17-Apr-13 10:42am    
Ooopps. Sorry guys, please don't judge. :( I'll add more details to the question. And I didn't say my implementation was special, I had my reasons. :( anyway, I'll add the snippet here. Sorry, and thank you.

1 solution

Why to implement your own linked-list? What's bad with std::list?

 
Share this answer
 
Comments
bahiru belina 16-Jan-23 14:22pm    
send the source code

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900