CodeWalrus

Development => Calculators => Calc Projects, Programming & Tutorials => Topic started by: Duke "Tape" Eiyeron on April 21, 2015, 01:37:55 PM

Title: [PICO-8] Coffee Roguelike
Post by: Duke "Tape" Eiyeron on April 21, 2015, 01:37:55 PM
Hello everyone, time for another project.

This time, I'm back into the genre that always inspired me, the roguelikes. Roguelikes are fun and can be made with the complexity you want. Something as realistic than Dwarf Fortress up to simple dungeon crawlers you will eat on the go. These latter games are coffee roguelikes, where a run shouldn't be too long (the time to drink a coffee).

So, what about the roguelike itself? I had a stupid idea based on the eternal choice : ASCII graphics or tileset graphics? What about both? The game will see its tileset evolve when you will get deeper into the evil depths until you get to the last. (I'm only showing a sample of the first three tilesets).

What about monsters? The game will be relatively simple to keep up with the "play in a few minutes", I currently have three enemies in mind, Goblins, Slimes, and Mr Battys (or Batties) if anyone got the reference of the latter! :)

The demo I will post first is totally unplayble : the dungeon generation is totally not done and you'll be trapped in the room with three goblins. I have so much to do and so few motivations. I wonder how the dungeon generation will be done and I think I'm going for a room grid based system to keep it simple.

Oh and please don't spoil the last tileset, please. Endgame purposes with some quirks and gameplay changes.

Title: Re: [PICO-8] Coffee Roguelike
Post by: Ivoah on April 21, 2015, 01:45:08 PM
Looks great! I can't wait to see what kind of games are made with PICO-8, it's so fun.
Title: Re: [PICO-8] Coffee Roguelike
Post by: Snektron on April 21, 2015, 02:13:26 PM
They look quite cool, Eiyeron. Good job! ;D
Title: Re: Coffee Roguelike
Post by: Dream of Omnimaga on April 21, 2015, 09:46:03 PM
Ooh I like the idea. It reminds me a bit Nostalgia for the 84+ where there was a world with ASCII graphics and another with actual sprites, but in your case it becomes more and more graphical as you progress. Very original :)
Title: Re: [PICO-8] Coffee Roguelike
Post by: Strontium on April 21, 2015, 10:31:49 PM
I really like roguelikes, especially ones that employ new concepts (like how the tileset changes as you progress). I can't wait to play this.
Title: Re: Coffee Roguelike
Post by: alexgt on April 21, 2015, 10:37:39 PM
Never thought of a game with graphics like that?! looks awesome :)
Title: Re: Coffee Roguelike
Post by: Duke "Tape" Eiyeron on April 22, 2015, 05:09:10 AM
Thanks. To explain the progress I did, I basically started to make a sort of level generator. It still have some quirks and and there but it gives me the result I expect : rooms, corridors and key locked doors.
Title: Re: Coffee Roguelike
Post by: Dream of Omnimaga on April 22, 2015, 04:26:46 PM
Do you mean random level generation or an editor?
Title: Re: [PICO-8] Coffee Roguelike
Post by: Snektron on April 22, 2015, 04:37:09 PM
I think he means a random generator.
Title: Re: Coffee Roguelike
Post by: Duke "Tape" Eiyeron on April 22, 2015, 04:52:22 PM
Yes, that what I mean.
Title: Re: Coffee Roguelike
Post by: Dream of Omnimaga on April 23, 2015, 08:27:01 PM
Ah ok. I am curious if such thing can run at good speed in PICO-8. Good luck in any case.
Title: Re: Coffee Roguelike
Post by: Duke "Tape" Eiyeron on May 26, 2015, 10:59:19 PM
GOt back on Pico. GOt a better start for dungeon generation (less buggy). Here's what I got at this moment on a test file.
Title: Re: [PICO-8] Coffee Roguelike
Post by: Strontium on May 27, 2015, 12:28:21 AM
How do you do the dungeon generation? When I pick up my own Roguelike again, I was planning on using https://love2d.org/forums/viewtopic.php?t=76929
Title: Re: Coffee Roguelike
Post by: Dream of Omnimaga on May 27, 2015, 12:30:15 AM
Wow that seems pretty fast actually per PICO standards. Do you still plan to include the various graphics and their evolution from ASCII to graphical as you progress?
Title: Re: Coffee Roguelike
Post by: Duke "Tape" Eiyeron on May 27, 2015, 10:16:35 AM
Naaah, the ASCII graphics are there only because I wanted t ohave a biger view of the generated map. It's another cartridge independant of my roguelike as I want to try another ways for dungeon generation. THe gif is also slowed down because the room generation has a rogue cls() call which erase the vram and each digger step waited for 5 frames to be shown before progressing. So yeah, it's fast enough.
Title: Re: [PICO-8] Coffee Roguelike
Post by: Snektron on May 27, 2015, 10:18:33 AM
looks cool :) i should implement my own maze generation algorithm on pico. you can actually find it at http://quantuminfinity.space/maze/ (http://quantuminfinity.space/maze/)
Title: Re: Coffee Roguelike
Post by: Duke "Tape" Eiyeron on May 27, 2015, 10:27:03 AM
Your? It just looks like a simple backtracker algorithm! I coded this on pico in 10 minutes and was one of the first C experiments I did! Well, it's the most effective algorithm as you're sure that the whole zone will be dug.

