18
making a simple rpg app
(lemmy.blahaj.zone)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
It's just supposed to show the status of my character. I want to enter short commands for different stats. Ie asking for health = it shows my hitpoints and wounds I received. Asking for skills = it shows how much I have to add to my skill checks. And of course dice rolling, with adding numbers. Those don't even have to be direct stat rolls, like "roll dex", but just "roll 1d10+4".
That's it. I will use an old phone for this, mounted to my arm as a cyberdeck, and want to make it visually like 80s hacking. Basically with the visuals of coding.
I used to work for a ttrpg company. A dice parser is not a small undertaking. You’re basically writing a calculator with an embedded random number generator. It’s fun but not an easy first project. My advice would be to keep it simple to start with and have your command interface (repl) just accept simple roll commands like roll dex and that handler knows how to make a dex roll. Simple roll commands like roll d6 are also easy to parse out with just a regex. Honestly, I think you would be better off writing a gui app and give it a retro hacker look than going with some type of terminal. Typing on phones is a pain vs tapping buttons.
Thanks for the advice! I am not a big fan of carrying my heavy laptop around, but are probably right about writing on a smartphone
Yeah that sounds pretty doable.
Of course, stuff like "add X to inventory" And add hp would be good as well
you could check textual, it's a TUI framework that yields quick results.
Thanks! Do you know if the end product will run on android?
it will run in termux and on anything that can run a full python. Also you could run it remotely via ssh. Textual also offers a web interface to access apps via browsers but I never looked into that.
Thank you! I'll look into it