-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathugameshare.pas
More file actions
57 lines (45 loc) · 1.92 KB
/
ugameshare.pas
File metadata and controls
57 lines (45 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
(******************************************************************************)
(* *)
(* Author : Uwe Schächterle (Corpsman) *)
(* *)
(* This file is part of Client_Server Demo *)
(* *)
(* See the file license.md, located under: *)
(* https://github.com/PascalCorpsman/Software_Licenses/blob/main/license.md *)
(* for details about the license. *)
(* *)
(* It is not allowed to change or remove this text from any *)
(* source file of the project. *)
(* *)
(******************************************************************************)
Unit ugameshare;
{$MODE ObjFPC}{$H+}
Interface
Uses
Classes, SysUtils;
Const
FrameDeltaInMs = 40;
DeltaMoveOnKeyPress = 5;
Type
// Attention as this datastruct is directly used to stream, it shall not
// contain any dynamic data !
TPlayer = Record
PlayerID: Integer; // ID given by Chunkmanager
x, y: integer;
Points: integer; // Number of collected Items
// ADD static user fields, no dynamic fields (like strings / arrays !)
End;
TItem = Record
OwnerId: Integer; // ID given by Chunkmanager
x, y: integer;
End;
Const
// Messages from server to client
msgSetPlayerID = 0;
msgAktualGameData = 1;
// Messages from client to server
msgPlayerPosition = 100;
msgPLayerPlacedItem = 101;
// Messages that can be send from both, client and server
Implementation
End.