7DRL-like ⚔

I had planned to participate in 7DRL this year by making a roguelike for Blinks. However, I have a really difficult time doing game jams due to my day job and other family commitments.

I’m still going to try to do it, but it will be unofficial and using a modified schedule. I’ll start now and keep track of the time I spend on the project. I’ll keep my total time under 56 hours (7 days * 8 hour/day) and try to get it done by the 7DRL deadline of March 14.

I’ll use this thread to post progress.

2 Likes

lol of course I’m getting compile errors with simple programs
Interestingly, compiling with Bruno’s custom blinklib works fine, but the standard lib gives me this:

“C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc” -Os -g -flto -mrelax -fuse-linker-plugin -Wl,–gc-sections -mmcu=atmega168pb -T “C:\Users\Scott\Documents\Arduino\hardware\Blinks-SDK-1.1.0-GM\avr/linkscripts/avr5.xn” -nostartfiles -o “C:\Users\Scott\projects\build/roguelike.ino.elf” “C:\Users\Scott\projects\build\sketch\roguelike.ino.cpp.o” “C:\Users\Scott\projects\build/…\…\AppData\Local\Temp\arduino_cache_650348\core\core_Blinks-SDK-1.1.0-GM_avr_blink_f5b85855fa65c8e0ef1a5ed67936d89d.a” “-LC:\Users\Scott\projects\build” -lm
C:\Users\Scott\projects\build/…\AppData\Local\Temp\arduino_cache_650348\core\core_Blinks-SDK-1.1.0-GM_avr_blink_f5b85855fa65c8e0ef1a5ed67936d89d.a(startup.S.o):C:\Users\Scott\Documents\Arduino\hardware\Blinks-SDK-1.1.0-GM\avr\cores\blinklib/startup.S:71: undefined reference to `mainx’
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Blink.

Did you modify any files in the blinklib source tree? because it looks like that. :slight_smile:

Hm, yes I had, but it was limited to another project. Even that other project wasn’t compiling.

Strangely, I just tried again and it works. So probably related, but I don’t know what causes it for sure.

Thanks for the suggestion.

Time elapsed: 5h

Not a ton to show at this point so I figured I’d go over some design choices.

The game will be played with seven Blinks: one center surrounded by six in a ring. It just seemed like the simplest thing to do given the time constraints.

The player will always be in the center tile. The tiles will display the current room and the six surrounding rooms. If there is an exit, you’ll be able to click a surrounding tile to move your player into it. The view will then shift so that tile becomes the center and the other six update to show the new surroundings.

So tiles need to have assigned roles. There is the player tile, the six adjacent tiles, and any extras you might have attached during programming.

roleassignment

When the tiles start up they are in the init state (white). Clicking one will assign it as the player tile (red), which will tell its neighbors that they are the “adjacent” tiles (blue). All others will then turn off to signify they are not needed.

Of course, I need to support removing/adding tiles. So you can see where the tiles dynamically update as they are moved around the cluster. Any tile next to the player tile (red) turns blue. Any tile further out than that turns off. Things will break if you have two player tiles, but I’ll consider that user error since it shouldn’t happen by accident.

In the first five hours I have also started setting up data structures to define the room types as well as the level generation algorithm.

At the start, I decided to use @BGA’s custom blinklib to remove as many constraints as possible. In addition to the code/data storage gains, I plan to take advantage of the increased number of bits you can send on face values. More on that later.

3 Likes

Funny enough, someone pitched an idea like that to me but I did not get around to implementing it. Are you doing a persistent map or will it always be generated like in thalassophobia? I think that doing a persistent one (so you can backtrack) would be more interesting but then you are limited by the memory available. If you disable datagrams, you might be able to have over 200 rooms with some memory to spare for room specific data.

1 Like

Yeah persistent map. I’m trying to keep this close to traditional roguelikes. I’m using 4 bytes per room so I won’t get that many rooms on a given level, but that’s okay as long as it doesn’t feel short.

I definitely have datagrams disabled. That reminds me that I haven’t removed the dim() function yet, but maybe I’ll keep that for later when I’m getting short on space and need to eke out a few more bytes.

1 Like

Time elapsed: 18h

LOL I knew I couldn’t keep to the game jam schedule. It was a fun idea, but no big deal. I’ll just keep working on it like a normal project.

I have rooms rendering and the player moving between them.

The player character is the white face that is slowly moving around the current room. Walls are the orange color and empty space is green (all temporary colors).

Part of the design is that you are in constant motion. When you want to move to another room, you click that tile. The next time your player is on the adjoining face, she moves into the room and all the tiles update to show the new neighbors.

In the video above I only have three rooms. Just a proof of concept for my room generation and movement.

You’ll notice that the room on the left is half empty. My intention was to have open rooms connected by corridors. Kind of like in rogue as seen here.

image

However, I’m now considering removing corridors entirely and just have rooms be fully empty. This will simplify a lot of code for room generation, rendering, and movement. I never really had a design reason for corridors.

Next up will be adding enemies, room objects, and items to pick up.

Even though I’m not keeping to the game jam schedule any more, I will continue to mark time spent. I have a journal for this and for every entry I note whatever significant thing I did that day. It will be interesting to see how many hours it takes to get it done.

3 Likes

Just out of curiosity, when you move from one room to another, what are you propagating to the Blinks? Just the direction of the movement? Is it as face values (I assume using 3 bits?)

Anyway, looking good so far.

The center tile controls the game. The surrounding tiles just render what the center tile tells them.

I am purely using static face values - not the handshaking protocol I used before. Due to your blinklib I can increase it to 32-bits of face value. I use that to transmit all the room info. That will eventually include items, obstacles, and enemies.

I didn’t answer your question! When you click an outside tile, it sets a bit on the face value saying to move here when possible. The center tile sees that and waits for the player to reach the right wedge and then updates its room info as well as all the surrounding rooms.

There’s a single bit of handshaking in case the player clicks two neighbors, but it’s not the full command+data packets used in Terrarium and Dispel.

Time elapsed: 24 hours

Got the first monster in the game. It’s a… rat… I guess? I dunno, use your imagination. Here’s a video of me exploring a level, encountering a few monsters.

About 18 seconds in you can see two rats moving in their rooms. They move similarly to the player, going around in a circle, but have a random chance to pause and bite. You’ll see that in the lower one when it flashes red.

The idea is that the player can move into the space occupied by a monster and, if the monster is attacking (red) the player will take damage. Otherwise the monster will get hit.

These rats are pretty easy, though, so I took care of them all without a scratch. When the player attacks the monster the background flashes yellow. And since the rat is so weak, it dies and is removed. When the player gets hit, the background flashes red and the player loses a hit point.

I also added some ways for you to influence the player movement. Click and hold the button to pause the player movement. If you hold long enough (3 sec) then the player will switch directions. You will use this to approach enemies strategically. It will all be about timing and positioning.

Also, when moving between tiles, I made the game briefly show the player in the outside tile before resetting back to the center. There’s a brief pause too. I think this feels less jarring than having the game switch instantly.

The github page is here if you are adventurous. You’ll need to compile with the latest version of Bruno’s custom lib.

In the video, you might notice some of the tiles blink off and back on. I’m not sure what’s causing that. It’s almost like the face value is getting corrupted between the tiles, but I haven’t investigated yet.

1 Like

Could it be a face value timeout? Did you increase the associated custom blinklib timeouts?

I just checked and you are not touching the timeouts. Try adding something like this to your blinklib_config.h:

#define BGA_CUSTOM_BLINKLIB_SEND_PROBE_TIMEOUT_MS 200
#define BGA_CUSTOM_BLINKLIB_FACE_EXPIRATION_TIMEOUT_MS 250

I now installed your game here and I can confirm it was face timeouts. Adjusting the timeouts as I suggested fixes it.

Yessssss that seemed to have fixed it :smiley:
Thanks for the tip!

Time Elapsed: 26 hours

I added some items to the rooms. There are three so far: a locked door, a key, and the stairs to exit the level.

After generating all the rooms, the game populates all the monsters and items. First, it places the key. It tries to place it far away from the starting room and also guarantees that there won’t be any locked doors in the way to get it. Then it places the exit, putting it in a room at a dead end. Finally, it places a locked door leading into that exit room.

Picking up the key is done by moving over it. Unlocking the door can be done by moving over it when you have the key.

I’m also considering not showing the room on the other side of a locked door and adding more locked doors throughout the level.

1 Like