8-bit fluff Title:Jon-Keatley.com

Example

Run AwayRun AwayRun Away was the first game that I released on the Xbox 360. It is an action packed slightly surreal on-rails-platformer with a compelling story of love, lust, rejection, and the law of sodsCategory: GamesMain Language Used: C#Support Languages Used: XMLXNAClick to view

Coding Sample protected override void Update(GameTime gameTime) { switch (mode) { case ElementType.Into: { intro.Update(gameTime.ElapsedGameTime.Milliseconds); setBackground = intro.getBackground(); if (intro.HasFinished) { mode = ElementType.TitleScreen; setBackground = titleScreen.Background; titleScreen.Reset(); } } break; case ElementType.TitleScreen: { titleScreen.Update(gameTime.ElapsedGameTime.Milliseconds); if (titleScreen.StartGame) { TitleScreen.Options option = titleScreen.GetMode(); switch (option) { case TitleScreen.Options.PLAY: { currentElement = 0; DemoCounter = 0; game.setController(titleScreen.ControllerUsed); for (int x = 0; x < cutScenes.Length; x++) { cutScenes[x].SetController = titleScreen.ControllerUsed; } credits.SetController = titleScreen.ControllerUsed; processGameElement(); } break; case TitleScreen.Options.QUIT: { //do a better exit thing this.Exit(); } break; case TitleScreen.Options.HELP: { help.SetController = titleScreen.ControllerUsed; mode = ElementType.Help; setBackground = help.Background; help.PlayMusic(); } break; case TitleScreen.Options.CREDITS: { credits.SetController = titleScreen.ControllerUsed; mode = ElementType.Credits; setBackground = credits.Background; credits.PlayMusic(); } break; case TitleScreen.Options.SCORES: { highscores.SetController = titleScreen.ControllerUsed; mode = ElementType.HighScores; setBackground = highscores.Background; highscores.PlayMusic(); } break; } } } break; case ElementType.CutScene: { cutScenes[gamePath[currentElement].id].Update(gameTime.ElapsedGameTime.Milliseconds); if (setBackground != cutScenes[gamePath[currentElement].id].BackgroundColour) { setBackground = cutScenes[gamePath[currentElement].id].BackgroundColour; } if (cutScenes[gamePath[currentElement].id].HasFinished) { cutScenes[gamePath[currentElement].id].Reset(); currentElement++; processGameElement(); } } break; case ElementType.Level: { game.Update(gameTime.ElapsedGameTime.Milliseconds); if (game.HasGameEnded) { if (game.DidPlayerQuit) { mode = ElementType.TitleScreen; titleScreen.Reset(); game.clearScore(); setBackground = titleScreen.Background; } else { if (game.DidPlayerWin) { //next level currentElement++; processGameElement(); } else { //game over currentElement = gamePath[currentElement].failId; processGameElement(); } } } if (isDemo == true) { if (currentElement == 3) { DemoCounter+= gameTime.ElapsedGameTime.Milliseconds; if (DemoCounter >= DemoDelay) { game.ForceGamePause(); buyme.SetController = titleScreen.ControllerUsed; mode = ElementType.BuyMe; buyme.PlayMusic(); setBackground = buyme.Background; } } } } break; case ElementType.Credits: { credits.Update(gameTime.ElapsedGameTime.Milliseconds); if (credits.CanExit) { bool redirectToScores = false; if (game.GetScore > 0) { if(highscores.HasHighscore(game.GetScore)) { redirectToScores = true; } } if (redirectToScores) { mode = ElementType.HighScores; highscores.EnterScore(game.GetScore); game.clearScore(); setBackground = highscores.Background; highscores.PlayMusic(); } else { mode = ElementType.TitleScreen; credits.reset(); setBackground = titleScreen.Background; titleScreen.Reset(); } } } break; case ElementType.Loading: { Thread.Sleep(10); loadingProgression.setAnimation((byte)loadingProgressionCounter); if (finishedLoading) { mode = ElementType.Into; } } break; case ElementType.Help: { help.Update(gameTime.ElapsedGameTime.Milliseconds); if (help.HasFinished) { mode = ElementType.TitleScreen; help.Reset(); setBackground = titleScreen.Background; titleScreen.Reset(); } } break; case ElementType.HighScores: { highscores.Update(gameTime.ElapsedGameTime.Milliseconds); if (highscores.CanExit) { highscores.Reset(); mode = ElementType.TitleScreen; setBackground = titleScreen.Background; titleScreen.Reset(); } } break; case ElementType.BuyMe: { buyme.Update(gameTime.ElapsedGameTime.Milliseconds); if (buyme.HasFinished) { buyme.Reset(); if (Guide.IsTrialMode == false) { game.ForceGameEnd(); mode = ElementType.TitleScreen; setBackground = titleScreen.Background; titleScreen.Reset(); game.clearScore(); isDemo = false; } else { mode = ElementType.Level; setBackground = game.Background; } } } break; } base.Update(gameTime); }