AtomicGameEngine / AtomicExamples

Examples for the Atomic Game Engine
https://www.AtomicGameEngine.com
96 stars 58 forks source link

Simple Self-contained Hello Triangle #92

Closed Alan-FGR closed 7 years ago

Alan-FGR commented 7 years ago

The idea was to have a gradual path showing how to manually display stuff on screen, but that's surely not going to be easy to maintain if the API changes. I was planning to have a HelloTriangle show vertex colors and the HelloQuad texture coords and using indices, but maybe that belongs somewhere else, maybe a tutorial series on my blog.

Alan-FGR commented 7 years ago

Very minor update. @JoshEngebretson: do you think it's better to add vertex color to the quad example? I think it's OK to have a less simple example as long as it's clear and simple enough to understand (with the help of comments) without knowing the API. In my opinion we should avoid using a "Sample" base class for these simpler examples, and also try not to use external dependencies like assets. I'm not sure if the CreateQuad function is doing any good or if it's better to not have it. Maybe in the future we can have a progressive 'tutorial' series of examples, maybe with the help of some wiki pages to explain and walk the user through them, maybe very basic examples on rendering, input, audio, UI, and putting all of that together. I don't know however how much that's important compared to a tutorial on the 'normal' way of using the engine with the built-in ECS.

Alan-FGR commented 7 years ago

@JoshEngebretson: It renders fine but we sure could use some additional API. Yes, I agree we don't need HelloTriangle, if you think HelloQuad is simple enough then yeah, we could get rid of HelloTriangle. It still needs better comments though and I'm not sure if the approach I'm using could be better... maybe with sequential layouts. I'm going to review all comments once we have something worth showing. I think a "Cookbook" is very appropriate for this kind of code, yes.

Alan-FGR commented 7 years ago

I don't know if we can go any simpler/easier with the current API.

JoshEngebretson commented 7 years ago

Ok, great, can you remove the HelloTriangle and move HelloQuad.cs to AtomicExamples/Cookbook/Graphics/HelloQuad.cs and I will land

We can follow up with any additional issues

Really nice work on this, thanks! 👍

Alan-FGR commented 7 years ago

Sure, I'm not on my PC at the moment so I just have to figure how to do that in the web interface :).

Alan-FGR commented 7 years ago

Heck, you can't delete directories: https://github.com/isaacs/github/issues/225 Man, that sucks so much... In 2 years I could probably teach a chimpanzee to add a button to remove dirs :P

Alan-FGR commented 7 years ago

Just a reminder: We still have to deal with the pesky Octree 🔢🌳 😄

JoshEngebretson commented 7 years ago

Thanks, LANDING! ✈️