Innovative Solutions in Software Engineering and Architecture

 
S
o
f
t
w
a
r
e
 
E
n
g
i
n
e
e
r
i
n
g
a
n
d
 
A
r
c
h
i
t
e
c
t
u
r
e
 
HotStone +
My own Solution
 
H
o
t
S
t
o
n
e
 
Primary goal
Make a good and exiting learning experience in SWEA
 
Secondary goal
To create a real game server, allowing students to play
 
CS@AU
 
Henrik Bærbak Christensen
 
2
 
G
r
a
d
l
e
 
P
r
o
j
e
c
t
s
 
My code base is different from yours, as the provided
zips to you are made 
manually (sigh)
 by removing code
bits from my own repository.
First of all – my code base is divided into 
projects
Core
Is basically what you got in the first TDD Iter
UI
Is basically what you got in the MiniDraw Iter
Domain
My own alpha, beta, …, phi stone solutions
Solution
Server side full implementation
 
CS@AU
 
Henrik Bærbak Christensen
 
3
 
T
h
e
 
c
l
i
e
n
t
 
s
u
b
p
r
o
j
e
c
t
 
You get my code, right?
But you should not get
my solution code!
(You can ‘decompile’
a java .class file into something resembling the original source
code!)
And you do not, because
Client only depends upon ‘core’
Resulting JAR file only contains interfaces
and ClientProxy implementations 
‘PhiStone’ code only on server…
 
 
CS@AU
 
Henrik Bærbak Christensen
 
4
 
H
a
n
d
l
i
n
g
 
M
u
l
t
i
p
l
e
 
G
a
m
e
s
 
LandingPages
Lobby and objectId
 
B
r
o
k
e
r
 
U
s
i
n
g
 
U
R
L
 
T
u
n
n
e
l
 
The HotStone uses the FRDS.Broker library
Configured with the URITunnel Client- and
ServerRequestHandler
Which is super, because I can configure 
extra paths
Like the landing page
 
CS@AU
 
Henrik Bærbak Christensen
 
6
 
B
r
o
k
e
r
 
a
n
d
 
H
T
T
P
 
And allows me to respond to POST requests!
POST on /newgame
Body ‘variant=alpha’
 
CS@AU
 
Henrik Bærbak Christensen
 
7
Lobby will create the game, and
associate its ‘id’ with it.
 
G
a
m
e
I
d
 
Your servers only handle a single game
Game’s objectId does not matter
I have a GameInvoker which of course must use a Name
Service to fetch the right game to use
The ‘lobby’ maintains the mapping (id, game object)
 
CS@AU
 
Henrik Bærbak Christensen
 
8
 
O
p
t
i
m
i
z
i
n
g
 
E
n
e
r
g
y
 
a
n
d
P
e
r
f
o
r
m
a
n
c
e
 
 
R
e
c
o
r
d
 
k
e
e
p
i
n
g
 
Adding an Event Source
Database
 
CS@AU
 
Henrik Bærbak Christensen
 
10
 
R
e
c
o
r
d
i
n
g
 
A
l
l
 
E
v
e
n
t
s
 
SQL database on all events on all games played
Blizzard does the same to analyze ‘balancing’
I guess the current variants are too boring for that to make sense 
Adding behavior to Game
Should ring a bell !
Decorator Pattern !
 
CS@AU
 
Henrik Bærbak Christensen
 
11
 
D
e
c
o
r
a
t
i
n
g
 
M
e
t
h
o
d
s
 
Accessors: Just forward to original game object
 
 
 
Mutators: Add recording
 
CS@AU
 
Henrik Bærbak Christensen
 
12
 
A
n
d
 
D
e
r
i
v
e
d
 
E
v
e
n
t
s
 
Effects and Hero Powers
 
CS@AU
 
Henrik Bærbak Christensen
 
13
 
D
e
p
l
o
y
m
e
n
t
 
 
L
u
n
a
r
 
L
a
n
d
i
n
g
 
B
u
g
 
Windows Driver
Automated GUI Testing
 
CS@AU
 
Henrik Bærbak Christensen
 
15
 
A
d
a
p
t
e
r
 
o
f
 
t
h
e
 
T
o
o
l
 
