Jump to content

Rithmatist: The Game


smartycope

Recommended Posts

I'm a bit of a programmer, and I was relistening to the Rithmatist when I realized I could program the magic system! (My original idea was to create the magic system from Elantris, but with the Rithmatist it's more of a game (i.e. duels), and way easier to program)

It's far from finished, but I have a basic framework set up and it's moving smoothly. The code is currently on a private repo on github (I wanted to keep it private for now because I feel like I could run afoul of copyright law somehow), but if anyone wants to help me, email me and I can let you in!

Link to comment
Share on other sites

On 10/10/2020 at 1:01 PM, smartycope said:

I'm a bit of a programmer, and I was relistening to the Rithmatist when I realized I could program the magic system! (My original idea was to create the magic system from Elantris, but with the Rithmatist it's more of a game (i.e. duels), and way easier to program)

It's far from finished, but I have a basic framework set up and it's moving smoothly. The code is currently on a private repo on github (I wanted to keep it private for now because I feel like I could run afoul of copyright law somehow), but if anyone wants to help me, email me and I can let you in!

I volunteer myself up, for playtesting... :P 

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 2 months later...
  • 1 month later...

The strength of a segment of LoW in the book is based on its curvature, which could be calculated with a bit of calculus to get a different strength value for every point in the LoW. The real problem will be chalklings. How will you make them work? The glyphs for controlling them seem like they'd be around as complex to implement as the other lines, but how would the game judge how good the chalkling drawings are?

Link to comment
Share on other sites

Honestly, I had some vague concept of taking a few points before and after a given point and getting their slope, but using calculus makes way more sense. 
As for chalklings, yeah, I have no idea. I’ve just been ignoring them for now, because they’re the looser bit of the magic system. I have a vague idea of using something in place of chalklings, like an x, or some other small shape that I can evaluate, then creating a premade chalkling in place of it. 
Also, I think I’m gonna rewrite it all in python, because python is just so easy. 

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Is this still a thing? I myself have been trying to make a Rithmatist game using C# in Godot and would be interested to see if we could share. I also suck at coding but it's fun so I still try to do it anyway.

Also, I don't think that copyright law should be a problem here since Mr. Sanderson himself said that he's fine with fan games.

Link to comment
Share on other sites

  • 2 weeks later...

Hey, that's funny. I started porting the project to Godot myself not to long ago. I used GDScript though, I don't know C#. GDScript is pretty nice anyway.

I didn't know that. That's nice. I'll see if I can dig out the files and make the repo public. We should definitely share. 

Link to comment
Share on other sites

That's awesome to hear! Super funny that you're porting to Godot. I do think that you had the right idea with writing from scratch with C++ being the ideal way to work with Rithmatics, since the wacky way that rithmatic things work makes typical collision detection algorithms a little bit weird to use. But understanding collision detection is difficult so I think taking the baby step of having a pretty decent but inefficient proof of concept in Godot is the best option, at least for me, towards the end goal of chalk starcraft on a tablet.

We should still be able to share stuff even if you're using GDScript, since Godot Mono is able to handle scripts that have both. I'll get a github and make a repo (yes I know, I want to learn how to program and don't even know how to use github, it's kinda pathetic).

I actually started my Rithmatic journey in python since pygame makes it so easy to create a window and python is an easy language to use, but I pretty quickly figured out that handling physics was really unfriendly...

I made the jump to Godot and GDScript after a week or so of not making good progress with python. I really like GDScript too; it's really great for writing short scripts fast and navigating around the scene tree. I definitely want to do UI stuff in GDScript.

However, having static typing, interfaces, and the ability to extend your own classes make C# a much better choice for dealing with Rithmatic lines in my mind. So much so that I actually ported over everything to C# after I had gotten to a good place with all of my detection algorithms in GDScript. The class extension thing really seals the deal in my mind. The central line of warding of a Rithmatic defense and reflected lines of vigor are going to have to have different properties than their typical drawn counterparts (namely that central lines end a duel when they're breached, and reflected lines are formed one point at a time) so being able to have them be different classes that extend the same base class is really really nice. I also like the idea of being able to have "perfect" rithmatic lines that could be made in a theory editor that would be initialized differently as well.

Crunchy Stuff

My code is basically all uncommented, so I'll try to explain where I'm at right now at a broad overview level.

Drawing lines with the mouse feels really good and is basically in its final form. I use this spline interpolation algorithm and Godot's Curve2D in order to make smooth looking curves with evenly spaced points. I might adjust the spline handle detection in a manner to make perfectly drawn circles to really be perfect, but that's really only going to really have a significant impact for circles that are either too small to be actually useful or drawn at totally inhuman speeds, so I probably just won't.

Line of warding detection is almost good, but you're currently able to get away with drawing double circles in a single stroke to get a doubly strong line of warding. It's not a very hard fix and I'll probably deal with that tomorrow, but just a heads up.

I'm really happy with line of forbiddance detection. I basically made a formula to calculate a least squares regression line independent of axes and it works like a charm. There may or may not be (I legitimately don't know) a possibility of failure when a line is drawn at exactly 45 degrees from the horizontal because of less than/greater than/equal to shenanigans, but I've yet to encounter it after hundreds of lines drawn.

