new version adds enemies, 10 levels to complete.
previous version
This is a unfinished version to see the finished version see: https://www.lexaloffle.com/bbs/?tid=40244
Hi this is my first attempt at making a game. I'm feeling mixed opinions. I was hoping to do a clone of a snakes game called Crazy Snakes from the Amstrad CPC (by Fraggle and Duck). However I feel like the 128x128 grouping is just too small for this type of game, especially if I use 8x8 sprites.
What would you do to improve the gameplay. I've only done three levels so far. I wanted to add in enemy snakes and one other type of enemy like the game I'm emulating. I've also not added in any of the bonus items such as extra lives, or a snake shortener.
So first impressions of pico8. Love the music editor, its not your fault I'm crap with that. Love the map editor, and the sprite editor. Little disappointed in the fixed palette but It isn't too bad and makes me more creative.
But I am disappointed in the 128x128 resolution. It just seems too much of a restriction. When using 8 bit computers in the past the resolution I had available was 320x200 which is a huge amount more.
What do you think? Is this just me not using screen estate effectively?
Okay it was me not using the screen estate well.
Okay I tried a version with 5x5 sprites and I'm a lot happier with it.
This leaves that I can have more speed and more complicated setups, and more length. Though for the early levels the big version was better.
Fun :-)
Although I felt like it needed to speed up a bit sooner maybe..?
There's an issue where if I try to turn back really fast I end up dying because snake makes two turns within a single move. This is really annoying in the faster levels where I have to balance between clicking fast to turn back without leaving a gap and not clicking too fast to not die.
Otherwise a cool game, you really nailed the graphics. Levels without obstacles are quite easy (you can just methodically move through every square) but when enemies start to appear it starts getting hard. In levels with 'L' they disappear when you die and replay, although I guess it's a feature preventing players from farming lives?
I see two issues with your code regarding direction change:
-
You check player input every frame if player has control and you update p.dir (and p.old_dir which doesn't appear anywhere else in the code) which means that you check what direction was the player pushing last frame, not what direction was the snake moving last move, which in turn leads to snake turning instantly back and dying. You should make use of p.old_dir, update it only when the snake moves, and use
if btn(⬆️) and p.old_dir!=down then p.dir=up
instead of
if btn(⬆️) and p.dir!=down then p.dir=up
in player_dir
- At the start of the level you take control from the player (in order to prevent them from immediately hitting one of walls I assume) for just enough time that someone who holds a turning button gets killed on the last wall block in the starting area XD
Edit: after some more code browsing I found out that in make_snake you declare s.hist={down} twice. Also, why don't you just compare everything to p.hist[#p.hist]? You can scrap the line p.old_dir=dir and just declare a local old=p.hist[#p.hist] and compare new directions to that.
@olus2000 Thanks for taking the time for making these suggestions.
Using hist seems like a good way to go, also allows me to remove the drawn counter. I had old_dir used in the first version (which should be attached), with the express intention of using it in the way you mention but I think checking hist is a better way of doing this.
On number 2 I'm not sure if you feel that I shouldn't take controll of the snake or I should wait one more "turn" to allow control again.
In the game I'm attempting to clone one of my annoyances was the pressing in the opposite direction to the direction your facing killed you, every time.
When I attempted to make a clone in VB4.0 due to the update speed I had to keep a buffer of inputs, to allow the snake fold back on itself, as the input speed was slow.
I'm wondering if I should use that approach again if it makes sense in this environment. If you press down followed by right in the same game "turn" would you like right to be applied the following "turn"
Anyway I hope you enjoyed it, I'm currently messing around with title screen, and putting in music contributed by another user on Discord, (I don't know what their BBS account is so can't ping them).
The L disappearing is deliberate as that's what the original did. and I didn't feel like maintaining a collection counter in level state so because I'm lazy.
Input buffering sounds great, but it also sounds like a lot of work. It would be awesome if you managed it! I don't know the original, that's why some things you want to achieve don't seem obvious to me. As of number 2, I don't really have a preference, I just find it hilarious. I have almost managed to beat all levels, but the seeker is merciless. Keep up the good work!
Just tried your suggestion. It does fix the self collision but it does so at the expense of making it look like you've done no input.
the only way I can solve that is to have up to 2 inputs per turn. If there are two apply the second to last one this turn apply the last one next turn.
It may cause other problems.
Update I finished this. You can see the final version at https://www.lexaloffle.com/bbs/?tid=40244
[Please log in to post a comment]