Week 6 Pass Task 5.1
Week 6 Pass Task 5.1
Meeting Minutes:
Decisions
=========
* Update the coding standard on wiki page, [EK], 11-OCT,2019
* Use Slack fully for daily scrum meetings
Actions
=======
* Update the coding standard on wiki page --- [EK], 11-OCT,2019
* Implement new features,
1. Level of Difficulty --- [YT], 16-OCT-2019
The difficulty level of the game could be more challenging.
2. Sound effects could be more attractive --- [EK] 16-OCT-2019
1
SWE20001 DP1 (100083700)
2
SWE20001 DP1 (100083700)
Meeting Agenda:
Date/Location: 03-OCT-2019 at 15:30 in A308
Information Updates/Reminders
=============================
* The next two weeks are going to be about understanding the code
base so that we can plan for the work to fix and improve it.
* Everyone should be able to use git, github wiki’s and Trello. Ask
for help if that is a problem.
* We will be using toggl.com to keep track of time.
* The Programming Help Desk (Block G Level 9) is available to help us
with programming for this unit.
Decisions Needed
================
* None (only general items requiring Actions this week)
General Items
=============
* Update the coding standard on wiki page
* Implement new features, such increasing level of difficulty,
implement sound effects, and change background of the gameboard.
3
SWE20001 DP1 (100083700)
//GameResources.cs file
using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using SwinGameSDK;
//Deployment
NewImage("LeftRightButton", "deploy_dir_button_horiz.png");
NewImage("UpDownButton", "deploy_dir_button_vert.png");
NewImage("SelectedShip", "deploy_button_hl.png");
NewImage("PlayButton", "deploy_play_button.png");
NewImage("RandomButton", "deploy_randomize_button.png");
//Ships
4
SWE20001 DP1 (100083700)
int i = 0;
for (i = 1; i <= 5; i++) {
NewImage("ShipLR" + i, "ship_deploy_horiz_" + i + ".png");
NewImage("ShipUD" + i, "ship_deploy_vert_" + i + ".png");
}
//Explosions
NewImage("Explosion", "explosion.png");
NewImage("Splash", "splash.png");
/// <summary>
/// Gets a Font Loaded in the Resources
/// </summary>
/// <param name="font">Name of Font</param>
/// <returns>The Font Loaded with this Name</returns>
/// <summary>
/// Gets an Image loaded in the Resources
/// </summary>
/// <param name="image">Name of image</param>
/// <returns>The image loaded with this name</returns>
/// <summary>
/// Gets an sound loaded in the Resources
/// </summary>
/// <param name="sound">Name of sound</param>
/// <returns>The sound with this name</returns>
5
SWE20001 DP1 (100083700)
return _Sounds[sound];
}
/// <summary>
/// Gets the music loaded in the Resources
/// </summary>
/// <param name="music">Name of music</param>
/// <returns>The music with this name</returns>
/// <summary>
/// The Resources Class stores all of the Games Media Resources, such as Images,
Fonts
/// Sounds, Music.
/// </summary>
width = SwinGame.ScreenWidth();
height = SwinGame.ScreenHeight();
SwinGame.ChangeScreenSize(800, 600);
ShowLoadingScreen();
SwinGame.Delay(100);
ShowMessage("Game loaded...", 5);
SwinGame.Delay(100);
EndLoadingScreen(width, height);
}
6
SWE20001 DP1 (100083700)
SwinGame.DrawBitmap(_Background, 0, 0);
SwinGame.RefreshScreen();
SwinGame.ProcessEvents();
_Animation = SwinGame.LoadBitmap(SwinGame.PathToResource("SwinGameAni.jpg",
ResourceKind.BitmapResource));
_LoadingFont = SwinGame.LoadFont(SwinGame.PathToResource("arial.ttf",
ResourceKind.FontResource), 12);
_StartSound =
Audio.LoadSoundEffect(SwinGame.PathToResource("SwinGameStart.ogg",
ResourceKind.SoundResource));
_LoaderFull =
SwinGame.LoadBitmap(SwinGame.PathToResource("loader_full.png",
ResourceKind.BitmapResource));
_LoaderEmpty =
SwinGame.LoadBitmap(SwinGame.PathToResource("loader_empty.png",
ResourceKind.BitmapResource));
PlaySwinGameIntro();
}
Audio.PlaySoundEffect(_StartSound);
SwinGame.Delay(200);
int i = 0;
for (i = 0; i <= ANI_CELL_COUNT - 1; i++) {
SwinGame.DrawBitmap(_Background, 0, 0);
SwinGame.DrawBitmapPart(_Animation, (i / ANI_V_CELL_COUNT) * ANI_W,
(i % ANI_V_CELL_COUNT) * ANI_H, ANI_W, ANI_H, ANI_X, ANI_Y);
SwinGame.Delay(20);
SwinGame.RefreshScreen();
SwinGame.ProcessEvents();
}
SwinGame.Delay(1500);
7
SWE20001 DP1 (100083700)
int fullW = 0;
SwinGame.RefreshScreen();
SwinGame.ProcessEvents();
}
8
SWE20001 DP1 (100083700)
//=======================================================
//Service provided by Telerik (www.telerik.com)
//Conversion powered by NRefactory.
//Twitter: @telerik
//Facebook: facebook.com/telerik
//=======================================================
9
SWE20001 DP1 (100083700)
//GameLogic.cs
using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using SwinGameSDK;
static class GameLogic
{
public static void Main()
{
//Opens a new Graphics Window
SwinGame.OpenGraphicsWindow("Battle Ships", 800, 600);
//Load Resources
GameResources.LoadResources();
SwinGame.PlayMusic(GameResources.GameMusic("Background"));
//Game Loop
do {
GameController.HandleUserInput();
GameController.DrawScreen();
} while (!(SwinGame.WindowCloseRequested() == true |
GameController.CurrentState == GameState.Quitting));
SwinGame.StopMusic();
//=======================================================
//Service provided by Telerik (www.telerik.com)
//Conversion powered by NRefactory.
//Twitter: @telerik
//Facebook: facebook.com/telerik
//=======================================================
10
SWE20001 DP1 (100083700)
11
SWE20001 DP1 (100083700)
12
SWE20001 DP1 (100083700)
13