Dragon banner

Dragon & Fox
Collective

Fox banner

.

Published by Jady on 8/3/24, 1:44 PM

camerahead skibidi toilet

oh yeah, the engine hiatus is on hiatus, it's back to unity for now

Future Jady Edit: SIKE this is when I found out Bevy existed so this is when we switched to that

Update

Published by Jady on 7/5/24, 2:15 PM

Update on what I've been doing: I went back to working on the game engine and I've been making a lot of progress. My current goal is to have every part of the editor editable in the editor, which, by the time that gets done, should mean it's fully possible to make games in it :D

TLDR I've gone from having a code-centered workspace with an editor on top of it, to having the code in the editor, which allows for way more flexibility and cuts down on all the tedious boilerplate I was having to write, which was part of the reason why I wanted to write my own programming language in the first place. So now I'm just faking it til I make it :3

the baby code is you

Published by Jady on 6/12/24, 7:09 PM

my roommates keep telling me i'm programming baby code in ms paint, when i'm doing stuff like th is

Another helpful tip

Published by Jady on 6/5/24, 10:23 PM

Friendly reminder to cut your losses! I could spend an extra two weeks rewriting part of the Cetus compiler to be all sorts of safe, at the cost of my sanity. Or, since I know I'm gonna be rewriting the whole thing in Cetus in a while anyway, which is way easier to do these certain things in, I can just wait it out. So, no spamming generic classes everywhere.

Fewer syntax definitions

Published by Jady on 5/23/24, 11:36 PM

I've narrowed down all the syntax definitions to just a few lines of really flexible code:


IToken fieldToken = new TokenString([new ParameterValueToken("fieldTypes"), new ParameterValueToken("fieldNames")]);
IToken parameterToken = new TokenString([new ParameterValueToken("parameterTypes"), new ParameterValueToken("parameterNames")]);
IToken varArgParameterToken = new TokenString([new ParameterValueToken("varArgParameterType"), new LiteralToken("..."), new ParameterValueToken("varArgParameterName")]);
AddFunction(ContextType.Program, Functions.Program, 100, new TokenSplit(new PassToken(), new LiteralToken(";"), new EOFToken(), new ParameterExpressionToken("statements")));
AddFunction(ContextType.Program, Functions.Struct, 90, new TokenString([new ParameterValueToken("name"), new TokenSplit(new LiteralToken("{"), new LiteralToken(";"), new  LiteralToken("}"), new TokenOptions([fieldToken, new ParameterExpressionToken("functions")]))]));
AddFunction(ContextType.Program, Functions.Function, 80, new TokenString([new ParameterValueToken("returnType"), new ParameterValueToken("name"), new TokenSplit(new LiteralToken("("), new LiteralToken(","), new LiteralToken(")"), new TokenOptions([parameterToken, varArgParameterToken])), new TokenOptional(new TokenSplit(new LiteralToken("{"), new LiteralToken(";"), new LiteralToken("}"), new ParameterExpressionToken("statements")))]));

AddFunction(ContextType.Function, Functions.Declare, 100, new TokenString([new LiteralToken("Declare"), new ParameterValueToken("type"), new ParameterValueToken("name")]));
AddFunction(ContextType.Function, Functions.Define, 100, new TokenString([new ParameterValueToken("type"), new ParameterValueToken("name"), new LiteralToken("="), new ParameterExpressionToken("value")]));
AddFunction(ContextType.Function, Functions.Assign, 100, new TokenString([new ParameterExpressionToken("target"), new LiteralToken("="), new ParameterExpressionToken("value")]));
AddFunction(ContextType.Function, Functions.Return, 100, new TokenString([new LiteralToken("Return"), new TokenOptional(new ParameterExpressionToken("value"))]));
AddFunction(ContextType.Function, Functions.Add, 30, new TokenString([new ParameterExpressionToken("a"), new LiteralToken("+"), new ParameterExpressionToken("b")]));
AddFunction(ContextType.Function, Functions.LessThan, 40, new TokenString([new ParameterExpressionToken("a"), new LiteralToken("<"), new ParameterExpressionToken("b")]));
AddFunction(ContextType.Function, Functions.While, 100, new TokenString([new LiteralToken("While"), new LiteralToken("("), new ParameterExpressionToken("condition"), new LiteralToken(")"), new ParameterExpressionToken("body")]));