My WIP snake game

Share your games and programs with the community.

My WIP snake game

Postby REGFly » Mon Apr 20, 2015 7:01 pm

http://imagizer.imageshack.us/a/img537/6827/tYzYBw.gif

My progress on the snake game so far. Made it in about 4 or 5 hours.
I don't know know if anyone wants to play it so I won't post the game + you need a emulator to play this game. But if anyone wants to play it or see my code please PM me.
Features:
* Controls
* Menu
* Snake logic (sounds funny when I type it " Dude it has snake logic!! ")
* It has fruit + fruit logic
* Collision
* It keeps score I just don't print it
What I need to do:
* Make a game over screen wich shows your score, lets you save it and replay the game
* Make the slithering snake die
* Make a logo
* Make everything bigger ( Right now I'm not using any sprites )
* Add sound effects
* Give the menu an exit ( So I can leave the game )
* Fix glitches
REGFly
 
Posts: 62
Joined: Sat Mar 07, 2015 10:21 pm

Re: My WIP snake game

Postby REGFly » Tue Apr 21, 2015 2:27 pm

Here you can test it out, but be warned there are still lots of bugs in it :D . Tell me if you find any weird glitches. http://goo.gl/8ejcLQ
REGFly
 
Posts: 62
Joined: Sat Mar 07, 2015 10:21 pm

Re: My WIP snake game

Postby Marcus » Tue Apr 21, 2015 5:30 pm

That looks very nice, good job!
Marcus
 
Posts: 143
Joined: Fri Jan 09, 2015 6:51 pm

Re: My WIP snake game

Postby REGFly » Wed Apr 22, 2015 11:44 am

Thanks :) .I don't think of myself as a awesome programmer yet but a good enough to do the things i do :D . I still don't know how to use pointers (mainly because i haven't started reading my C book) and I have a understanding of how to use OOP but i don't usde it. OOP is pretty new to me, but ill have to use it once i finish this game, because i want to make a two player gamemode of this :D . To me this is a great acheivement because a year ago i barely knew programming and was doing a snake on a 8*8 dot matrix. I didnt know for loops or how functions worked and stuff and my teacher from then didnt really help me, but now im like "i was so stupid this is easy". I set myself a goal that i'd make this game without any help (meaning not checking examples or anyones code and no tutorials) and its going good so far.
REGFly
 
Posts: 62
Joined: Sat Mar 07, 2015 10:21 pm

Re: My WIP snake game

Postby Skyrunner65 » Wed Apr 22, 2015 2:55 pm

Pretty good.
For exiting to the menu, I suggest doing this:
Code: Select all
About where you put your controls...
if(gb.buttons.pressed(BTN_C)){
  gb.titlescreen("Snake");
}


That will send you back to the Title Screen, where then you can exit the game.
You can switch out gb.titlescreen("Snake"); for gb.changeGame(); if you want it to exit the game immediately.
Also, for score, you could do something like this:
Code: Select all
gb.display.cursorX = 0;
gb.display.cursorY = 0;
gb.display.print(score);


That would probably be with your looping code.
User avatar
Skyrunner65
 
Posts: 371
Joined: Thu Mar 20, 2014 5:37 pm
Location: NC,USA

Re: My WIP snake game

Postby REGFly » Wed Apr 22, 2015 8:38 pm

Thanks but i was already planning on doing that only difference is that the score position changes depending on where you and the fruit is. Also I'll remove the battery icon but i haven't done it yet. I'm a bit busy this weekend so i didn't resume this game that much but i did a bit of coding and now you it can detect if the snake bit iself but theres a glitch in my code (my bet is on the void initiation) so i'll have to fix it up tomorrow. You can check out my code if you want. But it's very messy. I'm planning on making it more readable and the unctions more usable once i'm done with the basics. Here's the code http://goo.gl/oP25ba (the .ino isn't called snake because it all started out me testing the collision with a moving block and i just didn't change it)
REGFly
 
Posts: 62
Joined: Sat Mar 07, 2015 10:21 pm

Re: My WIP snake game

Postby Sorunome » Thu Apr 23, 2015 2:25 pm

Any chance of a screenshot?
User avatar
Sorunome
 
Posts: 629
Joined: Sun Mar 01, 2015 1:58 pm

Re: My WIP snake game

Postby clement » Thu Apr 23, 2015 6:28 pm

Gif in first post, but in url tag and not IMG tag...

Image
clement
 
Posts: 161
Joined: Sat Oct 25, 2014 8:06 am

Re: My WIP snake game

Postby REGFly » Thu Apr 23, 2015 6:48 pm

here goo.gl/0gM28S this is the newest build
REGFly
 
Posts: 62
Joined: Sat Mar 07, 2015 10:21 pm

Re: My WIP snake game

Postby REGFly » Thu Apr 23, 2015 6:50 pm

So I sat down today and finished the game.
What I did:
* Made a game over screen wich shows your score and lets you replay the game
* Made the snake die
* Added sound effects
* Made the menu an exit ( So I can leave the game )
* Fixed glitches
I pretty much finished this game. Except for the logo and the sprites. Anyone want to help out?

Game: goo.gl/NtsG5a

Cleaned up code: goo.gl/hFlteR
REGFly
 
Posts: 62
Joined: Sat Mar 07, 2015 10:21 pm

Next

Return to Games Gallery

Who is online

Users browsing this forum: No registered users and 14 guests

cron