2
\$\begingroup\$

Most of my experience is in programming in HTML, JavaScript, etc. I'm taking on a relatively large project, and while I'm the only developer, I eventually want to open source my code for other developers.

For project scaling purposes, I'd like to have decent terminology, because terminology affects all my variables, and changing it later is a pain.


What is the proper name for when you change views or screens? For example, changing between an options screen and the playing screen.

I mostly hear it called "state", but when I refer to "gamestate", I typically mean the locations of all entities, the turn count, the score, etc.

I think it may be called "screen", but my games are not full screen, and I'm not sure if that one makes sense.

A "view" is something I don't hear very often, but when searching for "views" with "games", I find material on the point of view.

Is there a proper word for it?

\$\endgroup\$
1
  • \$\begingroup\$ It's completely OK to call something a "screen" even when it's not fullscreen. Options are usually on a menu (which may cover the rest of the game), or displayed on a "pause screen". \$\endgroup\$
    – pjc50
    Commented Jan 12, 2017 at 9:52

3 Answers 3

4
\$\begingroup\$

What is the proper name for when you change views or screens?

I have always called this a view / screen transition. This seems to be an accepted term across a variety of contexts, ranging from game development to software development, both through documentation and physical demonstration.

This term does not just cover the fact that we are moving from one screen or view to the other, but may also include additional effects that take place, during the process. For example, you might refer to a "fade-out" effect as one such transition.


I'd like to have decent terminology, because terminology affects all my variables, and changing it later is a pain

It sounds like your not properly documenting your code. It helps to use more universally accepted names, but consider that correct use of commenting should override any minor inconsistencies caused by incorrect name use.

The few languages I have used enforce this as a standard. In C#, for example, you can use ///<summary> </summary> above a variable to add a written summary of the variable as it should appear in documentation. This would more carefully explain the purpose of the variable to user's in cases where your name is not clear enough.

It is also worth considering the potential folly in assuming the level of understanding in others. The fact that such a term is universally accepted does not mean that every body who reads your code will take the same understanding.


I think it may be called "screen", but my games are not full screen, so I am not sure if that makes sense

In this context, you seem to be describing the actual game screen, as opposed to movement between game screens. Screen seems perfectly fine, here. Consider this: if "screen" meant "full screen", why would you need to make effort to say that your game is not "full screen"?

When I think of a "screen", in regards to games, I think of the area of the screen where the game is being drawn, and the context. If I had two separate games running, side by side, I would refer to them as separate game screens. If I moved from one menu to another, in either game, I would refer to it as changing menu screens.

If this term still feels awkward, to you, you might consider "viewport". A viewport is the space your game camera draws to; in most contexts, this is your game screen. Some games may involve multiple cameras, that each use a different viewport. Split screen multiplayer is one such example.

\$\endgroup\$
2
  • \$\begingroup\$ I totally agree that it's bad to assume other people make the same assumptions as me. Most people don't. But if, for example, the name was supposed to be "state", but I named it "view", and I put a comment on it "This is the top level game state" (per the description of screen in Alexandre's answer), and had another variable called gameState, I think it would be more confusing than just naming everything in one solid format to begin with. \$\endgroup\$ Commented Jan 12, 2017 at 2:22
  • \$\begingroup\$ @RoboticRenaissance my point is, use comments, as well ;) Good use of comments will make your open source variation more accessible. I would recommend researching your target language for an official standard, as these generally provide guidelines to make your code accessible and inviting. Java has a good set, for example, that dictate commenting variables and functions/methods wherever the name is not bleesingly obvious. In your example, I might get confused seeing that through intellisense. I would not get confused if I read it in properly-formed documentation. \$\endgroup\$
    – Gnemlock
    Commented Jan 12, 2017 at 2:27
2
\$\begingroup\$

'view' is typically related to what is seen by a camera.

'screen' is generally what's in your top level game state, e.g. main game screen, option screen, title screen, main menu screen.

'screen transition' is when changing screen.

'game state' comes from the fact that most games are implemented using state machines.

\$\endgroup\$
0
-1
\$\begingroup\$

Scene sounds proper for that.

You may wanna have a look at other game libs/frameworks, like unity, spritekit, gameplay kit, etc.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .