
FireMonkey offers you to build complex and advanced cross-platform applications. From business applications to games. On the GetIt portal, you can find dozens of sample applications. Today we will explore the Mars Rocket classic arcade game. In this game, the player must collect points and land the rocket without crashing. On each level, 3 stars are randomly placed throughout the game screen which you can collect for more points. Delphi 10.4 brought with it support for Apple’s Metal API on macOS and it is enabled in this game.

When you start discovering the building patterns in the game you can easily learn how to build similar games with Delphi FireMonkey. Moreover, you can learn more about mobile development and audio and animation tricks with FireMonkey.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
procedure TGameForm.PlayerHit; begin CreateExplosion(Ship.Position.X + (Ship.Width / 2), Ship.Position.Y + (Ship.Height / 2)); Ship.Visible := False; PlayerData.Lives := PlayerData.Lives - 1; PlayerData.SpeedX := 0; PlayerData.SpeedY := 0; PlayerData.VerticalVelocity := 0; PlayerData.HorizontalVelocity := 10; Ship.RotationAngle := 45; DisplayLives(PlayerData.Lives); if PlayerData.Lives > 0 then begin CenterPlayer; PlaySound(FAIL_SFX); end; end; procedure TGameForm.DisplayScore; begin ScoreLBL.Text := IntToStr(PlayerData.Score); end; procedure TGameForm.DelayedSettingsTimer(Sender: TObject); begin if (FileExists(DataFilePath + MUSIC_FILENAME) AND (MusicPlayer.Filename='')) then begin try MusicPlayer.Filename := DataFilePath + MUSIC_FILENAME; except on E: Exception do begin ShowMsgBox('Music failed to load: ' + E.Message); end; end; end; if HostEnabled = True then begin if NetworkConnected=True then begin ToggleAppTethering(True); end; end else begin ToggleAppTethering(False); end; DelayedSettings.Enabled := False; end; |
Be sure to head over and check out the Mars Rocket game on the GetIt portal and download it from the IDE!

Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition