Class ?

The Partridge Family were neither partridges nor a family. Discuss.
Raimond
Posts: 16
Joined: January 30th, 2014, 1:54 pm

Class ?

Post by Raimond » January 31st, 2014, 8:30 pm

Where can i learn the c++ class ?

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

Re: Class ?

Post by Pindrought » January 31st, 2014, 8:49 pm

o.O

What?

Like class as in

class Game
{
} ?


Or class as in a class you'd take for C++ at school?
PM me if you need to contact me. Thanks to all the helpful people on this forum especially to Chili.

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

Re: Class ?

Post by albinopapa » February 1st, 2014, 12:41 am

if c++ classes you want to learn, cplusplus.com you should read.

Here's a short descript...if you know what a struct is then you know what a class is, but there is a minor difference, classes are by default private and to access stuff within the class you need to make them public.
example

Code: Select all

class Foo
{
public:
     Foo();  // <- known as the constructor, it can be used to initialize member variables
               //  within the class
     ~Foo() // <- known as the deconstructor, it is called automatically, though you can call it
               //  manually, when ever the class is no longer needed or has been deleted
      //  known as methods or functions, if the methods are public, they can be called outside the 
      //  class, by other classes.
      int AddVars( int var1, int var2);
private:
     int bar1, bar2; // <- known as member variables, these cannot be accessed from other classes
                         //  directly because they are private
};

Hope this helps...btw, structs can do the same thing as classes, except all of the stuff in a struct are public by default. This took me a while to wrap my head around, but just through using them I finally understood.
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: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Class ?

Post by chili » February 1st, 2014, 2:51 am

albinopapa wrote:if c++ classes you want to learn, cplusplus.com you should read.
What am I, chopped liver? :(

I start going over classes and object-oriented programming in the intermediate series. So if you stick with the tutorials we will get there. However, as albinopapa so scathingly and circumspectly pointed out, the tutorials aren't really meant to be a comprehensive treatment (I just throw a bunch of stuff at your brain and hope some of it sticks), and cplusplus.com should prove an invaluable resource (I use it quite often myself).
Chili

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

Re: Class ?

Post by albinopapa » February 1st, 2014, 3:29 am

I knew the day would come when I hurt chili's feelings, damn.

Chili your use of the english language is beyond me at times, I find myself looking up words that spew from your mouth almost as much as the topics you teach. Without you chili, I wouldn't have even been able to make that post, some people need to read to learn and some need to watch and learn, I don't think any one way is best, there's just what's best for themselves. I was also just trying to save them some time, do you realize you have like easily 40+ hours of video to watch? I know you don't have to watch all at once, but it's getting harder to find the answers. Just so we're clear, this is not a complaint, just an observation. Keep it up, the last 3.5 hour video was great, sat through the whole thing in one sitting and actually learned somethin'.
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: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Class ?

Post by chili » February 1st, 2014, 4:04 am

Haha, no worries papa, I was just joking there! I tend to use overly pompous diction when I'm being facetious; it's kind of an intentional tell ;) I totally realize that if you have like, a specific topic you want answers to, the tutorials will not help you out at all. In short, I agree with you 100% brah :)

It might get better if I can ever get the wiki off the ground, but even then the tutorials will never be enough on their own for anyone serious about mastering the topics touched upon therein.
Chili

Raimond
Posts: 16
Joined: January 30th, 2014, 1:54 pm

Re: Class ?

Post by Raimond » February 1st, 2014, 8:51 am

chili wrote:
albinopapa wrote:if c++ classes you want to learn, cplusplus.com you should read.
What am I, chopped liver? :(

I start going over classes and object-oriented programming in the intermediate series. So if you stick with the tutorials we will get there. However, as albinopapa so scathingly and circumspectly pointed out, the tutorials aren't really meant to be a comprehensive treatment (I just throw a bunch of stuff at your brain and hope some of it sticks), and cplusplus.com should prove an invaluable resource (I use it quite often myself).

Oh, okay, i didn't know that, but chili... when are you going to make some 3d gaming tutorial? I find your tutorials verry affective, I think you're the best one out there, being patient to make sure we understand every part of programming, i think you're a very good teacher... and i really want to find out how 3d game programming works.

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

Re: Class ?

Post by albinopapa » February 1st, 2014, 1:13 pm

Thanks chili for the insight, though I had a feeling you were a smart ass. :D...

I'm going to make a prediction Raimond, assuming chili stays on a steady course and covers all the topics he mentioned that he would like to cover in his platformer tutorial and the length of videos that he puts out, I would say another 2-4 months before moving on to 3D, though not sure if it's going to be 3D stuff like Doom style or 3D like Halo style...difference being software 3D to understand the basics of 3 dimensional space on a 2 dimensional surface, and hardware stuff like hlsl shaders for lighting and other visual effects...my bet is the first one.

http://www.planetchili.net/forum/viewto ... ial#p11291

Here is a link to what I'm referring to.

He has finished collision, month and a half after the post.
6 weeks - I know there was a vacay for him in there and not sure when he started working on it so have to assume all 6.
Scrolling is what he mentions in has last video he wants to cover next, this will be 1-2 videos
1-2 weeks
1-2 weeks
Enemy Agents themselves probably won't be that big of a deal
2-4 weeks
Enemy Control (AI) depends on how far down the rabbit hole he wants to go.
Pickups and HUD, Pickups would be I think a cell assignment and a collision detection, and HUD is usually a bitmap overlay so maybe he's going to discuss layers
1-2 weeks
Sound, not sure how far he's going to go with this. He already has a sound class, though from personal use and reading some of the posts here on the forum, it could use an update. So he might either update off camera and just have us download it and Sound topic will cover using the sound engine or he has walks us through updating it <- please.
1 week for just showing us how to use it and download the update - assuming he updates it.
2 weeks if he walks us through building our own or updating his.

And then there is the human factor or the chili factor. He himself a self proclaimed person of lethargy, though he has been making good progress in making the videos at one a week, we could add a week here or there for taking a break from the monotony of making these vids, or time out to enjoy some free time or whatevs.:)

Oddly enough I went to google to look up synonyms for lazy and it was second on the list before finishing the word synonym.
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: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Class ?

Post by chili » February 1st, 2014, 4:24 pm

How long? Not long...
Chili

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

Re: Class ?

Post by LuisR14 » February 1st, 2014, 4:27 pm

hehe, not giving a definite measure of time huh xP
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