this post was submitted on 26 Jul 2023
13 points (100.0% liked)

RoguelikeDev

280 readers
1 users here now

A community of roguelike developers. Discuss work-in-progress roguelikes and a broad range of roguelike development topics.

Wormhole

[email protected]

Icon base by Lorc under CC BY 3.0 with modifications to add a gradient

founded 1 year ago
MODERATORS
 

Two years ago I started to follow RogueBasin's roguelike C++ tutorial, a somewhat outdated tutorial in term of good practices and C++ version, but very on point in term of roguelikes.

My goal when I started Pataro what quite ambitious: I wanted to make a modern C++ roguelike from the tutorial, and write an updated version of said tutorial to help the community! Even better (or worse, in term of choosing your goals) I thought I could make a modern C++ roguelike library for people to use.

I got the first 9 parts of the tutorial working pretty smoothly, having set up an architecture inspired by Bob Nystrom about game architecture with roguelikes in mind (great talk by the way: https://www.youtube.com/watch?v=JxI3Eu5DPwE). Then I got to a big hurdle: saving and loading. Having used a lot of polymorphism, it makes quite hard to load correctly things and I stopped there.

progress as of june 2021

Then a few weeks ago, I picked up the project again, with a much lower set of goals in mind:

  • finishing to implement the tutorial from RogueBasin
  • ease the configuration of the project, so that people can pick parts of it or just make a roguelike from it
  • fix a bunch of problems related to the map and how it is used to be able to extend it and modify it (imagine being able to have spells that could alter the map)
  • rearchitecture a few more things because it's still very rough on the edges
  • modernize the C++ code (again)

Progress as of july 2023

top 3 comments
sorted by: hot top controversial new old
[–] HexDecimal 4 points 1 year ago* (last edited 1 year ago) (1 children)

I saw some of your progress on Mastodon earlier.

The Bob Nystrom video was always one of my favorites. Breaking Dependencies: The SOLID Principles - Klaus Iglberger is another one I like which might be relevant to your C++ project. It might be late to apply those ideas now but it's something you can keep in minder for later. SOLID works well for game engines.

I apologize for not helping out much. I ended up struggling with my own projects too much to help out with others. These days I hesitate to work a project where the entities aren't implemented with an ECS pattern, including dropping many of my own projects. Entities not following the open-closed principle rapidly build up technical debt in my experience.

Serialization is a pain in C++. Some of the new reflection syntax might make things easier but that always seems far off. I've already recommended Cereal which is what I've used in the past. It supports polymorphism. It seems like you can't avoid some sort of boilerplate in C++ due to how classes work in C/C++.

[–] SuperFola 3 points 1 year ago

Thanks for the recommendation, I'll watch it and see what I can apply! The project is still rather small, implementing only the tutorial, refactoring now and doing things right will take a few weeks but that's still doable.

No problem, I understand that everyone has a life beside doing open source work, even myself I let the project aside for a lot of time. You providing libtcod to everyone in the community is already of great help!

Someone made a PR to add cereal to Pataro a while ago, the ground work is there alas it doesn't compile yet, and I haven't dug a lot, the project seems huge, luckily they seem to have great documentation so I think I can pick this up later this year when everything will be refactored and working a bit better.

[–] Tilted 2 points 1 year ago

This is inspiring. Thanks for sharing!