This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:guides:beginners:viewport_and_camera [2018/06/27 04:55 (6 years ago)] – Rejigged to match init projects sausage | en:guides:beginners:viewport_and_camera [2020/08/19 12:15 (4 years ago)] (current) – Viewport -> MainViewport to match the changes in init's template iarwain | ||
---|---|---|---|
Line 5: | Line 5: | ||
A viewport is the rectangle that we can view the game world through. And a camera allows us to see all or part of that world at a time. | A viewport is the rectangle that we can view the game world through. And a camera allows us to see all or part of that world at a time. | ||
- | Take a look at your MyGame.ini and you'll see that a '' | + | Take a look at your MyGame.ini and you'll see that a '' |
< | < | ||
- | [Viewport] | + | [MainViewport] |
Camera | Camera | ||
</ | </ | ||
Line 15: | Line 15: | ||
< | < | ||
- | [Viewport] | + | [MainViewport] |
Camera | Camera | ||
BackgroundColor | BackgroundColor | ||
Line 50: | Line 50: | ||
ScreenWidth | ScreenWidth | ||
ScreenHeight | ScreenHeight | ||
+ | ... | ||
</ | </ | ||
Line 58: | Line 59: | ||
{ | { | ||
- | orxViewport_CreateFromConfig(" | + | orxViewport_CreateFromConfig(" |
</ | </ | ||
Line 64: | Line 65: | ||
- | The "Viewport" string parameter specified in that function is the same name as the '' | + | The "MainViewport" string parameter specified in that function is the same name as the '' |
- | Because the camera was specified in the '' | + | Because the camera was specified in the '' |
- | Final thing for this step is to name our game. This name will show in the window title. Set this with the Title property in the '' | + | Final thing for this step is to name our game. This name will show in the window title. Set this with the '' |
< | < | ||
Line 76: | Line 77: | ||
Title = Platform Hero | Title = Platform Hero | ||
FullScreen | FullScreen | ||
- | Smoothing | + | Smoothing |
VSync = true | VSync = true | ||
+ | </ | ||
+ | |||
+ | This will change the name in the window title, but only if you are compiling in Release mode. You'll most likely be compiling in Debug mode right now. So you'll also need to change the title in the '' | ||
+ | |||
+ | <code ini> | ||
+ | [Display] | ||
+ | Title = Platform Hero (Debug) | ||
+ | ShowFPS | ||
</ | </ | ||