EngoEngine / engo

Engo is an open-source 2D game engine written in Go.
https://engoengine.github.io
MIT License
1.74k stars 136 forks source link

Naming of Width/Height WindowWidth/WindowHeight #212

Closed EtienneBruines closed 8 years ago

EtienneBruines commented 8 years ago

The naming is currently horrible.

We have two variants, both with width/height: WindowWidth and Width.

Currently, WindowWidth is a 1:1 match with the width in pixels of your game window. The Width() (which is the private variable gameWidth), is a bit more unclear. It's a 1:1 match with the width of your game window, iff ScaleOnResize is set to false. In other words, the gameWidth does not change if the window size changes.

We should come up with better names, and document it better.

paked commented 8 years ago

I think GameWidth and WIndowWidth would be good. Where game is the amount of pixels which Camera perceives, and WindowWidth is the amount of pixels the OS would see.

On Mon, Apr 18, 2016 at 10:30 AM Etienne Bruines notifications@github.com wrote:

The naming is currently horrible.

We have two variants, both with width/height: WindowWidth and Width.

Currently, WindowWidth is a 1:1 match with the width in pixels of your game window. The Width() (which is the private variable gameWidth), is a bit more unclear. It's a 1:1 match with the width of your game window, iff ScaleOnResize is set to false. In other words, the gameWidth does not change if the window size changes.

We should come up with better names, and document it better.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/EngoEngine/engo/issues/212