Configure UI with normal MiniDraw tool
But embed it in an Adapter
 
 
 
Adapter: Adapt from one interface to another
This Adapter is a Window Driver Pattern
 
CS@AU
 
Henrik Bærbak Christensen
 
16
 
W
i
n
d
o
w
 
D
r
i
v
e
r
 
Thus I have a programming interface
playCard
 
… which do 
not call 
game.playCard
… but call mouseDown/Drag/Up on the provided tool!
 
 
 
‘windowDriver’ here is the MiniDraw tool
Clicking the card and releasing it on the battle field
 
CS@AU
 
Henrik Bærbak Christensen
 
17
 
A
l
l
o
w
i
n
g
 
t
o
 
r
u
n
 
t
h
e
 
U
I
 
 
CS@AU
 
Henrik Bærbak Christensen
 
18
Slide Note
Embed
Share

Explore the design and implementation of HotStone, an interactive learning platform and game server, developed by Henrik B. Christensen. Delve into Gradle projects, client subprojects, handling multiple games, URL tunneling with brokers, HTTP interactions, and game management features like GameId and lobby mapping.

  • Software Engineering
  • Architecture
  • HotStone
  • Interactive Learning
  • Game Server

Uploaded on Sep 26, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Software Engineering and Architecture HotStone + My own Solution

  2. HotStone Primary goal Make a good and exiting learning experience in SWEA Secondary goal To create a real game server, allowing students to play CS@AU Henrik B rbak Christensen 2

  3. Gradle Projects My code base is different from yours, as the provided zips to you are made manually (sigh) by removing code bits from my own repository. First of all my code base is divided into projects Core Is basically what you got in the first TDD Iter UI Is basically what you got in the MiniDraw Iter Domain My own alpha, beta, , phi stone solutions Solution Server side full implementation CS@AU Henrik B rbak Christensen 3

  4. The client subproject You get my code, right? But you should not get my solution code! (You can decompile a java .class file into something resembling the original source code!) And you do not, because Client only depends upon core Resulting JAR file only contains interfaces and ClientProxy implementations PhiStone code only on server CS@AU Henrik B rbak Christensen 4

  5. Handling Multiple Games LandingPages Lobby and objectId

  6. Broker Using URL Tunnel The HotStone uses the FRDS.Broker library Configured with the URITunnel Client- and ServerRequestHandler Which is super, because I can configure extra paths Like the landing page CS@AU Henrik B rbak Christensen 6

  7. Broker and HTTP And allows me to respond to POST requests! POST on /newgame Body variant=alpha Lobby will create the game, and associate its id with it. CS@AU Henrik B rbak Christensen 7

  8. GameId Your servers only handle a single game Game s objectId does not matter I have a GameInvoker which of course must use a Name Service to fetch the right game to use The lobby maintains the mapping (id, game object) CS@AU Henrik B rbak Christensen 8

  9. Optimizing Energy and Performance

  10. Record keeping Adding an Event Source Database CS@AU Henrik B rbak Christensen 10

  11. Recording All Events SQL database on all events on all games played Blizzard does the same to analyze balancing I guess the current variants are too boring for that to make sense Adding behavior to Game Should ring a bell ! Decorator Pattern ! CS@AU Henrik B rbak Christensen 11

  12. Decorating Methods Accessors: Just forward to original game object Mutators: Add recording CS@AU Henrik B rbak Christensen 12

  13. And Derived Events Effects and Hero Powers CS@AU Henrik B rbak Christensen 13

  14. Deployment

  15. Lunar Landing Bug Windows Driver Automated GUI Testing CS@AU Henrik B rbak Christensen 15

  16. Adapter of the Tool Configure UI with normal MiniDraw tool But embed it in an Adapter Adapter: Adapt from one interface to another This Adapter is a Window Driver Pattern CS@AU Henrik B rbak Christensen 16

  17. Window Driver Thus I have a programming interface playCard which do not call game.playCard but call mouseDown/Drag/Up on the provided tool! windowDriver here is the MiniDraw tool Clicking the card and releasing it on the battle field CS@AU Henrik B rbak Christensen 17

  18. Allowing to run the UI CS@AU Henrik B rbak Christensen 18

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#