This is a modernized version of the Robot Rampage game from the XNA Game Development by Example book, updated to use MonoGame 3.8.4 and .NET 8.0.
Originally from the Book "XNA 4.0 Game Development by Example: Beginner's Guide" by Kurt Jaegers Published by PACKT Publishing: http://www.packtpub.com/xna-4-0-game-development-by-example-beginners-guide/book
The project has been converted to use modern SDK-style project files and supports multiple platforms:
- RobotRampage.DesktopGL.csproj - Cross-platform desktop version using OpenGL
- RobotRampage.Windows.csproj - Windows-specific version using DirectX
- RobotRampage.Android.csproj - Android version
- RobotRampage.iOS.csproj - iOS version
- .NET 8.0 SDK or later
- Visual Studio 2022 (recommended) or Visual Studio Code
- For Android development: Android SDK
- For iOS development: Xcode (macOS only)
Open RobotRampage.sln in Visual Studio and build the desired project.
# Build Windows version
dotnet build RobotRampage.Windows.csproj
# Build DesktopGL version
dotnet build RobotRampage.DesktopGL.csproj
# Build Android version
dotnet build RobotRampage.Android.csprojOpen the folder in VS Code and use the following tasks:
Ctrl+Shift+P→ "Tasks: Run Task" → Choose build task- Available tasks: build-windows, build-desktopgl, build-android
# Run Windows version
dotnet run --project RobotRampage.Windows.csproj
# Run DesktopGL version
dotnet run --project RobotRampage.DesktopGL.csprojF5to debug with Launch DesktopGL or Launch Windows configurationsCtrl+F5to run without debugging
The project uses existing compiled content (.xnb files) from the Content folder. No additional content pipeline setup is required as the .xnb files are directly copied to the output directory.
- Removed all #region/#endregion directives for cleaner, modern code
- Updated to SDK-style project files using .NET 8.0 target frameworks
- Added MonoGame 3.8. NuGet package references* for all platforms
- Fixed namespace consistency (changed from Robot_Rampage to RobotRampage)
- Removed obsolete XNA references (like GamerServices)
- Added VSCode configuration files for building and debugging
- Updated Program.cs to modern .NET style without platform-specific conditionals
- Uses MonoGame.Framework.WindowsDX
- Supports both windowed and fullscreen modes
- Requires Windows 10 or later
- Uses MonoGame.Framework.DesktopGL
- Cross-platform compatible (Windows, Linux, macOS)
- Uses OpenGL for rendering
- Uses MonoGame.Framework.Android
- Minimum SDK version: 21 (Android 5.0)
- Target SDK version: 34 (Android 14)
- Includes AndroidManifest.xml configuration
- Uses MonoGame.Framework.iOS
- Minimum iOS version: 11.0
- Requires Xcode and macOS for building
-
Content Warning: The "No Content References Found" warning is expected since we're using pre-compiled .xnb files instead of a .mgcb content pipeline project.
-
Build Errors: Ensure you have the correct .NET 8.0 SDK installed and all required workloads for your target platform.
-
Android Build Issues: Make sure you have the Android SDK installed and configured properly in Visual Studio.
- Arrow keys or WASD: Move player
- Mouse: Aim turret
- Left click: Fire weapon
- Escape: Exit game
This code is based on the examples from "XNA Game Development by Example" and has been modernized for educational purposes.