fuzzylr
Member
|
Structure Questions MMO Demo
Hey Guys, I am reviewing the code for the MMO demo. I've not seen a structure setup like this before. I've done some googling and I've seen just about all the same example. Most of them look roughly like this.
Code:
struct Test
{
int score;
int score1;
} exam;
But in the MMO demo I was not able to find an example of this type of structure. Can anyone help me out???
Code:
struct Client : ConnectionServer::Client, NetChr // Client
This is the Client.h Structure.
I get the struct Client. But it also looks like he is making a call to ConnectionSErver::Client (Class???), NetChr. I don't fully understand what's going on here.
Fuzzy
Student|Westwood
Project V. Studios | Game Dev
|
|
01-06-2013 07:21 AM |
|
TBJokers
Member
|
RE: Structure Questions MMO Demo
This is basic C++ and the Client structure is using ConnectionSErver::Client, and NetChr as it's base. you should read up on how to use Classes and Structures etc.
Man, it's always that semicolon...
|
|
01-06-2013 08:00 AM |
|
fuzzylr
Member
|
RE: Structure Questions MMO Demo
(01-06-2013 08:00 AM)TBJokers Wrote: This is basic C++ and the Client structure is using ConnectionSErver::Client, and NetChr as it's base. you should read up on how to use Classes and Structures etc.
I am in college now for C++. I am on the logic and design class now. I am just investigating try to learn.
Fuzzy
Student|Westwood
Project V. Studios | Game Dev
|
|
01-06-2013 08:04 AM |
|
TBJokers
Member
|
RE: Structure Questions MMO Demo
See a a struct that you have a base to is basically the Base struct and your new struct.
You will be able to access everything within the base struct through your extendor struct. But also add more options onto the extendor struct
Man, it's always that semicolon...
|
|
01-06-2013 08:16 AM |
|
fuzzylr
Member
|
RE: Structure Questions MMO Demo
(01-06-2013 08:16 AM)TBJokers Wrote: See a a struct that you have a base to is basically the Base struct and your new struct.
You will be able to access everything within the base struct through your extendor struct. But also add more options onto the extendor struct
I've never seen anything about that from my searches. Thanks, for sharing I will focus my searches. I know you can do it with classes. I've never seen it done with structures.
Fuzzy
Student|Westwood
Project V. Studios | Game Dev
|
|
01-06-2013 08:27 AM |
|
Zervox
Member
|
RE: Structure Questions MMO Demo
There is absolutely no difference between structs and classes except that Struct standards to public: and Classes standards to Private:
There used to be some larger differences in C but these differences doesn't exist in C++ unless it is compiler specific things which by then doesn't follow C++ standards.
(This post was last modified: 01-06-2013 08:40 AM by Zervox.)
|
|
01-06-2013 08:34 AM |
|
fuzzylr
Member
|
RE: Structure Questions MMO Demo
(01-06-2013 08:34 AM)Zervox Wrote: There is absolutely no difference between structs and classes except that Struct standards to public: and Classes standards to Private:
There used to be some larger differences in C but these differences doesn't exist in C++ unless it is compiler specific things which by then doesn't follow C++ standards.
Hum, a lot of the sites Don't touch side of structures. Hopefully my 3 semester I get to start programming.
Thanks for chiming in guys. I will try to follow the code tomorrow and see where takes me
Fuzzy
Student|Westwood
Project V. Studios | Game Dev
|
|
01-06-2013 08:48 AM |
|
fuzzylr
Member
|
RE: Structure Questions MMO Demo
I found some interesting tutorials on lynd.com. Structs are actually apart of the C library. That's why i wasn't finding what I was looking for. So the code pull more from the C side than C++ side minus the items Zervox said above.
Fuzzy
Student|Westwood
Project V. Studios | Game Dev
|
|
01-06-2013 09:51 AM |
|
Zervox
Member
|
RE: Structure Questions MMO Demo
(01-06-2013 09:51 AM)fuzzylr Wrote: I found some interesting tutorials on lynd.com. Structs are actually apart of the C library. That's why i wasn't finding what I was looking for. So the code pull more from the C side than C++ side minus the items Zervox said above.
C structs and C++ structs are very different from eachother. and the code above doesn't have anything to pull from C more than C++, it is a struct probably because he wants the data to be public and not locked away from other classes/structures by default removing the need to do
class{
public:
}
(01-06-2013 08:48 AM)fuzzylr Wrote: Hum, a lot of the sites Don't touch side of structures. Hopefully my 3 semester I get to start programming.
Thanks for chiming in guys. I will try to follow the code tomorrow and see where takes me
This is out of habit and what you feel is easier to deal with than any real difference or what you have been taught to use.
(This post was last modified: 01-06-2013 10:08 AM by Zervox.)
|
|
01-06-2013 10:02 AM |
|
fuzzylr
Member
|
RE: Structure Questions MMO Demo
I really do hate programming languages some days. The amount of information out there is limited and only in half truths.
One of the things I noticed from Lynda.com is that the guy doing the tutorials was using a hyrid of code between C & C++.
This lack of information has made it extremely hard to figure out the differences between the two and Programming effectively. It's why I decided to go to school to learn programing in hopes to get more clear and accurate information.
Fuzzy
Student|Westwood
Project V. Studios | Game Dev
|
|
01-07-2013 04:31 AM |
|
Zervox
Member
|
RE: Structure Questions MMO Demo
I had a look at Lynda.com C/C++ Essential Training, and I can't say from the 'free to view' parts of the 'course' was uninformative, as it clearly goes through the differences between C/C++ and how C++ incorporates everything which C has and extends it, and what it actually extends C with.
I don't know a single Engine that doesn't use both functions and C++ objects.
The "truth" about programming languages are all subjective, you will always see people who hate macros and other who loves them, some hates lots of classes and some loves having a class for everything. the amount of information out there is really quite huge.
|
|
01-09-2013 07:54 AM |
|
fuzzylr
Member
|
RE: Structure Questions MMO Demo
(01-09-2013 07:54 AM)Zervox Wrote: I had a look at Lynda.com C/C++ Essential Training, and I can't say from the 'free to view' parts of the 'course' was uninformative, as it clearly goes through the differences between C/C++ and how C++ incorporates everything which C has and extends it, and what it actually extends C with.
I don't know a single Engine that doesn't use both functions and C++ objects.
The "truth" about programming languages are all subjective, you will always see people who hate macros and other who loves them, some hates lots of classes and some loves having a class for everything. the amount of information out there is really quite huge.
Yea, I got most of that from Lynca.com. However, it really doesn't do much for attempting to seperate C from C++. However to interept the code and then put it to good use. I've been stuck now for several days attempting to understand his code so i could make what I feel is a very simple app based off his source.
Fuzzy
Student|Westwood
Project V. Studios | Game Dev
|
|
01-09-2013 08:19 PM |
|
fuzzylr
Member
|
RE: Structure Questions MMO Demo
(01-09-2013 09:03 PM)aceio76 Wrote: Hi fuzzylr, what exactly is it that you are trying to do? I'm confused when you said "separate C from C++" and something about EE's source What do you mean?
Give me a minute. I will need to locate all the pieces I need
Fuzzy
Student|Westwood
Project V. Studios | Game Dev
|
|
01-09-2013 11:48 PM |
|
fuzzylr
Member
|
RE: Structure Questions MMO Demo
Hey aceio76, I put this up on my forums because I can't seem to figure how you get Esenthels forum to display code properly. I found it rather confusing to detail out what I am trying to do.
http://forums.projvgs.com:8080/viewtopic...9&p=29#p29
Sorry for the port redirection. My current ISP blocks port 80.
Fuzzy
Student|Westwood
Project V. Studios | Game Dev
|
|
01-10-2013 12:56 AM |
|