Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Cellular automata with ImGui + SFML + Bazel  (Read 5257 times)

0 Members and 1 Guest are viewing this topic.

zper

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Cellular automata with ImGui + SFML + Bazel
« on: November 02, 2020, 06:36:07 am »
Hi everyone  ;D

Currently, I am experimenting (and learning on the way) to work with SFML + Imgui with Bazel under the hood. Therefore, a new project arose - Game of Life!

It's a fun and interesting concept for simulating simple yet smart agent systems with cellular automatons. If you're interested in the project (or, at least, dissolve the "wtf" mist by reading the previous), feel free to enter into the realm of the "GameOfLife" Github repository -> https://github.com/zpervan/GameOfLife

Also, I would appreciate it if someone with more experience has some tips and tricks regarding SFML or general program design of the application.  8)

Thanks and stay safe!
« Last Edit: November 02, 2020, 06:40:35 am by zper »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Cellular automata with ImGui + SFML + Bazel
« Reply #1 on: November 02, 2020, 09:21:21 am »
Without looking at all the files, the SFML parts I've seen look good, maybe you should call window.clear(); in runner.cpp unconditionally (not sure what IMGUI does).

The state checking looks messy, why not an enum with running/paused/stopped?
Also, try to avoid global/static variables, they're often not needed with good design.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

zper

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: Cellular automata with ImGui + SFML + Bazel
« Reply #2 on: November 02, 2020, 10:29:52 am »
Without looking at all the files, the SFML parts I've seen look good, maybe you should call window.clear(); in runner.cpp unconditionally (not sure what IMGUI does).

The state checking looks messy, why not an enum with running/paused/stopped?
Also, try to avoid global/static variables, they're often not needed with good design.

Yeah, I had something in mind to do with enums, but this was a quick hack to have some simulation states. As for the global variables - I agree with you there also.

Thanks for the mini-review  8)

Feel free to add more suggestions, they are more than welcome!  ;D