[Homebrew] My first game... yet another Snake!
- Yvar de Goffau
- Posts: 11
- Joined: Mon Dec 04, 2017 3:57 am
- Location: Saint-Beat, Haute Garonne, France
[Homebrew] My first game... yet another Snake!
Hello folks,
After some time programming on the Atari VCS I decided to give it a go at programming for the device I spend my whole childhood on... the gameboy.
I looked around and I couldn't find any decent implementation of Snake (by decent I mean fast, nice grafix, with multiple levels, and fun).
For my own madness, I decided the snake had to be fully 60hz animated too.
After what was roughly 1 week of hacking around + 1 week of fixing things, here is then my implementation of the classic Snake (or more close to a more recent Snake, say Snake 2 or something)
Also included in the package are the 2 python programs I used to parse grafix... ugly but useful!
In afterthought, I think I should have done some things otherwise... but the result is fun anyway.
Everything is done by myself, this includes the grafix and the little background music.
I hope you like it, and I would welcome suggestions and improvements (although I won't have a lot of time this week)
After some time programming on the Atari VCS I decided to give it a go at programming for the device I spend my whole childhood on... the gameboy.
I looked around and I couldn't find any decent implementation of Snake (by decent I mean fast, nice grafix, with multiple levels, and fun).
For my own madness, I decided the snake had to be fully 60hz animated too.
After what was roughly 1 week of hacking around + 1 week of fixing things, here is then my implementation of the classic Snake (or more close to a more recent Snake, say Snake 2 or something)
Also included in the package are the 2 python programs I used to parse grafix... ugly but useful!
In afterthought, I think I should have done some things otherwise... but the result is fun anyway.
Everything is done by myself, this includes the grafix and the little background music.
I hope you like it, and I would welcome suggestions and improvements (although I won't have a lot of time this week)
- Attachments
-
- snake.gb
- The game itself (latest version)
- (32 KiB) Downloaded 1020 times
-
- snake.zip
- The source code, program data, and programmes used to generate it (latest version)
- (76.29 KiB) Downloaded 637 times
Last edited by Yvar de Goffau on Tue Dec 19, 2017 10:05 am, edited 8 times in total.
- FrankenGraphics
- Formerly WheelInventor
- Posts: 2064
- Joined: Thu Apr 14, 2016 2:55 am
- Location: Gothenburg, Sweden
- Contact:
Re: [Homebrew] My first game... yet another Snake!
Congratulations! Well done, i love the fluid animation.
Some thoughts on possible changes:
-Maybe add a unique "egg in belly" tile for when it was swallowed right in a 90 degree turn?
-The music is a good start, but gets grating after a short while since the loop is so short.
-When the snake has gotten very long, if you die, it takes quite a while for the retry message to appear
-Maybe a countdown on eggs until next level rather than amount of eggs swallowed would be more informative + slightly nerve wracking. Especially with that delay between swallowing and being extended.
-Maybe introduce the "cherry" to vary gameplay. The exact mechanics are up to you, but it could disappear after some timer runs out or if you take the egg first. Normally, a cherry would grant points, but there are no points except a record on how long you got the snake. It could count towards that score/goal without elongating the snake? Sounds like a suitable reward for risking your life for a time-limited bonus.
-Maybe one of the action buttons could speed up the snake a bit? (use at own risk).
Some thoughts on possible changes:
-Maybe add a unique "egg in belly" tile for when it was swallowed right in a 90 degree turn?
-The music is a good start, but gets grating after a short while since the loop is so short.
-When the snake has gotten very long, if you die, it takes quite a while for the retry message to appear
-Maybe a countdown on eggs until next level rather than amount of eggs swallowed would be more informative + slightly nerve wracking. Especially with that delay between swallowing and being extended.
-Maybe introduce the "cherry" to vary gameplay. The exact mechanics are up to you, but it could disappear after some timer runs out or if you take the egg first. Normally, a cherry would grant points, but there are no points except a record on how long you got the snake. It could count towards that score/goal without elongating the snake? Sounds like a suitable reward for risking your life for a time-limited bonus.
-Maybe one of the action buttons could speed up the snake a bit? (use at own risk).
-
- Posts: 173
- Joined: Wed Jun 15, 2016 11:49 am
Re: [Homebrew] My first game... yet another Snake!
The nintendo logo scrolling off the bottom of the screen was a clever touch
When the snake goes off the top of the screen the last tail section glitches out. It looks like it's getting flipped before scrolling off. I also agree that the music is a bit harsh sounding.
Impressive for only a couple weeks of work!
When the snake goes off the top of the screen the last tail section glitches out. It looks like it's getting flipped before scrolling off. I also agree that the music is a bit harsh sounding.
Impressive for only a couple weeks of work!
Re: [Homebrew] My first game... yet another Snake!
I first saw this in Wordtris.Alyosha_TAS wrote:The nintendo logo scrolling off the bottom of the screen was a clever touch
Another approach, especially for a larger project intended for a cartridge, is to fade a couple lines of text onto the logo for a couple seconds while your game is setting various things up. I've done something similar with Genesis TMSS (source: Tweet). In each case, the BIOS notice displays for a couple seconds, and then your notice displays for a couple seconds after that.
- Yvar de Goffau
- Posts: 11
- Joined: Mon Dec 04, 2017 3:57 am
- Location: Saint-Beat, Haute Garonne, France
Re: [Homebrew] My first game... yet another Snake!
Thank you all for your feedback!
In no particular order:
In no particular order:
--- Haha ... that was what I thought too. I did spend my whole childhood watching that far too slow logo fade away, so it was totally worth it!The nintendo logo scrolling off the bottom of the screen was a clever touch
--- Oups... I completly forgot to fix that one! Yes, I had noticed it earlier, and I know what's wrong, so I will have a look at it as soon as possible.When the snake goes off the top of the screen the last tail section glitches out. It looks like it's getting flipped before scrolling off.
--- The lack of that is also a source of another little bug, in that the tail sprite glitches when digesting that kind of corner-eggs. I already had a look, but my collision code is messy and I need to rewrite it firstMaybe add a unique "egg in belly" tile for when it was swallowed right in a 90 degree turn?
--- So true... I wish I was better with sounds but I'm not a real chiptune artist. But I will work on it. Only disabling/enabling one of the channels already does magic!The music gets grating after a short while since the loop is so short.
--- The HUD might not be clear enough. Left is the number of eggs swallowed (actually the number of eggs digested, but that will change very soon). In the middle is the timer, not used yet, and in the right is the highscore for the current level (in eggs swallowed). By the way, have you tried pressing A/B/Select/Start on retry to switch levels?Maybe a countdown on eggs until next level rather than amount of eggs swallowed would be more informative + slightly nerve wracking. Especially with that delay between swallowing and being extended.
--- I even thought about speeding up the game after some time, to put more stress on the player to get their eggs early. For those to work, I have to craft an variable timer, which is easy enough (just take the high nibble instead of the low nibble as a time index) but I didn't yet find time to implement itMaybe one of the action buttons could speed up the snake a bit?
--- I love that idea! But pfft... first some more bugs/features to fix!Maybe introduce the "cherry" to vary gameplay.
--- You have been playing too long... get a pause! Well, I will speed it up a bit as soon as I have the function for...When the snake has gotten very long, if you die, it takes quite a while for the retry message to appear
- Yvar de Goffau
- Posts: 11
- Joined: Mon Dec 04, 2017 3:57 am
- Location: Saint-Beat, Haute Garonne, France
Re: [Homebrew] My first game... yet another Snake!
Version 0.2A!
Fantastic how adding a little countdown quickening-up the game can work on peoples nerves!
Now find the time to add 90 degrees egg in belly, better music, and maybe some cherries and we're good to go!
Fantastic how adding a little countdown quickening-up the game can work on peoples nerves!
Now find the time to add 90 degrees egg in belly, better music, and maybe some cherries and we're good to go!
- Yvar de Goffau
- Posts: 11
- Joined: Mon Dec 04, 2017 3:57 am
- Location: Saint-Beat, Haute Garonne, France
Re: [Homebrew] My first game... yet another Snake!
Didn't have much time this week, but here is a version 0.2B...
What have changed:
- Fixed the tail cornering bug
- Added 90 degrees egg-in-belly grafix
- Improved a little the music
Please keep on sending feedback
... and if you like it, why not share it?
What have changed:
- Fixed the tail cornering bug
- Added 90 degrees egg-in-belly grafix
- Improved a little the music
Please keep on sending feedback
... and if you like it, why not share it?
-
- Posts: 173
- Joined: Wed Jun 15, 2016 11:49 am
Re: [Homebrew] My first game... yet another Snake!
much more fun to play now with the softer toned music.
I think it could us some more animations though, like one for eating the egg, or the snakes belly segments expeanding as he swallows it.
I think it could us some more animations though, like one for eating the egg, or the snakes belly segments expeanding as he swallows it.
- Yvar de Goffau
- Posts: 11
- Joined: Mon Dec 04, 2017 3:57 am
- Location: Saint-Beat, Haute Garonne, France
Re: [Homebrew] My first game... yet another Snake!
I gonna have a look... but it is not easy. The head and tails are (for technical reasons) movable shapes, and I'm a bit short of OAM shapes!
However, running my shape deduplicator on it, with detection of mirror and flip, shows that 36 of the 256 shapes are (indirectly) duplicates...
So as soon as I have those deduplicated, I can start to add more animation...
To be more specific, I can add 1 animation sequence for 4 directions (32 shapes i.e. 8 steps * 4 directions), and then I keep 4 movable shapes for things like cherries, baskets, ect...
So what do you prefer? An sequence where the snake's head opens its mouth to eat an egg? Or maybe something else?
However, running my shape deduplicator on it, with detection of mirror and flip, shows that 36 of the 256 shapes are (indirectly) duplicates...
So as soon as I have those deduplicated, I can start to add more animation...
To be more specific, I can add 1 animation sequence for 4 directions (32 shapes i.e. 8 steps * 4 directions), and then I keep 4 movable shapes for things like cherries, baskets, ect...
So what do you prefer? An sequence where the snake's head opens its mouth to eat an egg? Or maybe something else?
- Yvar de Goffau
- Posts: 11
- Joined: Mon Dec 04, 2017 3:57 am
- Location: Saint-Beat, Haute Garonne, France
Re: [Homebrew] My first game... yet another Snake!
Small update! (version 0.2C, I think)
I added an bonus called The Basket. It appears somewhere between difficulty level 4 and 7, and if you tumble it, it will make eggs scatter the screen. Of course, only one is the real egg, but the others are delicious too!
I worked on the extra animations, I even found space to squeeze in both head eating and segment expanding frames, but they are not finished yet. That will be for a next update!
I added an bonus called The Basket. It appears somewhere between difficulty level 4 and 7, and if you tumble it, it will make eggs scatter the screen. Of course, only one is the real egg, but the others are delicious too!
I worked on the extra animations, I even found space to squeeze in both head eating and segment expanding frames, but they are not finished yet. That will be for a next update!
- Yvar de Goffau
- Posts: 11
- Joined: Mon Dec 04, 2017 3:57 am
- Location: Saint-Beat, Haute Garonne, France
Re: [Homebrew] My first game... yet another Snake!
New version...
Not much did change, but I added a cherry, which gives 5 points.
Also, I did put in the animations. As it turned out, the game goes too fast for them to be any good
(specially on my ultra-blurry gbpocket ), but the one with the eating head also appears when you eat yourself, and is just too much fun to not use .
I won't have a lot of time after this week to code, so please send in your last suggestions before it is too late.
I have an idea for a next gameboy game, but that will be for after the holidays...
By the way, what website do you recommend to publish this game on? I don't know anything about that kind of jobs...
Not much did change, but I added a cherry, which gives 5 points.
Also, I did put in the animations. As it turned out, the game goes too fast for them to be any good
(specially on my ultra-blurry gbpocket ), but the one with the eating head also appears when you eat yourself, and is just too much fun to not use .
I won't have a lot of time after this week to code, so please send in your last suggestions before it is too late.
I have an idea for a next gameboy game, but that will be for after the holidays...
By the way, what website do you recommend to publish this game on? I don't know anything about that kind of jobs...
Re: [Homebrew] My first game... yet another Snake!
itch.io is good for building a portfolio.
-
- Posts: 173
- Joined: Wed Jun 15, 2016 11:49 am
Re: [Homebrew] My first game... yet another Snake!
I noticed a glitch in my emulator's audio code due to this game, so thanks for that!Yvar de Goffau wrote:New version...
Not much did change, but I added a cherry, which gives 5 points.
Also, I did put in the animations. As it turned out, the game goes too fast for them to be any good
(specially on my ultra-blurry gbpocket ), but the one with the eating head also appears when you eat yourself, and is just too much fun to not use .
I won't have a lot of time after this week to code, so please send in your last suggestions before it is too late.
I have an idea for a next gameboy game, but that will be for after the holidays...
By the way, what website do you recommend to publish this game on? I don't know anything about that kind of jobs...
my only point of criticism is that the eggs appearing over the snake after they are eaten looks a bit sloppy. Other then that pretty cool.
Re: [Homebrew] My first game... yet another Snake!
Pretty cool, although the sound could use a bit of work. It sounds really basic to me.
On that note, here's a test to see if I could get DevSound (my own Game Boy music system) to work in your game. I mostly succeeded, although there are a few issues. First of all, DevSound expects to have full control over the sound chip, so it ends up corrupting the sound effects. Secondly, the music no longer increases in speed when the game does. Deliberately slowing down the call rate for music playback (which is what your sound code did) is not sufficient as DevSound needs to be called on every frame in order for the music to sound correct. Finally, the music constantly pauses. I tried to fix the latter issue, but I wasn't able to due to not wanting to spend too much time.
By the way, I noticed that you're following your halts with nops. This isn't necessary; the assembler will automatically insert a nop after each halt opcode.
On that note, here's a test to see if I could get DevSound (my own Game Boy music system) to work in your game. I mostly succeeded, although there are a few issues. First of all, DevSound expects to have full control over the sound chip, so it ends up corrupting the sound effects. Secondly, the music no longer increases in speed when the game does. Deliberately slowing down the call rate for music playback (which is what your sound code did) is not sufficient as DevSound needs to be called on every frame in order for the music to sound correct. Finally, the music constantly pauses. I tried to fix the latter issue, but I wasn't able to due to not wanting to spend too much time.
By the way, I noticed that you're following your halts with nops. This isn't necessary; the assembler will automatically insert a nop after each halt opcode.
- Attachments
-
- snake+devsound.zip
- (128.63 KiB) Downloaded 529 times
-
- snake.gb
- (64 KiB) Downloaded 537 times
Last edited by DevEd on Fri Jan 05, 2018 4:16 pm, edited 1 time in total.
You know, the DevSound guy.
There are two kinds of people in this world: those who are convinced there are two kinds of people in this world, and those who aren't. - Unknown
There are two kinds of people in this world: those who are convinced there are two kinds of people in this world, and those who aren't. - Unknown
- Yvar de Goffau
- Posts: 11
- Joined: Mon Dec 04, 2017 3:57 am
- Location: Saint-Beat, Haute Garonne, France
Re: [Homebrew] My first game... yet another Snake!
Nice tune!
I first thought a simple game wouldn't be very demanding on the matter of sound, but indeed that is pretty cool .
To make the sound effects work, one simple solution would be to simply disable channel 4 in the music engine since all sound effects are made to work with channel 4. The sound effects are very plain ones, with no real code behind, but I don't know how the SFX works in your music engine. I will try to set up 1 unified sound effect trigger routine once I get home, that would make things a bit easier.
For the speedup, [v_speed] contains the current speed of the game; if I would know where the current song speed is stored I would be able to just modify that... or how does DevSound store the rythm speed of the tune? Can you invoque for example [$89 - SetSpeed] from within the game code?
By the way, is it an idea to make 8 different tunes for the 8 maps ? I have no real talent for music so I didn't get past 1 boring old loop...
(edit) By the way, why did you remove the halt in the waitKey routine? Did that cause problems with the music engine? If it is the emulator that hangs (which happened to one of my emulators) than you can use the waitKeyOld routine...
I first thought a simple game wouldn't be very demanding on the matter of sound, but indeed that is pretty cool .
To make the sound effects work, one simple solution would be to simply disable channel 4 in the music engine since all sound effects are made to work with channel 4. The sound effects are very plain ones, with no real code behind, but I don't know how the SFX works in your music engine. I will try to set up 1 unified sound effect trigger routine once I get home, that would make things a bit easier.
For the speedup, [v_speed] contains the current speed of the game; if I would know where the current song speed is stored I would be able to just modify that... or how does DevSound store the rythm speed of the tune? Can you invoque for example [$89 - SetSpeed] from within the game code?
By the way, is it an idea to make 8 different tunes for the 8 maps ? I have no real talent for music so I didn't get past 1 boring old loop...
(edit) By the way, why did you remove the halt in the waitKey routine? Did that cause problems with the music engine? If it is the emulator that hangs (which happened to one of my emulators) than you can use the waitKeyOld routine...