Tutorial Reboot Framework Suggestions

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
chili
Site Admin
Posts: 3892
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Tutorial Reboot Framework Suggestions

Post by chili » May 26th, 2016, 1:25 pm

So I've been developing a reboot of the Beginner tutorial series to correct a bunch of shit I wish I did differently and also record the stuff with the new tools like VS 2015 Community. Mostly this is to get some new blood into our little community here.

So what do any of the veterans (or newcomers) think should be added or done differently in this version of the framework? I'm all ears baby.
Chili

Pindrought
Posts: 432
Joined: September 26th, 2013, 4:57 pm
Location: Kentucky
Contact:

Re: Tutorial Reboot Framework Suggestions

Post by Pindrought » May 26th, 2016, 2:09 pm

Less dicks. More poo.
PM me if you need to contact me. Thanks to all the helpful people on this forum especially to Chili.

Nurlan
Posts: 22
Joined: January 4th, 2016, 3:45 am
Location: Saint-Petersburg. Russia

Re: Tutorial Reboot Framework Suggestions

Post by Nurlan » May 26th, 2016, 2:38 pm

You didn't explain the new version of you framework
What is an opposite of parallel.If you are engineer it is a series.If you are a mathematic-perpendicular

albinopapa
Posts: 3982
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Tutorial Reboot Framework Suggestions

Post by albinopapa » May 26th, 2016, 9:50 pm

Beginner series
- Coding basics; variables, functions, loops, conditions
- String manipulation using string/wstring and stringstream/wstringstream

Intermediate series
- Classes; constructors/destructors, RAII, access types,
- *1)File I/O using ifstream/ofstream instead of the C functions fopen/fclose on FILE*
- Resource management; unique_ptr, ComPtr.
- *2)Sprites; WIC (Windows Imaging Component), shaders, vertex buffers and textures
- Polymorphism, function overloading, templates, state-machines, recursion

Advanced series
- Math; *3) 2D/3D transformations, 2D/3D collision detection, *4)ray/line/plane/triangle/sphere intersections.
- Switch to 3D models, loading from file, creating vertex/index/constant buffers, creating samplers
- Advanced Shaders; Lighting, visual effects like blur and bloom.
- Bone/Joint animation

*1) Files are resources that need to be opened and closed, so it would kind of show a use for RAII if the file was put in a container, like unique_ptr and ComPtr.
*2) The Windows Imaging Component is just a image loader and format converter for various image formats. As far as sprites go, they would be textured quads rendered by the GPU, so you might have to cover everything that goes with it, but if the framework is already using a textured quad in order to display the system buffer, then you'd already have that setup and would just need to cover how it works.
*3) World/View and Projection Transforms. The DirectXMath API handles this, but you are kind of known for learning how the tools work, so I figured this would fit.
*4) Intersection tests can be useful for using the mouse to select players in a 3D RTS type game for example and collision detection.

All this hinges on you creating the framework in a way that already uses hardware acceleration. The beginner series can still be software rendering to a system buffer, and at the end of the frame, that system buffer is used to update an ID3D11Texture2D that is bound to a quad covering the entire screen. It's pretty fast, there's no cap on frame rate, like in the DX9 version of the framework. The point is to transition to hardware accelerated 3D a little quicker than your current route :).
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

User avatar
chili
Site Admin
Posts: 3892
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Tutorial Reboot Framework Suggestions

Post by chili » May 27th, 2016, 12:49 am

Yeah, definitely planning to use D3D11 for the new framework. Actually, I might implement support for both D3D9 and D3D11 via a #define, but I don't expect anyone will actually need that. Still, my laptop doesn't have dx11 support and I still use it, so I'm sure there are others in the same boat.

I'm debating whether I should do anything different in the Winmain/winproc department or the keyboard and mouse department. These are the things I'm contemplating right now.


As for the actual content of the tutorials, I am looking to get to 3D quicker. I might just cut all the state-machine/platformer stuff this time. I think state machines would be better introduced in the context of AI/behavior simulation anyways. I won't be introducing concepts like vertex buffers until after I have covered a bare-bones software 3D rendering pipeline. I might put in a little tutorial on hardware sprites with the DXTk, but nothing else hardware until after software 3D.