EDIT : Yup, you used the backtracker method. Simple and effective.
Title: Re: [PICO-8] Coffee Roguelike
Post by: Snektron on May 27, 2015, 10:43:20 AM
Yeah i read up on maze algorithms when i created this, but i don't think its backtracking exactly
since it doesnt save the places it can pop back to, it just loops though the grid. I guess it's not so different though... :P
At the time i was really new to coding, one of my first things (first made it in lua though)
Title: Re: Coffee Roguelike
Post by: CKH4 on May 27, 2015, 11:07:19 AM
So is it canvas cumred?
Also how many lines for the maze generation in pico 8 eiyeron?
Title: Re: Coffee Roguelike
Post by: Duke "Tape" Eiyeron on May 27, 2015, 11:11:24 AM
123 atm but I should clean the code and make it more concise.
Title: Re: Coffee Roguelike
Post by: CKH4 on May 27, 2015, 11:15:03 AM
Nice! Sounds like its pretty simple but the generation was  pretty good in my opinion.

Edit. Could we maybe get another gif of generation?
Title: Re: Coffee Roguelike
Post by: Duke "Tape" Eiyeron on May 27, 2015, 11:16:52 AM
Sure, let me first change the way the digger decides to chose the tile to dig from a random until I find a solution to "choose a way from a list I dynamically change" to avoid a case where it could loop forever in a very bad (yet possible) luck.

EDIT : And I still have to find out why sometimes the corridor doesn't do all the map. Some room configurations blocks me from having a full corridor and I wonder how will I be able to manage the room connection to the corridor(s?).
Title: Re: Coffee Roguelike
Post by: CKH4 on May 27, 2015, 11:26:07 AM
So with that bug would it generate in a loop forever or would it generate a loop in the map?
Title: Re: Coffee Roguelike
Post by: Duke "Tape" Eiyeron on May 27, 2015, 11:33:14 AM
It's not a bug, but having a repeat...random...until could be blocked forever because the Random Number God decided to hate you this time

