No. It’s not.
But it’s a nice move to include such a notice somewhere, though not mandatory.
As a matter of fact I’m just thinking about including such a notice in my own game and if it would help or harm MG as a project if I did
No. It’s not.
I’m pretty sure it will help
Oh sorry, I don’t think I ever replied to MrValentine. Yep, there’s a “Made with MonoGame” credit in the credits screen on the main menu.
By the way, Miles & Kilo is coming to the Nintendo Switch pretty soon, courtesy of Four Horses Games! Super excited.
Then I’ll do it.
I’ll make an entry on the Wall of Fame.
No Linux version
Nah, I didn’t want the extra hassle of supporting linux, especially since it accounts for such a small percentage of users. Even supporting Mac has just barely been worth it. It’s something I might consider doing if the game becomes super popular one day, though that’s not super likely tbh.
Assuming you are using DesktopGL platform for Mac, there should be no extra hassle, it comes with both Mac and Linux libs, and MonoKickstart comes with both Mac and Linux libs as well. The launch script that needs to be run in MonoKickstart is also the same between the platforms.
TLDR. If you are using DesktopGL for the Mac version, those same binaries will run on Linux as well.
Ahh I wasn’t aware of MonoKickstart, I’ll look into that! Seems pretty handy. We’re adding some new features/polish to the Switch version so I’ll look into adding Linux support when I get around to updating the Steam version.
Hey, sorry to resurrect this but the game looks brilliant. I noticed it because I was actually looking for a way to allow my pixel art to rotate correctly! Could you provide more details please?
What are the settings you use for the renderTarget?
Where you say “// Draw the game’s graphics with the spriteBatch here”, what parameters do you use in spriteBatch.Draw()?
Do you essentially design your sprites at a standard resolution but smaller than you want so when they’re scaled up they become pixelated? This is what I had in my head too but couldn’t get it to work.
Sure, I can explain it a bit more.
First off, yes, I draw all my sprites at 1x. They are not scaled up at all. It’s the game engine’s job to do any desired scaling.
So to make things simple, let’s say my “native” resolution (i.e. when the pixel art is completely unscaled) is 320x180, and I want to display the game in a 1280x720 window. I first render all my sprites to a RenderTarget2D, and then I draw the RenderTarget2D to the screen scaled up by a factor of 4.
Here’s how I construct the RenderTarget2D:
renderTarget = new RenderTarget2D(GraphicsDevice, 320, 180, false, GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24);
When drawing sprites to the render target, you can use whatever parameters you want for
spriteBatch.Draw(), but you want to draw them at 1x scale. So if you have a 32x32 spaceship texture, you could draw it to the renderTarget like:
spriteBatch.Draw( spaceshipTexture, new Rectangle(spaceshipX, spaceshipY, spaceshipTexture.Width, spaceshipTexture.Height), new Rectangle(0, 0, spaceshipTexture.Width, spaceshipTexture.Height) );
Finally, when I draw the RenderTarget2D to the game’s window (after drawing all the sprites to the renderTarget), it would look like this:
spriteBatch.Begin(samplerState: SamplerState.PointClamp); spriteBatch.Draw(renderTarget, new Rectangle(0, 0, 1280, 720), Color.White); spriteBatch.End();
Notice how the renderTarget is 320x180 pixels, but when it’s drawn to the screen, it’s being stretched to 1280x720. Also, the
SamplerState.PointClamp argument is important because it gives you a nice crisp pixel art look, by default it would look like a blurry mess.
I’m not always great at explaining things but hopefully this clarified things a bit for you, haha.
That’s awesome. I actually got it working last night but woke to see this and it’s a great explanation and clarifies what’s going on so thanks a lot!
Presumably, to make sure game positions/vectors don’t get too confusing it probably makes sense to get the whole game working correctly at the small resolution and then simply add in the scaling code?
Also, does it help to make sure you keep things in multiples of 720 and 1080?
Seriously great idea and saves me having to doing sprite atlases of correctly rotated pixel art!
Nice, glad you got it working!
Yep, for Miles & Kilo all the game logic operates at the small resolution so I don’t have to worry about scaling at all until the final step where I draw the renderTexture to the screen.
As for the multiples of 720/1080 thing – it’s a good idea to pick a native resolution for your game that will scale up cleanly to standard resolutions like 720p and 1080p. For instance 320x180 scaled by 4x is 1280x720, and scaled by 6x is 1920x1080, and scaled by 8x is 2560x1440. 640x360 scales up really nicely too.