SamuKata
Lu Wilson
Lu Wilson

patreon


Speedy Splash

It's time... for the weekly...

🐸🐸 TODEPOND TIMES 🐸🐸

What's new this week?

Video Vote

The vote for the next planned video is open! Thank you everyone who has voted already! If you haven't voted yet, you can do that here!

As I mention in the vote, the next video I release will be ✨ Drag & Drop (name pending). So the vote is for the FOLLOWING video.

I did plan on doing two videos in January, but I got a bit delayed from catching COVID (and over-editing a video). So I think my second video will be a bit late unfortunately. Let's try for a 2-video February instead! I do like to try to set tricky goals for myself, because it motivates me to work hard and stay focused (which I enjoy)!

Oh, and don't worry if your favourite doesn't win the vote! Hopefully, I'll make all of those videos eventually!

Splash

In preparation for the next video, I have made a new colour system.

I've previously made a TodePond colour theme. I use it in all my projects, and I like to tweak+improve it over time. I find that I get choice paralysis if there are too many colours to pick from, so it helps me a lot.

However, sometimes I need more variations of colours. For example, sometimes I need a 'slightly darker blue' or a 'slightly redder orange'. To get these, I could take an existing colour, and edit it slightly.

But this leads me back to square one! Choice paralysis! There are TOO MANY colours to pick from, and I never know what to settle on.

So... I made a new thing that I call 'splash' colours. A splash colour is a number from 0 to 999. Each digit of the number represents a different colour value. The hundreds represents how red it is. The tens represents how green it is. The ones represents how blue it is.

This means that there are only 10 choices for each 'channel', which is FAR LESS choice than there usually is. So far, this is helping my choice paralysis quite a lot. And it will also be great for the drag&drop interface that I am building for the next video!

By the way, the colours represented by each splash are NOT evenly spaced out. I hand-picked them so that they result in colours that match the TodePond colour theme (as best as I could).

Cell Performance

For the next video, I've been rewriting the Cells in Cells in Cells engine. I need it to be a lot faster, and a lot more flexible.

- TECHNICAL STUFF INCOMING -

Usually, cellular automata engines consist of a grid of cells. Each cell is usually numbered with integers representing their x and y position. For example, {x: 25, y: 50}. You can access different cells by looking them up in arrays, like... cells[25][50]. This works well when there is a fixed number of cells.

But for my engine, I need the position and size of cells to be able to change over time. Instead of using integer co-ordinates, I've gone with floats instead. For example, {x: 0.25, y: 0.5, height: 0.1, width: 0.2}. I've then stored these in an unordered set. I would say that this is more similar to how a simple game engine would handle entities.

Looking through a giant set of cells is slow, so I've split up the world into many smaller chunks. When you search for a specific cell, you can do this much quicker by just looking in a small region of space. Since making this, I've been told that this is called spatial hashing?

This makes splitting+merging cells quite simple and fast. And it also lets cells behave quite quickly.

NOW WE NEED TO DRAW IT QUICKLY.

Instead of drawing the whole screen each frame, the engine only draws cells that change colour. This speeds up things a lot. But there's a slight problem - what if you want to move the camera? Say... what if you want to zoom in? or pan? Every cell would need to be re-drawn.

To try to fix this I've tried two things. Firstly, instead of redrawing each individual cell, it tries to just take a 'snapshot' of the whole screen, and transform the pixels of that directly. This results in it looking a bit blurred and imperfect, but it does a decent job!

Secondly, I've made it GRADUALLY redraw random cells over the course of a few seconds. This makes it look like a ray-tracer engine because it produces a sort of 'dither' effect. The more cells and pixels there are to draw, the longer the dither takes. I kinda like the visual of it!

- TECHNICAL STUFF FINISHED -

Discord

Thanks to everyone for taking part (and/or lurking) in the TodePond discord server! Some highlights this week include... Froggair! Tetris OS! and Viscuit!

I like it being quite a small, friendly place, so I won't go posting the invite link EVERYWHERE. But I think I will start hiding it in hard-to-find places... like... the developer console... or the source code of a project... or as an unlockable easter egg in SandPond. Maybe some curious tode-minded people will find it that way, and it'll feel special.

Please do feel free to invite any tode-minded individuals though, if you would like!

To all my patrons (new and old): Thank you so much for supporting me continually! It means a lot to me! See you next week... 🐸⭐

Comments

Thanks! Glad you liked it! Let's see how this goes :)

Lu Wilson

I loved hearing about how you optimised your Cells in Cells in Cells engine! It looks like it's coming along really nicely! Looking forward to this month's video! (and next month's too!)

Magnogen


More Creators