Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6599621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:30:54+00:00 2026-05-25T18:30:54+00:00

I have recently read Mike McShaffry’s Game Coding Complete and noticed the code style

  • 0

I have recently read Mike McShaffry’s Game Coding Complete and noticed the code style I haven’t seen elsewhere yet. The more important things I noticed were the names of base classes defining interfaces starting with an I like IActor, protected member variables’ names starting with m_ like m_Type and names of virtual methods like VSetId(). To show a bigger, more readable example:

class BaseActor : public IActor 
{ 
    friend class BaseGameLogic;
protected: ActorId m_id; 
    Mat4×4 m_Mat; 
    int m_Type; 
    shared_ptr <ActorParams> m_Params; 
    virtual void VSetID(ActorId id) { m_id = id; } 
    virtual void VSetMat(const Mat4×4 &newMat) { m_Mat = newMat; } 
public: 
    BaseActor(Mat4×4 mat, int type, shared_ptr<ActorParams> params) 
        { m_Mat=mat; m_Type=type; m_Params=params; } 
    /* more code here */
};

I pretty much like this style: it seems justified and looks like it helps increase the overall readability of the code. The question is: Is it a more-or-less established standard? Is there any more to it than the things I mentioned?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:30:55+00:00Added an answer on May 25, 2026 at 6:30 pm

    That’s called Hungarian Notation. It’s encoding information about the variable into the variable name.

    For example, m_params means “a member variable called params”. IActor means “A class called Actor intended to be used as an ifterface”. It is something that is a very hot topic. Most people agree Hungarian Notation is a poor choice, but many will defend what they do as not Hungarian.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently read the safe bool idiom article. I had seen this technique
I have recently read Apple's sample code for MVCNetworking written by Apple's Developer Technical
I recently read that getters/setters are evil and I have to say it makes
I have done Objective-C way back when, and have recently (i.e. just now) read
Recently I have read a lot about different NoSQL databases and how they are
Hallo, Recently I have read a couple of posts on varous sites and blogs
I have read about the push technologies recently. Using it real-time data streaming is
Have recently been given a project to complete which uses XML quite extensively.Am looking
I have recently started experimenting with LLVM under MinGW. I have read the Kaleidoscope
I have recently seen articles on HTML5 and local Db creation and usage. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.