Line of vigor detection is off to a good start. A well-drawn sine wave will turn into a line of vigor that looks like it. However, a somewhat poorly drawn sine wave will straight up fail even if it isn't that bad, since I just have an estimation algorithm based on peaks and troughs without an actual regression at the moment. I've figured out the math for the regression (I think), but implementing it requires getting matrices to work which is annoying so I've been putting it off.

There are no lines of making at the moment.

Have to go now, I'll write more later...

Edited by CrypticSpren
Link to comment
Share on other sites

Wow, okay, you might actually be further along than I am. I feel a little chagrined. I started off doing it in python with pygame too, then switched to C++ a while after (I honestly don't remember why, it was a while ago), and then switched to Godot after that, but didn't get too far. At that point I didn't know Godot that well, so I worked on some other projects in Godot just to learn it. I've been meaning to get back to it, now that I know how Godot works a bit better, but I haven't yet. I didn't know that you could have 2 different language scripts in the same project, that's pretty cool. I've only ever tried to use GDScript.

I'm much better at programming than I am math, but I figured out good detection algorithms for all the different lines, except Lines of Vigor (which was mostly done, and I'm very proud of it, but there's a couple bugs yet to be worked out. I don't remember what they are, it's been a while since I've worked on this project), and Lines of Making. Short of a full-blown neural network, I can't think of a way to detect Lines of Making, so my idea (that I haven't implemented yet) is to draw them beforehand in a specialized menu or something, then draw something simple that we can recognize, like an X or something, and just replace the X with what they had drawn before.

I didn't have the lines doing anything though. I just had a window that you could draw lines in, and it would tell you which line you just drew was, and how accurate it is. I hadn't really gotten to that point, and then I mostly finished the detection algorithms and was like, "Cool! Now.... how do you write a 2D physics engine by hand again? Yeah, let's work on something else...". I honestly switched to Godot because of that, and I didn't want to do the menus by hand. Godot just takes care of so much hard stuff for you. I believe I had a basic imgui menu hard-coded in, but it wasn't very pretty. 

 

Here's the git repo, but it doesn't include any of the GDScript files I started porting. I don't think I got very far. I'll try to dig them up and push them.

https://github.com/smartycope/Rithmatist-Game

Link to comment
Share on other sites

You definitely have some cool stuff that I don't! The stochastic drawing and chalk texture probably make your version feel like drawing with chalk. I just have drawing a white line with the mouse. I'm sure you have some other things as well that I just don't see because the godot project doesn't actually run.

It probably sounds like I'm a lot further along than I am. I have line interactions but they're super janky. This is also my first project in godot, so it's a learning process for me as well. Right now the way that segments of lines of warding and forbiddance work is hot garbage and needs to be completely rewritten. Also I used a kinematic body instead of a raycast for lines of vigor for some reason which is just really stupid. So that needs to get changed too.

I'm not particularly good at programming, but I enjoy it. I'm fairly decent at math (I have some familiarity with vector calculus) though I'm certainly not a pro. And I haven't studied geometry since 8th grade, so I'm definitely going to struggle when nine-point ellipses enter the mix (if we get there). I'm happy to write up whatever math equations I do come up with though!

As for lines of making, I think the BYU version had a really good take (look at this https://rithmatist.herokuapp.com/gameplay/). Getting bind points to work is the first priority in my mind though, since it's the primarily the pretty defenses that makes Rithmatics appeal to me.

I made a separate post with the github link, but I'll post it again here for convenience https://github.com/CrypticSpren/Rithmatics. If you open up a godot mono project and pop in the main folder everything should work.

Link to comment
Share on other sites

  • 1 year later...

This is definitely a thread necro, and I haven't been active on the shard for years, but I've been fantasizing for about a week about a MOBA-ish take on the Rithmatist's magic system.

I'm imagining a third person game more focused on tactics of what to draw when instead of actual drawing, because the only way to make it control naturally would be to use vr which seems restricting.

Circle fidelity would be determined by some sort of skill check. Chalklings would come from a predetermined list with specialties and weaknesses and each would take a certain amount of time for your character to draw. Lines of forbiddance and vigor would just be point and click.

I like the moba aspect because multiple rithmatists running around on a dueling field drawing chalklings and lines of vigor, and then settling down to make a proper defense for teamfights sounds really epic to me (tell me if that doesn't sound as fun to you lol). Also there would be lots of opportunity to add our own mechanics to balance it, especially since there's no sequel for additional source material haha :(

The biggest things tho are that I know very little applicable programming for making a game and I leave on my mission in a month so I wouldn't be able to work on this for a while. But tell me what you think!!

Link to comment
Share on other sites

I LOVE that 3rd person idea, that's fantastic. Probably more fun and less math too.

This project isn't dead, but it's not really alive, either. I haven't worked on it in a while, realistically don't have time for it, and don't expect to for a while. If someone wanted to pick it up and take the lead, I'd definitely pitch in though.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...