Other than that, I'm looking to focus more on creating simple playable games instead of just introducing the topics with abstract demos only. Lesson 8 with the poo game was by far the best-received of them all.
Chili

User avatar
chili
Site Admin
Posts: 3892
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Tutorial Reboot Framework Suggestions

Post by chili » May 27th, 2016, 12:50 am

Nurlan wrote:You didn't explain the new version of you framework
Well, I haven't even finalized it yet. That's what I'm asking about here. Any suggestion on things that should be added/removed/changed in the framework for the reboot series.
Chili

DeitusPrime
Posts: 97
Joined: June 9th, 2014, 11:14 pm

Re: Tutorial Reboot Framework Suggestions

Post by DeitusPrime » May 27th, 2016, 3:11 am

Request: Better explanation of the ::, -> and '[].' (for array) operators, and clear definition of each of the specific usage cases.

Perhaps some sort of script\loading class for things like define a variable like bool, int, etc (to really grill file IO into beginners).

How 'bout basic (console) applications showing game backbone classes and how they are inter-related...? 8-)
Choose not to go to destruction with a taco-sauce that is bland...
Go to construction with a taco-sauce that is flavorful!!
Mwa ha ha!!

yoshiyukiblade
Posts: 6
Joined: February 3rd, 2016, 3:44 am

Re: Tutorial Reboot Framework Suggestions

Post by yoshiyukiblade » June 1st, 2016, 10:30 am

As you mentioned in another thread a few months ago, the feeling that you're somehow "locked" into a framework created by someone else will be hard to shake unless it's addressed at the onset. Even so, it's a tough balance between going into those details or not, especially something geared toward the beginner.

The best feedback I can give is how I personally found my way here. I already had some basic foundation in programming from school, and wanted to try graphics. The fact that I went through the nitty gritty details at school is what made me desire starting at a "lower level," so I could understand the foundations better. However, I had no idea where the best entry point was. Do I look for tutorials on game engines? OpenGL? DirectX? or what? How "locked down" do I have to be? Where can I start from just enough scratch that someone with my skills can make something unique from it? I literally had no clue where a good place for someone with basics skills could enter. I looked at a few videos here and there, and found them to be rather un-engaging. However, something "clicked" when I was watching your videos, all the fundamental logical steps required to do those little dumb homework assignments and lab sessions at school re-emerged here, and I was overjoyed to see that it was essentially the same shit at the core.

Now, I'm still very much a beginner, and haven't done much programming lately, but I felt pretty empowered by how much I could do with so little. Doing a large variety of different exercises with virtually the same logic was a real "wow" moment for me, and I think somehow making it work here again would be great. It makes me feel that the everything I'm learning isn't specialized by any means, and that I can use it for a sorts of junk.

albinopapa
Posts: 3982
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Tutorial Reboot Framework Suggestions

Post by albinopapa » June 1st, 2016, 7:56 pm

chili wrote:Yeah, definitely planning to use D3D11 for the new framework. Actually, I might implement support for both D3D9 and D3D11 via a #define, but I don't expect anyone will actually need that. Still, my laptop doesn't have dx11 support and I still use it, so I'm sure there are others in the same boat.

I'm debating whether I should do anything different in the Winmain/winproc department or the keyboard and mouse department. These are the things I'm contemplating right now.


As for the actual content of the tutorials, I am looking to get to 3D quicker. I might just cut all the state-machine/platformer stuff this time. I think state machines would be better introduced in the context of AI/behavior simulation anyways. I won't be introducing concepts like vertex buffers until after I have covered a bare-bones software 3D rendering pipeline. I might put in a little tutorial on hardware sprites with the DXTk, but nothing else hardware until after software 3D.

Other than that, I'm looking to focus more on creating simple playable games instead of just introducing the topics with abstract demos only. Lesson 8 with the poo game was by far the best-received of them all.

Graphics. Render to a system buffer that gets copied to a quad that covers the screen. I think there are a few benefits by doing so.
Keyboard and Mouse support. The versatile versions.
Audio support from the start.
Timer

You could always cover all this stuff later on in the tutorials, but the quickest way to get the creativity out is to not feel so encumbered by the limitations of the framework.

