0 votes

Hi,
I'm creating a clone of Space Invader to experiment with Godot.

I'm trying to display a 16x16 sprite inside a window of 600x600 pixel.
I want the sprite to scale and become bigger and I've done this using this Scenetree https://ibb.co/pzyhQRr

I've nested a viewport(inside a Control/ViewportContainer) in the root viewport.

The ViewportContainer has the same size of the window (600x600) with stretch "On" and the viewport has 200X200.

The Window has Mode 2D, aspect keep and size 600x600
The player node has a GDscript that clamp it's position to the nested viewport size.

The effect is ok but probably there is a better way to do this using only a window than using my previous solution. Any suggestion?

Thank in advance.

asked Apr 13 in Engine by TomD88 (12 points)

1 Answer

0 votes

Couldn't you make the project 200x200, and set the display/window/stretch/mode configuration property to 2d? Or, does that give you a different effect than what you're going for?

answered Apr 13 by Poobslag (62 points)

Hi,
Thank you for the response.
This is the result using your setting. I think I'm doing something wrong.

Is the window resizable, or did you disable that?

That's more or less the effect I was imagining, except that the window would be resizable, start at a larger size, or possibly fullscreen.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.