Day 45 of making my own indie MMO without engine or team

So, I have been working on the simon says tool I mentioned to learn to play/improvise the piano alone. Had to watch quite a lot of youtube to have a very small understanding of how sound should move.

The objective is not to generate 'good' songs but mostly 'legal' moves that could be part of a song, to simultaneously train some intuition of where each key is, what sound comes from which key and what keys can go after a given key. (Edit to clarify: This doesn't use any AI of sorts, it's just generating something following very basic music theory, I know this could be improved by having the music follow a more constant direction, but the intuition I have behind this is that I'd rather practice myself using a superset of good moves that includes some bad ones, than constrain to a subset of good moves).

Regarding the synth, it is a triangle rn, with no effects, so it is annoying.

#woao #programming #coding #indiedev #gamedev #gameaudio

Day 44 of making my own indie MMO without engine or team

So, today I made some progress on integrating the datalog into my language parser, but more importantly I stumbled into Sebastian Lague's video on "Synthesizing Musical Instruments" while eating and that led me to spend the whole day researching the topic.

I think I already mentioned somewhere that I didn't exactly know how I was going to do music when I have essentially zero experience reading music sheets or playing instruments. Sebastian Lague's video felt very inspiring because I had really never considered that synthing something that sounds good enough could be seemingly so feasible.

Have been researching for some hours, I think getting a simple buffer going in CoreAudio and Pipewire, then implementing a couple of of oscilators and tools/effects to shape the note/octave/wave like Sebastian did is more approachable than CPU rasterization, which means I think I may be able to do it. This way I could hook this both to my engine for playback (since I love games that allow players to make their own scores like Archeage or Mabinogi did), and also use my small synth with raylib and some midi library to make a mini-game to train my brain to link note/chords/octaves with my cheap midi controller.

I don't know how dumb this plan is, but learning to sightread, to properly play an instrument, music theory, to use a daw and their filters... Seems like it would be fun, but an overkill for what I need to do, and very, very slow process.
Mostly because I believe that in order to make meaningful progress you need to have a very strong fast feedback telling you what you did wrong, and I'm going to have a hard time getting that any other way.

So, my vision for the learning tool is essentially making a simon says for music. It's a bit more complex than that because I want to ensure that it helps me build some muscle memory and I immediately get significant feedback for my hits/misses similar to when you play a game like Osu, but you can think of it like Simon Says.

Also, regarding pixel art, I've been working a few days making small sprites I plan to use to make a bigger 960x540 image, I don't know when I'll have that ready though.

#woao #programming #coding #gamedev #gameaudio
Days 42 and 43 of making my own indie MMO without engine or team

Yesterday I reached performance parity with souffle's datalog compiler on my tests, I was holding out this post in hopes that I would be able to beat it, and I managed to do so. My implementation may be faster overall since I only handle EAV form, but I won't claim it is when I haven't tested all different possible workloads (which can be a lot) in which souffle's compiler will beat it but these benchs were representative of the loads I expect.

So far I can only think of a couple more improvements I could do to get better performance:
  • Introduce some sort of sort of pgo. Right now I decide the order in which coditions are solved based on the size of the first query, but it may be better to profile it since that way I could avoid building some additional indices and save bandwidth there.
  • Shrink the size of the different entities and values encoding down from 25 bits to 18 (this would be a really nice speed boost but I don't know if I can do this yet).
  • I have this idea to make resizing of hashtables faster at the cost of making probing slightly slower, but since it would change significantly the hashes It'd be hard to empirically measure if there have been any measurable, reliable gains or not.
Either way I'm mentioning this as a way to log them in case I want to check them out in the future. Since this is the fourth or fifth day working on this, and it's currently a little over 9100 times faster than my original implementation. Beating souffle's compiled one with my interpreter (on my single-threaded benchmarks) is good enough for me, so I'll call it a day and go back to integrating this with my half-baked parser, then with my ir/jit, then into the engine to have aot scripting.

I also started reading the #gamewriting #kaleidoscope, It's a very interesting book, and I'm sure somewhere inside I can get an actual tip to execute on what I have in mind. I already talked in the past about how I want quests to work, I also mentioned I have a vague idea of how I will workaround my limitations to implement proper chat and instead go with canned phrases. But I have no idea how to execute the writing I'm thinking of, the closest reference I know of would be something like Magicka, or Bastion. I've been sharing my thoughts of the different chapters I've read elsewhere, because I'd like to focus here on my daily progress, but I'll eventually mention if I find what I'm looking for and whether I can recommend the book to non-writers or not.


#woao #programming #coding #gamedev #indiedev #langdev
Day 41 of making my own indie MMO without engine or team

Today I finally managed to beat souffle's datalog -> C++ code, it's funny how after a few hours trying, the change that got me over that line was walking back on the assumption that clearing the length of the indices in delta sets would be faster than just starting a new set of indices from scratch every iteration with new allocations. I tried to use a arena allocator to help reuse memory but the bookkeeping I need to add to the data structures made it slower.

This should have been it, the end of the datalog sidequest. But I made a critical miss roll on my sanity check and went ahead to ensure it was also better at facts/ms on my x86_64 desktop (spoiler: it was at 900k but not at 64M)...

I had a general idea of what was happening, but when optimizing you need to measure things, because it's very cheap. So, I spent a few hours trying to get Intel's vtune working on my AMD machine, then resigned and went with AMD uProf. It showed that most of my time is dominated by misspredictions and misses when trying to ensure that the hashtable slot I compute IS the slot of the fact or the index I'm trying to fetch (which happens like ~50% time, due to low load factors).

#woao #solodev #gamedev #indiedev #mmo #devlog #programming #coding

Day 40 of making my own indie MMO without engine or team

Today I continued optimizing my EAV datalog implementation. I really like how datalog is so powerful yet no turing complete, other languages like C++ templates take a hint.

After multiple optimizations... I'd say mine is competitive with souffle, of course I'd expect some specific scenarios or more complex tests to be worse than an AOT compiler for the rules like souffle, so contextualize this within my 900k and 64M derived facts tests. I should probably pat myself on the back and call it a day, but I can't stop when I'm so close to beating it, can I?

#woao #solodev #gamedev #indiedev #mmo #devlog
Day 34 of making my own indie MMO without engine or team

Today I finished editing and posted the monthly summary/devlog as I promised, it took me a lot of time and made a lot of rewrites but decided to maybe stop after realizing I had spent 17 hours in the two days I worked on it. Tomorrow I'll go back to coding if the coughing lets me sleep.

Also I did my third #pixelart sprite! I decided to participate in today's #pixel_dailies since it seemed like the perfect way to practice a bit drawing curves. I am quite happy with this one, it's not that I don't see any flaws with it, but I'd still be willing to include it in the game.

#woao #solodev #gamedev #indiedev #mmo #devlog #pixelart #pancake @[email protected]
Day 32 of making my own indie MMO without engine or team

Today I am even later, I really wanted to put out the monthly summary/devlog but It took me too long to write those 3k words and could finish the editing.
Will finish the edit and post it the 14th in order to avoid jinxing it.

That being said, today I did my second #pixelart sprite ever, I am so ashamed by it... Having to fit the book in a small space, and trying to get lines that look smooth with a perspective that doesn't look ass, and some proportions that look like that LOTR omnibus I used to read was really hard to me, not hard in a souls-like way like yesterday's but hard in a "I must have skipped the tutorial and all the puzzles that would build up to this one".

#woao #solodev #gamedev #indiedev #mmo #devlog #pixelart
Day 31 of making my own indie MMO without engine or team

Today I am pretty late, I spent most of the day researching and then drawing for the first time in decades, and probably for the first time without anyone forcing me to do so. It was kind of fun, but also hard, like playing your first soulslike. I decided to go 24x24 after measuring sizes of PoE2 at 1080p and scaling it down, but maybe 24x24 is too small for what I want to do in 960x540.

#woao #solodev #gamedev #indiedev #mmo #devlog #pixelart
Day 30 of making my own indie MMO without engine or team

I've made some progress on the IR for my JIT compiler, this is the 4th day I've worked on this so far and it's more draining to me than gamedev stuff.

The general idea is to have something that is a bit more high-level than assembler (as in: it's 'slightly' typed, shims instructions from other arches), but a bit more low level than C (no std, only register ops + memory load/store), that will be used only to implement memory unsafe data structures I'll be using for gameplay stuff for the scripting language (that will compile to this ir, and won't be turing complete).

So far I support:
  • add,sub,div,mul,rem,sl,sr,rl,rr,and,or,xor,max,min
  • not,clz,ctz,cnt,rbit,rbyte
  • jmp (risc-v inspired, can jump to block or to register, target block receives $return), I like that this design is tail-call friendly and has the concept of phi built-in.
  • copy/move/swap dst, src, len
  • cas, and memory load/store with packed layout (the intent is to add cabi/spirv layouts too)
I'm still working on:
  • error handling (I only have recursive descent parser errors), mostly because my typing is incomplete. Honestly this is such a pain to do in C... The good thing is that for now I'll only have .wu8/16/32 (wrapping ops) and .su8/16/32 (saturated ops)
  • x86_64 support, for now I have been working on aarch64 only since encoding aarch64 is really easy while x86_64 is not fun.
  • statement predication (stuff like op arg, arg ?eq($-1)), the idea is to use it to allow stuff like
add.wu64 $lo_a, $lo_b
add.wu64 $hi_a, $hi_b ?carry($-1)

I'm still thinking about how I want to handle stuff like vectorization and floating point operations, but that's not a priority since I only need the stuff to implement data structures here.

#woao #solodev #gamedev #indiedev #mmo #devlog
Day 29 of making my own indie MMO without engine or team

Today's update will be really short: Yesterday I was working mostly on tiny parser for the small JIT I made on day 4, I also implemented the SSRA allocator ( https://www.mattkeeter.com/blog/2022-10-04-ssra/ ) by @[email protected] (which if I understood it properly was actually first implemented by Mike Pall for LuaJIT).

#woao #solodev #gamedev #indiedev #mmo #devlog
The Solid-State Register Allocator