This project contains the Asteroid Belt Assault game as it is at the end of Chapter 5.
This was taken from the Book XNA 4.0 Game Development by Example: Beginner's Guide by Kurt Jaegers Published by PACKT Publishing which can be found here http://www.packtpub.com/xna-4-0-game-development-by-example-beginners-guide/book
For a complete discussion of the code please buy the book as it is worth the money.
Asteroid Belt Assault is a cross-platform 2D space shooter game originally developed for XNA 4.0, now ported to MonoGame. The project demonstrates game development concepts such as sprite management, collision detection, particle effects, and sound, following the structure from the book "XNA 4.0 Game Development by Example: Beginner's Guide" by Kurt Jaegers.
- Windows (DirectX)
- DesktopGL (cross-platform)
- Android
- iOS
- .NET 8 SDK
- MonoGame (if not included via NuGet)
- For Android: Android SDK & emulator
- For iOS: macOS with Xcode & simulator (or networked Mac for Windows users)
- Build: Use the VS Code task
build-windowsor run:dotnet build Platforms/Windows/AsteroidBeltAssault.Windows.csproj
- Run: Use the VS Code launch config
Run Windowsor run the built.exefromPlatforms/Windows/bin/Debug/net8.0-windows/.
- Build: Use the VS Code task
build-desktopglor run:dotnet build Platforms/Desktop/AsteroidBeltAssault.DesktopGL.csproj
- Run: Use the VS Code launch config
Run Desktopor run the built binary fromPlatforms/Desktop/bin/Debug/net8.0/.
- Build: Use the VS Code task
build-androidor run:dotnet build Platforms/Android/AsteroidBeltAssault.Android.csproj
- Deploy & Run: Use the VS Code launch config
Deploy and Launch Androidor run:The app will be deployed to the default Android emulator.dotnet android deploy --project Platforms/Android/AsteroidBeltAssault.Android.csproj
- Build: Use the VS Code task
build-iosor run:dotnet build Platforms/iOS/AsteroidBeltAssault.iOS.csproj
- Deploy & Run: Use the VS Code launch config
Deploy and Launch iOSor run:The app will be deployed to the default iOS simulator.dotnet ios deploy --project Platforms/iOS/AsteroidBeltAssault.iOS.csproj
For more details, see the book or the source code in the Core and Platforms directories.