Re: Game Engine

Hello,

I’m no expert on game engines or even game design, so I might not have the correct understanding of the underlying concepts here. I don’t know how well a Minecraft clone would perform under an entity-component system. I looked at your github project and you appear to have eschewed ECS, at least for the trivial implementation of your “chunk”.

My understanding is that under an ECS, you would have an actual array of instantiated entities instead of a single array of u8 integers. Each entity would have a position, texture reference, flammability, monetary value, weight, etc. packed together. So when you go to render blocks, that extra information would clog the cache and hurt performance.

Contrast with say, storing separate arrays to hold texture references, flammability, value, etc. Then only iterate over the specific array you need at the moment.

Amethyst bills itself as an ECS-centric game engine. If I am correct about the nature of entity-component systems, why Amethyst?

~Max

2 Likes

An ECS bunches up the Data in an easily processable format, unlike Objects. This makes Multithreading much easier as only the Data you need is accessed and not literally everything else. Do you need someones Coordinates to apply a Poison Effect on their Health? I do not think so, so the Coordinates are not retrieved from RAM. :wink:

What you are explaining as an “instead of ECS” is literally what an ECS is actually doing.

And I chose Amethyst because it is a still ongoing Project so people actually update it, while also being somewhat easy to use, from what I made with the Examples so far, before I ended up with a Factorio Addiction interrupting my coding process for a couple weeks. XD

The Block-Chunks will be stored in an Octree, so I can generate lower block resolution images for very far away things like Mountains (as mentioned in my other reply earlier). Each type of “Block” will only exist once and then referenced by the Octree, but Blocks can be generated on the fly too, in case someone does Microblock-like things with a Chisel of sorts.

Blocks will also have the ability to point towards an adjacent block and say “whatever thing I am part of is in that direction”, which can then chain until a central block that knows “I am a Pickaxe placed on the Floor”, so if you click that one Block it will point to another which points to another until the Pickaxe core block is found and execute the “pick up Item” Routine from that Block, which will recursively remove all Blocks that point to the Pickaxe Core along with the Core itself ofcourse. While Trees will use a similar System, they would be handled differently sine you can partially chop them up or trim them.

Oh and Pickaxes and other small Stuff will use something like Microblocks for display, when the Item is on the Floor. The Octree can go really High Resolution if needed, while staying Low Resolution for everything else. I plan for the Resolution to go as deep as a 32x32 Texturepack in Minecraft, which would be half the length of a single MC-Microblock dot.

Items will only be Entities in Situations comparable to falling Sand Entities in Minecraft, so only when they are thrown or falling or whatever, they will be Entities and once they are in a resting State they will become part of the Block Grid.

1 Like

Two things,

Hardware limitations

Amethyst is built on Vulkan and Metal, which means Mechaenetia will use Vulkan for graphics (Metal is a proprietary API from Apple). You are going to have a rough time getting older hardware (say, pre-2016) to work with that. Luckily there appear to be Vulkan drivers for your Raspberry Pi devices.

Amethyst Engine Drama

I’m even newer to Rust and Amethyst than you are, but at first glance it looks like

  1. the Amethyst project has stalled as of late, due to issues with project organization and a side and/or sub-project named “Legion”. Further,
  2. it appears that the Amethyst project is currently focused on two-dimensional games. Finally,
  3. an unstable fork project named “Bevy” seems to be (politely) stealing Amethyst’s thunder.
1 Like

Pretty sure Vulkan existed a couple years before 2016, even if it has not been used that much. And I am gonna use super basic Graphics, so it wouldn’t be hard to compile it for different Systems.

As for Drama, who the fuck cares. Once something is compiled it doesn’t need to download any APIs or anything from Rust, it is just done and compiled and working, no need to modernize. :wink:

1 Like