[personal profile] fardell24

Digital and Interactive Games 2015, Term 3, Session 9'
Today: - Framework for a full game

1) FullGameTutorial
commands
- fullgame
- fullgameplayer

2) Add Scheduler to your project
public void run() {

}, 60, 10) ← run every 60 ticks

3) running (boolean)

gameState (int)
0 – not running
1 – Wait to start
2 – Phase 1 of the game
3 – Phase 2 of the game
4 – Winner found
5 – End of time/draw

4) Initialise variables

5) Set Running (boolean b)
setGameState(int I)
clearGameTime()
updateGameTime()

6) In FullGameCommand
- option[0] is “turn on”, call plugin.setRunning(true)
.setGameState()
.clearGameTime()
– option[0] is “turn off”, call plugin.setRunning(false)
– .setGameState(0)
– .clearGameTime()

 photo WS2W5001_zpsozlstxl3.png

1200 → 1 minute


7) Place updateGameTime in the Scheduler
(make sure to only call it if the game is running)

8) modify updateGameTime to perform the timeline function
- calculate the exact point where gamestate changes (print out)
- After state 5 (or 4), do not increment gameTime

9) Implement Block Break Listener
- if (the block is “wool”)
(Change gameState to 4)
- print out the player who broke the block

10) get GameState int
Then, make sure that in the Block Listener that state == 2 or 3

11) variation | called gamePlayerList (create as ArrayList)
- setGameState, call populate Player List when gameState is 2.

12) In the BlockBreak Event, check if the player is in the plugin.gamePlayer List

13) In Set GameState, when gameState is 2, teleport all players (in the playerList) to a designated location.


May 2025

S M T W T F S
     1 23
45 6 78910
11 12 13 141516 17
1819 2021 222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 22nd, 2025 06:42 pm
Powered by Dreamwidth Studios