I think that's all that would be needed to create quite a few different types of games.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

User avatar
chili
Site Admin
Posts: 3892
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Tutorial Reboot Framework Suggestions

Post by chili » June 2nd, 2016, 4:25 am

yoshiyukiblade wrote:As you mentioned in another thread a few months ago, the feeling that you're somehow "locked" into a framework created by someone else will be hard to shake unless it's addressed at the onset. Even so, it's a tough balance between going into those details or not, especially something geared toward the beginner.

The best feedback I can give is how I personally found my way here. I already had some basic foundation in programming from school, and wanted to try graphics. The fact that I went through the nitty gritty details at school is what made me desire starting at a "lower level," so I could understand the foundations better. However, I had no idea where the best entry point was. Do I look for tutorials on game engines? OpenGL? DirectX? or what? How "locked down" do I have to be? Where can I start from just enough scratch that someone with my skills can make something unique from it? I literally had no clue where a good place for someone with basics skills could enter. I looked at a few videos here and there, and found them to be rather un-engaging. However, something "clicked" when I was watching your videos, all the fundamental logical steps required to do those little dumb homework assignments and lab sessions at school re-emerged here, and I was overjoyed to see that it was essentially the same shit at the core.

Now, I'm still very much a beginner, and haven't done much programming lately, but I felt pretty empowered by how much I could do with so little. Doing a large variety of different exercises with virtually the same logic was a real "wow" moment for me, and I think somehow making it work here again would be great. It makes me feel that the everything I'm learning isn't specialized by any means, and that I can use it for a sorts of junk.
You make some good points here yoshi. I definitely plan on addressing the 'proprietary framework' issue in the first video. My main points will be: 1) the framework is a small wrapper which allows us to learn C++ in a more visually engaging and fun context from day 1; it is not intended to be learned as a tool for making large scale projects and 2) the guts of the framework will all be explained in due course after the proper groundwork has be laid out.
albinopapa wrote:Graphics. Render to a system buffer that gets copied to a quad that covers the screen. I think there are a few benefits by doing so.
Keyboard and Mouse support. The versatile versions.
Audio support from the start.
Timer

You could always cover all this stuff later on in the tutorials, but the quickest way to get the creativity out is to not feel so encumbered by the limitations of the framework.

I think that's all that would be needed to create quite a few different types of games.
Yeah, I'm thinking of keeping it minimal, so as not to overwhelm newcomers with the size of the framework solution. I considered starting out with primitive versions of keyboard and mouse and leaving the upgrade for a later lesson, but starting off with a more advanced version does have the advantage of being able to skip such an upgrade lesson, accelerating the pace of progression somewhat. I'm also thinking of leaving audio out but providing it as a separate upgrade that can be dragged into the project if desired. Not too much benefit in that though, so I'm still undecided. Timer might get replaced by C++11 stuff, but I'll need to do some tests with VS2015 Community (the VS2013 implementation of the high resolution clock it garbage; resolution = 1ms!).

The quad rendering is the only way to go in D3D11, so that is what I am going to do. I've already mocked up a few different variations on that, and it shouldn't be a problem. I'm still on the fence about whether I should support D3D9/WinXP at all (WinXP support makes XAudio2 stuff more of a pain in the dick).

Some things I plan to do differently are:
Have a central exception handling system that throws exceptions with useful data (especially for D3D stuff) and catches in winmain to display a message box. Should help if there are some people with unexpected configurations which get rare runtime errors.

Create a proper wrapper for the main window, together with mechanisms for A) notifying Game of any pertinent windows messages and B) allowing game access to some useful WinAPI operations (like closing the window etc.).

More smart pointers in the framework code, especially wrl::comptr in the Direct3D stuff (definitely important considering all the potential for exceptions to be thrown).

Define important Windows.h #define switches like _WIN32_WINNT 0x601 and NOMINMAX, together with stuff like WIN32_LEAN_AND_MEAN.

I'm thinking of using namespaces just for correctness sake, but it might be too big of a pain in the dick to be worth it.

I could have sworn that there were other things I would have liked to have changed, but I can't think of them right now.
Chili

Post Reply