- Edited
Hi All,
-----boring preamble - skip the next two paragraphs----- Ok, probably some seriously naive questions coming up... First a bit of history: I started programming in BASIC on my old Sinclair ZX81 in the late 80s (a fair bit of BBC Micro too at school). My first proper computer was an Amiga 500 around 1989/1990, where I got big into 68K asm and coding games on the bare metal :-) By the mid/late 90's I was mostly using SAS C/C++ for all coding (still heavily Amiga based, but got into the habit of making code portable around this time). Then I moved into a different field entirely.
Around a decade ago, I got back into coding with Obj-C on the iPhone, and developed a little 2D RTS (very rigidly adhering to the MVC paradigm) which managed to bring in a nice little income... Again life moved on and I dropped coding for a while. When my first child was born in 2017, I had a bit of spare time so I ported my little RTS game model code from Obj-C to C# for use in Unity3D. This worked quite well, but Unity is a very "heavy" engine really geared towards 3D, and now Godot support C# I have decided I want try using Godot which is far better served with UI components.
----here begins the discussion topic---- So I have a collection of classes in C# which expose an interface via the "Game" class, the game runs pretty much as a black box (only needing a timer to call the Update() method at a defined interval), and can be queried to update the interface with information about the state of the world (I have implemented callbacks, so the game model code can update the interface etc...), etc...
My first instinct has been to load the game model code as a script in the Scene root node; This can then create an instance of the Game class, which then using the _Process() method to run the game model. Now I have built a UI (and I think figured out "signals") in the Node2D tree which can provide user input back into game object, but to give the user feedback about the state of the game world I am trying to use a Canvas object which will query the Game object and updates its graphical state as required... can't really get this to work at the moment...
This seems to be a very clumsy approach to structuring a game in Godot, negating the use of the engine, would I be better served rebuilding my game model using Godot nodes, or some other way? Godot is quite different to how I normally think.