This repository has been archived on 2026-04-30. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Tortuga/docs/pseudocode.txt
T
2013-04-28 23:04:17 +10:00

52 lines
794 B
Plaintext

Client:
loops
handles input from the user
handles graphics and sound
communicates with the server (how?)
-------------------------
Server:
loops
accepts new connections, disconnections, and handles loss of connections
holds the positions/data of all players
Player:
id
[graphical stuff]
position
velocity
-------------------------
Animations:
multiple cells in one animation (x-axis)
multiple animations in one sheet (y-axis)
Image:
SetSurface(surface)
GetSurface()
SetClip
GetClip
//clips
-------------------------
Rememer: Top down programming/K.I.S.S.
KeyDown:
up:
PlayerManager.ShiftMotion(playerIndex, up)
down:
PlayerManager.ShiftMotion(playerIndex, down)
...
end
Receive:
switch(message->type):
player update:
PlayerManager.Update(message)
end