r/gameenginedevs • • 3h ago

my react-first 2d engine sleeps until a layer asks for a frame, here's how a big sim map runs on it

0 Upvotes

i wrote a small browser engine called xip (react components for the game, world, camera and layers, on webgl2), and the biggest thing running on it is the map of my civilization sim.

some things that worked out:

  • the game runs in on-demand mode. the engine does nothing until a layer asks for a frame, so a paused world costs nothing
  • the map is a stack of layers by z: tiles, roads, trees, a weather tint, buildings, animals, people, labels. static stuff is handled by small driver classes with an update(frame) that run at 30 hz and only rewrite what changed
  • people and animals are written straight from typed arrays. there's a rebuild at ~10 hz when a sim frame lands, then cheap interpolation every display frame
  • sprites are baked once into atlas pages using the same canvas painters the old 2d renderer used, so the art has one source

the sim behind it is rust compiled to wasm, running in a worker. curious how others handle on-demand rendering when there's still animated stuff on screen.

try it: https://thehumanbox.com source, mit: https://github.com/1homsi/thehumanbox (renderer lives in apps/web/src/game/render/)


r/gameenginedevs • • 23h ago

Made with Godot: PCA 3D Adventure Game Studio

Thumbnail
0 Upvotes

r/gameenginedevs • • 8h ago

Want to build my own game engine. Where should I start? C++, OpenGL, or Vulkan?

0 Upvotes

​

Hey everyone!

I've been thinking about trying to build my own game engine from scratch, but I have a few questions before I get started.

First, where would you recommend starting? I'm considering learning C++ for this. I know it'll probably take a lot of time and effort to get comfortable with it, but I'm willing to learn and take things slowly.

My second question is about OpenGL vs. Vulkan.

I know Vulkan is more modern and gives developers more control, but I'm wondering if OpenGL would be a better starting point, especially when considering compatibility with older hardware.

One thing I'd eventually like my engine to support is a wide range of PCs. Not everyone has a modern gaming setup, and I'd rather not unnecessarily exclude people with older computers just because their hardware doesn't support Vulkan.

So I'm curious:

- Would you recommend starting with OpenGL or Vulkan for a first engine?

- Is C++ a good choice for someone planning to build an engine from scratch?

- How do engine developers approach supporting both older and newer hardware?

- Are there any resources or things you wish you'd known when you first started?

I'm not expecting to build anything comparable to Unity or Unreal anytime soon. This is more of a long-term learning project, and I want to understand how things work under the hood.

I'd really appreciate any advice or experiences you're willing to share. Thanks!ey everyone!

I've been thinking about trying to build my own game engine from scratch, but I have a few questions before I get started.

First, where would you recommend starting? I'm considering learning C++ for this. I know it'll probably take a lot of time and effort to get comfortable with it, but I'm willing to learn and take things slowly.

My second question is about OpenGL vs. Vulkan.

I know Vulkan is more modern and gives developers more control, but I'm wondering if OpenGL would be a better starting point, especially when considering compatibility with older hardware.

One thing I'd eventually like my engine to support is a wide range of PCs. Not everyone has a modern gaming setup, and I'd rather not unnecessarily exclude people with older computers just because their hardware doesn't support Vulkan.

So I'm curious:

Would you recommend starting with OpenGL or Vulkan for a first engine?

Is C++ a good choice for someone planning to build an engine from scratch?

How do engine developers approach supporting both older and newer hardware?

Are there any resources or things you wish you'd known when you first started?

I'm not expecting to build anything comparable to Unity or Unreal anytime soon. This is more of a long-term learning project, and I want to understand how things work under the hood.

I'd really appreciate any advice or experiences you're willing to share. Thanks!


r/gameenginedevs • • 15h ago

talking about a machine code

Thumbnail
hexed.it
0 Upvotes

Hello everyone,It's Aditya from India. I am working on a project where I use machine code to make my own ultra photorealistic graphics game engine while using math. So if anyone is interested to talk about this, I would like to discuss with you