Fyrox icon indicating copy to clipboard operation
Fyrox copied to clipboard

Isolated Examples or Game Templates?

Open Swivelgames opened this issue 1 year ago • 8 comments

It'd be an awesome way to jump start new users into the game engine if the examples were isolated, or if there were "Game Templates" that provided some pre-implemented game mechanics like the examples show.

Primary motivation here is that the format that the examples are in, and the format that the init script produces, don't immediately parallel.

It would be super helpful if each of the examples were isolated, potentially following a similar layout to fyrox-template init. Although, that could potentially result in duplication of a lot of code.

A bigger ask would be to add an option to fyrox-template init like --example x that would initialize the project with the example implemented in it. That would make it incredibly easy to dive right in and start tweaking different things, while following the layout that init implements.

Summary

  • examples/ dir does not parallel fyrox-template init layout, potentially making it difficult for newcomers to understand how the examples apply.

Possible Solutions

  • Add fyrox-template init --name x --example y to initialize a new Fyrox project with the specified example already implemented
  • Update examples/ to follow fyrox-template init project layout

Swivelgames avatar Sep 03 '23 09:09 Swivelgames

You absolutely right. I though about this many times, but postponed it since I was quite busy in real life and had forces only to implement engine's must-have functionality. I also thought about adding a standard modules, such as character controller etc. to have the most common parts ready to be used right away. Now I have more free time and could start implementing all of this.

mrDIMAS avatar Sep 03 '23 13:09 mrDIMAS

So, I created a separate repo for the demo projects - https://github.com/FyroxEngine/Fyrox-demo-projects. Now I'll gradually add more and more projects to it and when there will be at least few medium sized demos, I'll delete all the outdated examples from ./examples directory of the engine.

mrDIMAS avatar Sep 13 '23 19:09 mrDIMAS

Nice! I like it! This is great. There are so many good examples in ./examples, but having them mirror the layout of fyrox-template init will be super helpful.

Swivelgames avatar Sep 17 '23 07:09 Swivelgames

Yeah, I'm currently transferring some of them. However, some of them are kinda useless now, because they were made when there was no editor and the stuff the code does in the examples can be replaced by doing the same in the editor.

mrDIMAS avatar Sep 17 '23 09:09 mrDIMAS

Also, I'll try to add web versions of examples (WASM-based) to the website, because right now the examples there are... not good to say the least. This will take some time though, since I'm fixing bugs in parallel with this. I'm keep finding small issues here and there 😕

mrDIMAS avatar Sep 17 '23 09:09 mrDIMAS

@mrDIMAS Nice! That's good, though. Doesn't make for fast pace, but definitely adds to the stability of the engine, I imagine.

Swivelgames avatar Sep 17 '23 20:09 Swivelgames

@mrDIMAS I can update it for you.

Riddhiman007 avatar Oct 20 '23 00:10 Riddhiman007

I'll make one --template arg after somedays

Riddhiman007 avatar Oct 22 '23 04:10 Riddhiman007