What is the framework / how is it made?

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
Natox
Posts: 51
Joined: January 10th, 2012, 2:51 pm
Location: the Netherlands
Contact:

What is the framework / how is it made?

Post by Natox » January 13th, 2012, 1:14 am

Hey Chili,

I am really wondering something, since I'm really interested in being able to program every single thing from scratch eventually.
The thing is, I noticed you made something called a framework.
But what is the framework exactly and how is it made?
Is it also programmed in C++? What abilities, functions does it provide?
Is it something like 'an engine'? Or something completely different?

I don't know if I am the only one who does not know, or the only one curious/impatient enough to ask?

Best regards,

Natox
My Weblog: http://www.gamer-bay.com/
Keep track of my learning progress on the C++ programming language.

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

Re: What is the framework / how is it made?

Post by chili » January 13th, 2012, 3:49 pm

I fully understand your desire to be able to do everything from scratch; I'm the exact same way. :mrgreen: We will get there eventually bro, but first thing's first. Gotta get a solid grip on C++ before we can monkey around in that business.

The framework is all the files in the solution you downloaded from my website. It's all in C++.
Wikipedia wrote:In computer programming, a software framework is an abstraction in which software providing generic functionality can be selectively changed by user code, thus providing application specific software. It is a collection of software libraries providing a defined application programming interface (API).

Frameworks contain key distinguishing features that separate them from normal libraries:

1.inversion of control - In a framework, unlike in libraries or normal user applications, the overall program's flow of control is not dictated by the caller, but by the framework.

2.default behavior - A framework has a default behavior. This default behavior must actually be some useful behavior and not a series of no-ops.

3.extensibility - A framework can be extended by the user usually by selective overriding or specialized by user code providing specific functionality.

4.non-modifiable framework code - The framework code, in general, is not allowed to be modified. Users can extend the framework, but not modify its code.
My framework does some initialization that sets up the application window, the Windows message handling, and the Direct3D interface, and provides some functions which let us draw to the backbuffer video memory. It's not really what you would call an engine.
Chili

Natox
Posts: 51
Joined: January 10th, 2012, 2:51 pm
Location: the Netherlands
Contact:

Re: What is the framework / how is it made?

Post by Natox » January 13th, 2012, 4:29 pm

Thanks for your reply mate! Makes some sense now... but still kinda blurry.
Hope I will get there eventually!!
My Weblog: http://www.gamer-bay.com/
Keep track of my learning progress on the C++ programming language.

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

Re: What is the framework / how is it made?

Post by chili » January 13th, 2012, 4:48 pm

Stick with Chili and you will. 8-)
Chili

Natox
Posts: 51
Joined: January 10th, 2012, 2:51 pm
Location: the Netherlands
Contact:

Re: What is the framework / how is it made?

Post by Natox » January 13th, 2012, 5:58 pm

Oh I will, don't worry :-)
My Weblog: http://www.gamer-bay.com/
Keep track of my learning progress on the C++ programming language.

tokas913
Posts: 2
Joined: August 12th, 2013, 5:33 pm

Re: What is the framework / how is it made?

Post by tokas913 » August 12th, 2013, 5:54 pm

i m new to c++ and u r tuts r pretty awesome. it will be cool if u make a tut. on how to make a framework. i would like to make android game with c++. is it possible? anyway? i m not saying that ill jump right into it but may be in few months. i ll keep nagging u till then(thats fuk happen when people show some cool stuff) BTW thanks for u knowledge, its helping me a lot.

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

Re: What is the framework / how is it made?

Post by albinopapa » August 12th, 2013, 6:51 pm

tokas913 wrote:i m new to c++ and u r tuts r pretty awesome. it will be cool if u make a tut. on how to make a framework. i would like to make android game with c++. is it possible? anyway? i m not saying that ill jump right into it but may be in few months. i ll keep nagging u till then(thats fuk happen when people show some cool stuff) BTW thanks for u knowledge, its helping me a lot.

If you make it through the intermediate lessons especially lesson 4 he spends about 2 1/2 hours covering his framework as far as Direct3D is concerned. Then lesson 5 I think covers the win api portion of the framework. My advice after going through all of his videos about 3 times or more a piece and using cplusplus.com to reference what isn't covered in the videos is to make sure you fully understand each thing that chili covers and practice it before attacking windows and directx apis.

Look through the code in the framework as he covers each topic and see if you can follow it. Look on MSDN website and do searches on that website for the WinMain function or the other functions in the d3dgraphics class ( putpixel function is not a d3d specific function btw ) even if you don't understand the technical stuff it should start becoming more understandable as you learn more about how c++ works.

I think my biggest road block when it comes to learning other api's is the naming conventions. For instance Microsoft uses BYTE, WORD and DWORD instead of char, int and long. They use wide character strings LPCSTR and LPTSTR which are pointers to strings of text and are not compatible with char strings. Had to look up that last one. While the naming isn't different than using c++ straight on, you use them in the exact same manner. So understanding how c++ works first should get you a leg up on learning anything with the Microsoft or others apis.
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
jidün
Posts: 27
Joined: July 12th, 2013, 1:10 pm

Re: What is the framework / how is it made?

Post by jidün » August 12th, 2013, 7:05 pm

I would recommend this site for new programers:
http://www.learncpp.com/

It explains the topics pretty well.

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: What is the framework / how is it made?

Post by LuX » August 12th, 2013, 7:24 pm

Also going through the framework and looking up on MSDN each function used might help. What helped me the most in uderstanding the basic setup of a framework was to look at multiple different setups. Google around for projects and look at how they create a window and set up DirectX, eventually you'll see a bright flash and get it all. ...Kinda.
ʕ •ᴥ•ʔ

User avatar
LuisR14
Posts: 1248
Joined: May 23rd, 2013, 3:52 pm
Location: USA
Contact:

Re: What is the framework / how is it made?

Post by LuisR14 » August 12th, 2013, 8:34 pm

albinopapa wrote:For instance Microsoft uses BYTE, WORD and DWORD instead of char, int and long.
there's also QWORD for long long (64-bit integer) :P
albinopapa wrote:They use wide character strings LPCSTR and LPTSTR which are pointers to strings of text and are not compatible with char strings.
actually, they are compatible with char strings, it's just they default to wide strings when you build the project in Unicode and to char strings when built without Unicode

LPSTR/LPCSTR = non-const/const char string
LPWSTR/LPCWSTR = non-const/const wide string
LPTSTR/LPCTSTR = defaults to one of the 2 lines above depending on project Unicode setting
:)
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat :mrgreen: --

Post Reply