-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathtodo.!!!
410 lines (365 loc) · 27.5 KB
/
todo.!!!
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
Mar,2019:
- use pdb files (can borrow code from umodel), probably remove .dbg file system at all
- most HL maps (game=hl) will say that there's no spawn point: probably should replace some entity with it?
- most HL maps uses wad files, so they're not textured - code assumes that WAD will be converted to TGA with
offline tool "WadExtract"; should load WAD files?
-------
- limit packet size to 1400 bytes (old behavior), but add possibility to use a few sequential packets as a single
large packet (new protocol); should support "older new protocol" for demo playback compatibility
- server->client: do not remove entities which are not visible for player - simply stop updating their properties
(this may significantly reduce bandwidth when there are a lot of "static" entities on the map)
- find a way to make ERR_DROP without exception (so Quake will be full-functional with DO_GUARD=0)
- Q3 knc_dm1 - hung on loading
- dlights: currently uses vertex color for planar surfaces (when gl_vertexLight=1), and dlight texture for trisurfs
- textured dlight will be applied with PostLight() as separate rendering pass -- should try to combine passes
color = (vertex_color + dligth_texture) * main_texture -- single pass!
- can try to use textured dlight event for vertex-lit planar surfaces
- vertex lighting: surfaces are darker, than lightmapped surfaces -- should use 2x modulation for vertex color
! used stack few times (count + array[] of any type) -- implement as template with push/pop methods (may be, replace
push/pop with some math operators -- ">>" or "<<" etc)
- dedicated server: when launched few dedicated servers on the same machine, only one will use standard server port, all other
will use 1st available port -- this will not allow to find other servers from network (check this!); to fix this:
- create shared memory region (or special file?) and store process info (win32: window handle (or pid?), unix: pid)
- when one of servers uses standard port, and it will receive "info" request from network, it should send signals to other
local servers with info about requesting machine (which will get reply), and these servers should send the same reply,
as "primary" server
- when "primary" server exit, it should send signal to other processes, and one of them should take standard server port
(and became new "primary" server) -- this standard port should take only "info" requests?)
* required new Core features:
- shared memory (named?)
- signals between processes
- trace: when startsolid, can detect additionally:
- startContents (contents of brush, where start point placed)
- leaveSurface (surface, which trace crosses when entering non-solid brush) -- may be used for 3rd person inside water - do
not leave water volume by viewpoint
- leaveFrac, leavePos
? add ability to trace through CONTENTS_SOLID (find enterpoint and leavepoint)
- extend CM_CombineTraces() for this
- work via proxy server (SOCKS)
? check Q3 (initializes SOCKS, but not used its socket?!)
- check "FreeCAP" (www.freecap.ru) - open-source prog, which adds SOCKS caps to any app
- http://antinat.sourceforge.net/ - SOCKS server and client libs
* doc: misc/net/rfc1928.txt
! server: packets are read with unlimited speed, but sent back only sv_fps (10) times per second
? may be, split server->client data into 2 lists: game flow (10 times per second) and secondary flow (connection info,
downloading data etc -- sent back to 'extProtocol' clients every frame)
? what will be, when server will send all data every frame, but will run game frame only 10 times/sec ?
- server sent to client data, packed into frames; each frame have counter; we cannot increment it w/o running game
frame; may be, we can modify client code to accept non-framed data from server (new protocol)
? downloading is not connectionless (because created user to hold current file info ?)
* this will allow 'bandwidth+CPU'-limited download/connect speed + fix problem of frozen connection when changing map with
timescale=0
? server should do ge.RunFrame() 10 times/sec, other funcs can be called at any time
? attach priority to packets: downloading should be less priority (will go fast, when fast connection or no players connected)
- com_speeds: currently, displays some server stats - can use sv_texts.cpp funcs for this; and - separate cvar for this
- software gamma: should use identityLight corrected by gamma(but: 1**any==1 ?!)/brightness/contrast (not overbright only)
? but: sometimes texture modulated by identityLight; separate identityLight and textureIdentityLight ??
? may be, only replace 'glBind(NULL)+glColor(color*identityLight)+DrawRect()' (white texture) ->
'glBind()+glColor(gamma(color)*identityLight)+draw'
? may be, bring back white texture support (glBind(NULL) -> glBind("*white"))
! "symbols.dbg": should bind to executable or encode compile version (win32, mingw32, cygwin etc) into file name to avoid
conflicts, when few versions (mostly - win32+unix) resides in a single directory
? remove "./" from all OS filename starts ? (when non-game mounted FS used -- for .pak files etc (not "./baseq2/pak0.pak" but
"baseq2/pak0.pak")) -- but keep for quake fs to allow load root-relative file (w/o searching in few game dirs + w/o adding "baseq2")
- can replace (add synonym for "./path" = "/path" and use it everywhere)
! add [auto-]detail for rail
? make InitialSnapPosition() work with Trace() to allow "teleporter grenade" in LOX mod
! check for valid key names for bindings (now: works ':', ';', '+', '=', UNK01, Ctrl+Alt, Alt+Ctrl etc)
- beams are not depth-sorted now! (to sort it, needs to create temp entity!)
- minimize in Win98:
- check WM_ACTIVATE(bool), WM_SIZE(min) order
- may be, will fix if WM_SIZE(min) will be handled only when AppActive==false
- "conchars.pcx": create drop-shadow effect (in pic; may be, require to cut (as grid) + grow image + different drawing code)
for better reading (require MemBitmap fx code ...)
- crash.log:
- CVAR_LOG -- add to crash.log on fatal exit (vid_ref,developer,dedicated,version,
+ {game,mapname,deathmatch,cheats,maxclients}==CVAR_SERVERINFO)
- log OS version, app command line
- intro playback: do not display "loading" for cinematics (wait a little before displaying splash?), + try to parse "nextserver"
in Demomap_f() to not launch demos (but keep current code just in case); disable "nointro" code in sv_cmds.cpp::SV_DemoMap_f()
when app command line contains "map"/"demomap" command (and automatically disable intro; change "4.XX_Changes.txt" about this)
Current: when specify "map", intro will be initialized + immediately server changed to map; when specify "demomap", server
will be killed as it was called from "d1" alias
! LARGE (STATIC) ARRAYS:
- cl_particles[] - 240 Kb (4096 particles) -- try to reduce particle_t size (different types -> union) + MAX_PARTICLES=256 (?) -
- most particle use was from railgun effect, which is gone (almost gone); may be, analyze cl_newFx cvar and dynamically
allocate array of good size (i.e. make array dynamic)
- cl_parse_entities - 164 Kb
* (dynamic) cl_entities[] - 1024 * ((entityState_t==(41*4))*3+6*4) = 1024 * 516 = 516 Kb
! backend: few static arrays [MAX_VERTEXES][MAX_INDEXES][MAX_SCENE_SURFACES]
? all gl buffers should be allocated dynamically; may be, vary size from map surface count
- fatal error msgbox: display few latest warnings (if going one by one); may be, display as "advanced info" (checkbox)
MOD-DEPENDING UI OPTIONS:
~~~~~~~~~~~~~~~~~~~~~~~~~
... all or current mod only:
- player models
- browse maps
- autocomplete map/demo names
MOD COMPATIBILITY:
~~~~~~~~~~~~~~~~~~
- models.cpp: do not cut light entities (send them to game dll too)
- bindings: use common movement/looking binds, or completely separate set
+ may be, common (baseq2) weapon bindings
- config: use separate system settings (video resolution/gamma, sound volume ...)
- fx: use new or old fx system (cl_newfx)
- protocol: disable protocol extensions (sv_extProtocol)
- rename all "*_debug" cvars => "debug_*" (more correct names); enable when !NO_DEBUG only
- "paused": incorrect timing (at least, fx will be incorrect after paused=0)
- should reimplement it in a different way
- may be, make multiplayer pause (with sync clients to server; make attention to not timeout clients when server is paused)
? check for hook ability of accurate PMove (more than 1/8) (2 non-spectators cannot be in the same quantized world point;
every new player will be performed InitialSnapPosition()
- idea: save non-quantized+quantized positions (+velocity?); next time find non-quantized by quantized (save for few pmove types
only to avoid 2 ghosts in one quantized place); may be, if few players in one quantized place - ignore detailed info
- problem: detect out-of-date positions (player was respawned and its position was changed+snapped))
! win32 console app: use "SetConsoleCtrlHandler()" to hook exit with "x" or Ctrl-C
! command "banchat": disable chat of concrete IP; implementation variants:
1) disable "cmd say[_team]" etc. for client (will not disable non-"say" chat, when message typed in console)
2) disable PRINT_CHAT with text "Player: message"
3) (best?) hook ge->ClientCommand(from), and disable all PF_cprintf(to,PRINT_CHAT,"...") inside this call, when from!=to
! spec for map script
- colorize server list (old/new-only/cheats/full) (make legend ? or make table with some attributes: server-name, map-name, players,
cheats, protocol (old,both,new))
- sv_extProtocol: "2" - force (no clients without this); if map.type != map_q2 -> force too; if cl_extProtocol=0, but server
requires it, connect with extProtocol (should add sv_extProtocol to serverinfo + check it on a client side + detect non-q2 maps)
? scoreboard: add blendrect (try to improve look anyway ...)
! prediction errors:
- zaero, plasma shield (jump + shield in down direction - movement lock when landed on shield);
original Q2 works incorrect too, but in a different way: can pass through shield
! lerp entity angles (may remove bug with locking inside opening door)
- "client" source dir: split game-related stuff (effects, particles, prediction etc) and sound/console/keyboard/menu into separate
dirs (choose 2 names from: cgame, client, ui ... etc)
? effects::dlights: may be, when fading dlight, modulate its color, not intensity -- this will allow to combine few dlights from
the same position, but with different color, into a single one
- input, sound: check requirement of linking to hWnd; perform as less as possible work for re-activating when cl_hwnd changed
(Vid_NewWindow() called)
----------------------------------------
- option "Screen Flashes" (flash scale ? -- 0 - invisible, 1 - as is)
- compile option: store configs and savegames (and screenshots?) in "ApplicationData", "MyGames" or inside game directory
? Linux: "~/<APP_NAME>/<MOD_NAME>/..." (under user's home directory)
- this will allow to launch game directly from CD without installation
- if Win32 can't get keyboard focus, "set r_fullscreen 0" (as Unreal2)
REDUCE GAME DATA SIZE:
- add .ogg support, convert audio to .ogg format (try .ogg, then .wav ...)
- remove mipmaps from .wal textures (original q2: used in soft renderer only)
BINDS:
- "bind key action1|onrelease action2" (Unreal-like); current: "bind key +action" == "bind key +action|onrelease -action" only
- "bind -ask <action>": will display "Press a key or button for this action" MsgBox and wait for user to press key
(ESC - cancel); when key pressed, <action> will be bound to this key; this may be useful for binding to keys, which names
are unknown, + for scripts, + general "controls menu" may be reimplemented with this command
? bindtmp, aliastmp (not stored in config ?) ("bind [-temp] <key> <action>", "alias ...")
SAVEGAMES:
- check compatibility with original Q2 savegames (incompatible?!)
? show game time (like Anachronox)
- quicksave: save to a few (3-4?) slots
- sort savegames by time, ignore slots; any number of savegames (?), any savegame names
? compile option: NO_SAVEGAMES - remove save/load game code
? gzip file (or pkzip file -- can keep uncompressed only "current" save dir; will require to load/unload savegames.zip for
displaying savegame menu)
KINGPIN:
- fire/steam fx
HALFLIFE:
// from pm_shared.c
- step sound: volume = 0.2/0.5 (walk/run) (+ add slowwalk -- crouched)
- if moving slow - no step sounds
- walking/running: step sound length = 400/300; water = 600; ladder = 350
HALFLIFE2:
- measure and display (as number) fillrate (current: 3d display only); + needs to disable fog (for KP etc) !!
? check their full-scene fog implementation (for multi-pass rendering)
CAMERA:
- interpolate camera 1st/3rd person change
? cl_3rd_person 2 -- smooth camera; add game option: play with 3rd person camera (ext protocol only ?)
- 3rd person camera trace: can extend Trace() to detect point of contents change
(do not leave water; current: will not enter water, but can leave it)
- trace note: can add flag for contents: CONTENTS_VIS_BLOCK (different name?) to detect visibility block: can check
collided brush side surface flags - when TRANS33 | TRANS66 | ALPHA | NODRAW (?) - continue trace, else - stop
TRACE:
? speedup ClipToEntities() (client/server/ref_gl):
- COMPARE only with entities in range (start - trace.endpos) (trace.endpos frequently updated); can sort ents by
distance (find a list of potentially collided ents, sort by coord and collide + update collision limits with additional
refining following traces)
1) sort potentially touchable entities with MIN distance (dist(ent,start)-ent.rad (rad??)): 1st -- nearest
end=max_dist
2) loop: if (dist(ent)>end) break; Trace(ent); if (collide) end=dist(ent);
NOTE: cannot TRACE to (start - trace.endpos) - will produce different trace.frac
+) add something like ent.worldMatrix in client/server prediction, call BoxTrace() instead of TransformedBoxTrace() when true;
for alias models: make origin=0,angles=0,box=mins+origin,maxs+origin (make separate "trace" function for this (clip line
with AABB) ?)
- test:
1) compare trace bounds with ent bbox (very fast; like AreaEdicts())
2) compare ent sphere with trace cylinder (already implemented ?)
3) TransformedTrace() (already ?)
- speedup detection of "tr.fraction != 1" - stop on 1st collision -- special trace flag; or -- BoolTrace(); current: may be used
BrushTrace() with 1 leaf ?
- TransformedBoxTrace: replace (headnode,origin,angles) with entity; make HeadnodeForBox() -> tempEntity;
cache/update ent.angles->ent.axis ! (in renderer: ClipToEntities() -- use TransformedBoxTrace; send to renderer axis, not angles
(check how this will affects left-hand weapon model))
? try something like AreaEdicts() for client trace code
? make blaster/rocket shooting do not clip by sky (game trace: sky brushes -> playerclip, monsterclip, but bullets will go here)
problems: 1) PointContents() will display CONTENTS_SOLID; 2) after sky contents may go CONTENTS_EMPTY -- another part of map --
bullets should not leave sky
- console: "nochat" - disable messages from game (engine/developer messages only); may be, display game messages
in notify area only ? (this will require console extensions, 2nd console etc.)
- improve (speedup) MSG_WriteDir() with tables
- cvar commands: "push", "pop"; 2 variants:
a) push <var> , pop <var> -- each cvar have its ovn stack; "push $a;push $b;pop a;pop b" will not change vars
(needs "save"/"restore" names for commands ("save" is already used) ??)
b) push <value> , pop <var> -- global cvar stack; "push a;push b;pop a;pop b" will exchange "a" and "b" values
MODEL SYSTEM:
~~~~~~~~~~~~~
- needs ability to specify model gender without "models.lst" file (special config file in model dir) -- q3a models have "animation.cfg"
? player setup: add model type/gender filter
? make pmove player bounds to be taken from the actual player model (server option (?), requires extptotocol for
correct prediction)
? create (compressed ?) model cache (some model loading stages are slow, e.g. normal calculations and skeleton building (if will be
implemented))
- ability to detect unused models/skins (for unloading from renderer)
- client entity code should work with this_model_system objects, these objects should link to renderer models (move refEntity_t to
model system); may be, use CBaseEntity -> CRendererEntity, and allocate entities by renderer (frontend) with some basic caps from
client code (i.e. renderer will allocate and display (and perform some display-relative modifications), but most modifications
will be performed by client code)
? improve camper detection: track player position every ... 5 sec (??) for a 1+n minute period and set "camper" to true
if current player position is near (tune this distance !) to history[now-1min .. now-2min]
- menu option: priority (win_priorityBoost) -- for Win2K+
- UT2003-like light bulbs (flares) near player head for teamplay game (standard Q2 teamplay detects team by skin - it
is possible for Q2; but problem to detect flare positions (can find position in idle md2 frame, and project this position
to another frames using nearest triangle; for md3 - easier, because head is separate model ...))
BSP:
~~~~
? KP map scaling (auto) -- needs force extprotocol
? mirrored maps
? commands spmap, devmap etc. (set "cheats" and "deathmatch" vars before SV_Map())
- advanced "map" command syntax: add scaling and mirroring (separate scale each axis, mirror - X *= -1 ?)
"map [-dev] [-sp] [-mirror] [-scale] <name>" (?!)
*** BUGS ***
- 3rd person view: ground3_beta3, dist=300, enter dark place (near ladder) between street lamp and garage: garage
door will disappear (server sends entity list depends on model origin, not vieworg) -- needs protocol extension,
when client sends its 3rd-person origin too, and server uses BOTH positions for PVS multicast
- script comments stripper: removes '//' and '/* ... */' comments from each line (should remove from script only) AND
'/*' will work as '//' when no corresponding '*/' (for example, cmd "map /*lightmap1" will work as "map ", but when mapname
is quoted - works fine) -- do not remove comments from console command line ?
! add materials: glass, grass, sand
? make atmospheric effects (some maps in kingpin and halflife does, Q3F too ...)
(make surface-dependent raindrop sounds? (KP:main/sound/world/rain*.wav))
------------ MENUS ---------------
- when menu script will be implemented:
- add developer submenus
- M_DrawTextBox()+M_Print() used only for "please wait" messages; replace with MessageBox-like function
! can add menu item to view screenshots (browse like levelshots?)
-------- CLIENT/SERVER -----------
- record demos: make .dm2 file to be gzipped (produce with command other than "record"?)
(may use old command too: who wants to send demo to other players, may just un-gzip it)
? demos with full list of events (already: serverrecord);
! make player for this demos (total control over movement: move, chase, eye etc.)
? add support for moving ladders: when player on entity with ladder, move player within entity (example: map "mesto", helicopter)
(seems, this is game code ...)
? downloading:
? sv_user.c :: SV_NextDownload_f() -- should limit downloading speed when server is on modem
- ext protocol:
- allow downloading of jpg/tga instead of pcx/wal (any suitable image) (when extProtocol connection only!)
- download paks (when not very large - limit max size with cvar)
* download map levelshot (current: jpg only, no other file types)
- download player models/skins at game time (and allow download indicator during game)
- menu: move "download options" to another place (not "player setup", or to upper level: where model selection performed)
(separate for server/client)
- make download options:
a) to be a bitfield (and make additional options: download paks etc); separate sv and cl download options
b) remove client-side options, make menu: "file absent - can download" with options: disconnect, download as separate files,
download as pak (+display pak size; only when in pak and pak name is not "pak%d.pak"), ignore file (not for *.bsp)
- place downloaded files into "downloads/" dir (check before downloading - may be already downloaded) + link file (or for paks -
make "loadpak downloads/<name>.pak"
? may be, limit this dir by size or file lifetime (work as cache)
? server with long player names: replace all userinfo names with special names (va("\x01\x02%2d",id) etc.), and when game dll
will try to display this name somewhere (check all API functions!), replace it with original name
! WANRING: check demo recording -- should display correct names (this is client-side, so - safe ?)
? SV_FindIndex() -- use hash tables ?
? server: if game_time is comparable (or greater than ?) with ref_time, need to Sleep(game_time) every frame between game
frames (smooth FPS) -- check as UT does (have required sources for UT436)
- map "trainstation": very slow (10-20ms) server (AMD K6-2+) (slow SV_AreaEdicts(), >800 times/sv_frame)
?? cl_maxfps: can better control max FPS (currently: if non-limited fps is 250 (4ms) and set limit to 200 (5ms), real fps will
be 125 (8ms) (really, 170 -- not 200!)); improve: move FPS control to CommonFrame(): we can know, how much can Sleep()
(CHECK: may be, current implementation is correct -- can't get exact maxfps, when fps is large -- 1ms->1000fps, 2ms->500fsp:
small difference in ms, large in fps)
- server: when loading, ignore timescale (state is always ss_game, but clients are not spawned)
----------- RENDERER -------------
- R_RecursiveWorldNode():
3) fog-in-leaf
4) leaf-use-detailTex
- portals:
- add 2nd {viewcluster, leaf[].frame} set (1st for main scene, 2nd for portal) -- Q3 has recalculation of leaf visibility
every frame twice, and without portal - once per few frames.
- culling:
1) PVS: project portal entity to destination, find its leafnums->clusters, combine PVS
2) shrink frustum by original portal entity (may use GetBoxRect(entityBox)); shrink 5th frustum plane too!
3) use this computed data for determining rendered leafs
- requires server-side code to not cull entities by PVS, when player can see it with portal
- rendering:
- use glScissor()
- try to use 'Oblique Frustum Clipping' (NV demos) for free clip plane (aligns near clip plane to user clip
plane, this will modify Z coord, but allows clipping using 'Z<0')
? try implement using stencil or render-to-texture
? place LoadMd2 outside renderer and perform lovercase for a skin names
! fog occlusion (for global fog) -- implement it like sky (occluded surface -> sky surface, sky -> fog color);
may look at Alice (additional clip plane to 4 frustum planes)
- detail textures + magnify filter (i.e. advmame2x -- check its name!) - use file "detail.lst" (?) which will specify detail+filter
for Q2 (KP) textures
------------ SOUND ---------------
? make ladder sounds (if it is possible) - depends on ladder surface type (wood creak etc.)
? add hardware mixing (DirectSound), try DirectSound3D (or OpenAL, or own implementation ??)
Maps with slow sound fx: beachassault (multiple barrel blast)
- make camper sounds gender-sensitive; change sounds (get it from Thief II), but let old (current)
system works with "sv_campersounds 2"
? spectator sounds (windy)
? try to move surface bullet sounds from client to server
------------ VIDEO ---------------
- .WAL mipmaps: used in ref_soft only (if recompute, can shrink wal files by 1st mipmap -- reduce size of texture.pak)
- to recompute: 1. convert 8->32 bit; 2. generate mipmaps (as for TGA/JPG); 3. downsample 32->8 bit
- may recompute mipmaps only when absent (when present, use from wal file)
- check: can wal-handling program (wally, qbsp3, qe4 etc) load shrinked images
? h/w gamma: check for valid gamma when read
- CDS:
- when mode cannot be changed, use current (with fullscreen available); try to enumerate video modes ?
- add support for "1024x768@70"-like strings (see UT2003 for ideas)
- add marks: bulletholes (?), explosion marks, blood (!), "cheesy shadow" (!), water ripple
? support for view-dependent LightForPoint()
------------ COMMON --------------
? console command line parsing: add special chars (C-like '\"' etc.)
? console: change "]/command" -> "]command" (after completion, may be, other places), but keep
removing "/" and "\" at line start before parsing; may be, change prompt "]" -> other (">", "#"
or #define'd string; draw prompt separately -- remove it from input line, i.e. empty line will be
"" (in memory), not "]")
? may keep Q3-like behavior (any text during game, not beginning with slash -> chat) -- but for multiplayer only (not for
botmatch) and when developer=0
- md4.c::Encode()/Decode() -- works exactly as memcpy() for little-endian platforms, memcpy()+LongSwapBuffer() with big-endian
- create tool for automated Little/Big-endian file format conversion (parse C-headers); can create table:
num_recs * { rec_offset , num_bytes } (provide table as resource files for big-endian platforms ?)
-------- GAME LIB / VM -----------
!? add Python or Lua virtual machine (game library, inline map scripts, GUI, map preprocessing)
? loading Win32 mods in Linux (Wine-like DLL loading)
? add support for loading ELF (other format?) object files -- cross-platform (any x86 platform), can place object files into paks;
can implement renderer or gui or anything other as ELF package and place it into pak (ideal: small platform-depending exe with
support of loading ELF modules)
------------- CVARS --------------
? cvarclear - clear all archive flags from cvars, which was not created with quake2 (created with "set <var> <value> a" command)
?? cvar_mon varname [message] - monitor cvar on screen (default message = varname)
?? cvar_unmon varname - stop monitor for cvar
- CVAR_USERINFO, CVAR_SERVERINFO: these lists are static (and same in all mods - no reliable way to extend this list) - remove
cvar flags and make static arrays "cvar *userInfo[], *serverInfo[]" for such processing; G_CvarGet(): clean these flags (keep
ARCHIVE and GAME_CREATED, may be LATCH - only?)
- add flags (or explicit command) for:
- disconnect (game)
- vid_restart
- in_restart
- check CVAR_LATCH commands
- check all var->modified fields
Problems: 1) when var from renderer DLL, associated string or func may point to unloaded DLL memory; 2) var gl_mode etc: when ref_soft
active, its modified flag should be ignored (both problems - when var registered from module, which currently unloaded)
----------- COMPLETION -----------
? completion cvarnames after "set", "toggle", "add" (etc.) and "...$varname"
(add flags for Cmd_AddCommand() - complete type: cvar, map, demo ... ???)
? add special arg (or value for argv[1]) for command - to get completion type ("maps/*.bsp", "demos/*.dm*", "cvars:*", "bindings:*" ...)
? check HL2 - how implemented there
? complete savegames too (load/save command)
? make completion "dir"-like formatting + colorizing against char-marks (types)
? add "Cmd_AddHidden()" - for server commands (cannot be completed/listed, but accessible)
(or just implement with Cmd_AddCommand(), but use name prefix, which will be ignored for searching, but disables completion)