EDIT : and here are some improvments : I found out how I could detect the cul-de-sacs, removed a big part of the frame flip (it'll only wait for one flip between each room and corridor dig  step) and added some colors for fun.
Title: Re: Coffee Roguelike
Post by: CKH4 on May 27, 2015, 12:06:04 PM
Lol random number gods. The new generation looks really nice.
Title: Re: [PICO-8] Coffee Roguelike
Post by: Snektron on May 27, 2015, 01:40:30 PM
i once got send out of class for disassembling randomly generated z80 asm :3
Title: Re: Coffee Roguelike
Post by: Dream of Omnimaga on May 27, 2015, 09:21:27 PM
So would scrolling be fast enough to be playable?
Title: Re: Coffee Roguelike
Post by: Duke "Tape" Eiyeron on May 27, 2015, 10:04:06 PM
Suure, the map will be managed by Pico itself, I'm just prototyping something out of the game (but still relevant) at the moment.
Title: Re: Coffee Roguelike
Post by: Dream of Omnimaga on June 01, 2015, 10:56:20 PM
Cool to hear. I wish that a game like First Fantasy: Mana Force was possible in PICO-8. It would have to be dumbed down so that for example magic spells are identical but different colors like Final Fantasy 1 for the NES. Does that language support save files so you can record your highscores or progress?
Title: Re: Coffee Roguelike
Post by: Duke "Tape" Eiyeron on June 02, 2015, 11:54:55 AM
Not yet. You could get around by saving on the fly the cart but the VM doesn't support extern file loading/writing yet.
Title: Re: Coffee Roguelike
Post by: Dream of Omnimaga on June 03, 2015, 07:13:24 PM
Aw, too bad. I guess for RPGs passwords to switch between carts are a must, then.
Title: Re: [PICO-8] Coffee Roguelike
Post by: Snektron on June 03, 2015, 08:40:45 PM
I hope they implement something to save things though.
Title: Re: Coffee Roguelike
Post by: alexgt on June 03, 2015, 09:01:58 PM
I should stop being lazy and download this <_< it looks really cool :)
Title: Re: Coffee Roguelike
Post by: Dream of Omnimaga on June 04, 2015, 07:37:48 AM
Quote from: Cumred_Snektron on June 03, 2015, 08:40:45 PM
I hope they implement something to save things though.
Yeah same, but again the author said he wanted the language to be limited on purpose so that people can enjoy working around its limitations like with old school platforms and consoles. For saving I am curious if he will go Atari 2600 style or NES style (I don't recall any Atari 2600 game that had a save feature, but many NES games did)

But yeah for the time being, if Eiyeron ever decided to add saving to his game, he could simply implement an insecure password feature so that at the end of a chapter it gives you a password containing some serial to enter in order to continue the next cartridge, with a few extra characters that are your HP/level/etc, which the game would ignore in the password check (other than setting your stats). If the password system is too secure it will most likely fill like 30% of the cartridge.

Title: Re: [PICO-8] Coffee Roguelike
Post by: Strontium on July 23, 2015, 09:39:53 PM
Quote from: Cumred_Snektron on May 27, 2015, 01:40:30 PM
i once got send out of class for disassembling randomly generated z80 asm :3

I'm a bit late, but, I'm curious. Why would you get sent out of class for that? :P
Title: Re: [PICO-8] Coffee Roguelike
Post by: utz on July 24, 2015, 08:05:44 PM
And I wonder what happened to the game. I looooove roguelikes. I don't have that pico stuff though, and I don't think I'd pay for a license considering I hardly ever play games nowadays.
Title: Re: Coffee Roguelike
Post by: Dream of Omnimaga on July 25, 2015, 02:00:13 AM
You can play the games for free on the online PICO-8 player on the website, but I think the games have to be hosted there in order to do that.
Title: Re: Coffee Roguelike
Post by: Ivoah on July 25, 2015, 02:00:57 AM
I got it for free when he posted the download codes on twitter :P
Title: Re: Coffee Roguelike
Post by: Snektron on July 25, 2015, 11:32:06 AM
Quote from: Strontium on July 23, 2015, 09:39:53 PM
Quote from: Cumred_Snektron on May 27, 2015, 01:40:30 PM
i once got send out of class for disassembling randomly generated z80 asm :3

I'm a bit late, but, I'm curious. Why would you get sent out of class for that? :P

Well, it was during Dutch class, and we had to do something enirely different. Write some damn "Imaginary travel story" or something. Ofcourse, me as béta student wasn't interested at all and started doing that. When the teacher saw i wasn't working on the exercise/project i go send out of class. Still got a 7.0/10 (where 10 is best) for it though, which is quite good by my standards
Title: Re: Coffee Roguelike
Post by: Dream of Omnimaga on August 02, 2015, 02:20:14 PM
Lol how did you get an actual score even if you did nothing? O.O That said I don't really recommend doing nothing in class and instead recommend to keep programming/playing games last (once everything is finished :P)

Also I wonder if @Eiyeron still plans to finish this game...
Title: Re: Coffee Roguelike
Post by: Unicorn on August 02, 2015, 09:23:25 PM
Lol, how does that work, cumred?
Title: Re: Coffee Roguelike
Post by: Duke "Tape" Eiyeron on August 22, 2015, 10:35:21 AM
Got sidetracked with lots of projects. Still need to guess how to connect rooms to the corridor and distribute items. I'm too lazy to work on the idea I got (something like a Room Tree to know how their items should be distributed) and I went on pico with a almost working Window Manager for it. Yeah.
Title: Re: Coffee Roguelike
Post by: Dream of Omnimaga on August 23, 2015, 01:10:11 AM
Good luck, I hope you can figure out room connection soon. Will you post screenies of the Window manager by the way?
Title: Re: Coffee Roguelike
Post by: Duke "Tape" Eiyeron on August 23, 2015, 07:28:56 AM
As I said I already have solutions. I just have to program them. And yeah, I will publish gifs of the other project.
Title: Re: Coffee Roguelike
Post by: Dream of Omnimaga on August 23, 2015, 03:12:25 PM
Ah ok I didn't gather that from your previous post. And good to hear :)