From 194b8b358fc8603da2c102dcf46f20b23a31aea4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 8 Aug 2008 15:02:19 +0000 Subject: documentation updates, new default binds, HUD updates --- doc/ROADMAP | 4 +++ doc/TODO | 22 +++++++------- doc/models.html | 2 ++ doc/world.html | 24 +++++++++++++-- src/client/keyboard.cc | 9 ++++-- src/client/view.cc | 81 +++++++++++++++++++++++++++++++++++++------------- 6 files changed, 106 insertions(+), 36 deletions(-) diff --git a/doc/ROADMAP b/doc/ROADMAP index e63dd96..1d0e8ae 100644 --- a/doc/ROADMAP +++ b/doc/ROADMAP @@ -64,6 +64,7 @@ Requires: enhanced docking gui commodities market fuel system? + economy? ------------------------------------------------------------------ @@ -77,6 +78,9 @@ Requires: equipment market + ------------------------------------------------------------------ +* version 0.5 - Public alpha + ------------------------------------------------------------------ diff --git a/doc/TODO b/doc/TODO index 1ae6577..7e253a3 100644 --- a/doc/TODO +++ b/doc/TODO @@ -3,17 +3,17 @@ TODO version 0.1: fix turning (needs more testing) fix cl_prediction (or not) - fix autolevel - zone/entity network interaction - + zone/entity network interaction (ok) + targetting system (ok) version 0.2: docking - targetting system server-client event system, hit-once lightweight entities explosion events weapons fire events + + model trigger_dock version 0.3: gui @@ -30,7 +30,8 @@ model: split map loader from model (ok) model fragments (ok) - support model parts (e.g. func rotate) + support model parts (e.g. func_group, func_rotate, func_door) + core: connection to remote game (ok) read/write configuration file (ok) @@ -53,6 +54,8 @@ network: zlib compression (partial) protocol version in handshake (ok) rcon framework (ok) + zone changes (ok) + round thrust/speed on 1/100 (ok) protocol description (incomplete) private chat @@ -60,14 +63,13 @@ network: group/clan chat (requires groups) rcon authentication, rcon command, servers must be able to disable rcon - zone changes send clients only updates from the current zone/server-side distance check fix lag/client interpolation rename cl_prediction to cl_interpolation detect and disconnect clients behaving badly EXT messages, update extended property "ext id prop value prop value etc", type checking/serperator etc.. EXT zone/color/shield/armor/health - round thrust/speed on 1/100, location on 1/1000 before send + stable ent/die client: @@ -83,8 +85,7 @@ client: fix camera frustum clip (size issue, postponed) view_next, view_prev (ok) - mouse select on release event while - tracking camera absolute speed + tracking camera absolute speed/position visual feedback on impulse drive render: @@ -94,7 +95,7 @@ render: texture registry (ok) add small camera light (ok) - test/fix? lighting without sun in world.ini + test/fix? lighting without sun in zone.ini sun light strenght skysphere distortion at the poles @@ -107,6 +108,7 @@ sound: user interface sounds (ok) enitity/event positional sounds + impulse/jump drive sound events game: add impulse drive (ok) diff --git a/doc/models.html b/doc/models.html index a2835aa..d2dfdba 100644 --- a/doc/models.html +++ b/doc/models.html @@ -97,6 +97,8 @@ The limits of map coordinates are placed on +/-16384 map units. Placing brushes outside these bounds will have unpredictable results. The map will be scaled down to make 1024 map units correspond to 1 game unit. + One game unit corresponds to 100m in-game. 16 units in radiant will + therefor be 1.5625 meters.

The front of a model points along the positive X-axis, the positive Z-axis is up, the positive Y-axis is left. In GtkRadiant, the nose of diff --git a/doc/world.html b/doc/world.html index a8d9790..3ead6fe 100644 --- a/doc/world.html +++ b/doc/world.html @@ -156,7 +156,7 @@ default=no diamond - a regular octahedron with an axis + a rotating octahedron with an axis @@ -173,6 +173,11 @@ default=no the radius of the entity in game units +

+ 1 game unit translates to 100m in-game, an entity with a radius of 0.5 + would fit into a sphere with a diameter of 100m. +

+

An entity with a model can be created by setting the model key. The radius of a model is automaticly calculated: @@ -209,6 +214,8 @@ default=no x, y, z values of the entity location, z is up +

+ 1 game unit on the x, y, or z-axis translates to 100m in-game.

Orientation can be set thought the direction, pitch, and roll keys: @@ -257,11 +264,22 @@ direction=315 color=222 192 145 +

+ [navpoint] +

+

+ Space is a big place. Navigation points can help players to find their way around. +

+[navpoint]
+label=navpoint_north
+name=Navigation point North
+location=1024 0 0
+

[planet]

- A planet is spherical entity with a texture. and a default radius of 32. The planet globe will + A planet is spherical entity with a texture. and a default radius of 64. The planet globe will be rendered with lighting enabled.

@@ -285,7 +303,7 @@ color =0.5 0.5 0.8 [star]

- A star is a spherical entity without texture and a default radius of 48. The star globe + A star is a spherical entity without texture and a default radius of 96. The star globe will be rendered fullbright and serve as the main source of light for the current system. At the moment only one system light source is supported. If you define multiple stars, the last one will serve as light source. diff --git a/src/client/keyboard.cc b/src/client/keyboard.cc index 57d99b3..af7f2ed 100644 --- a/src/client/keyboard.cc +++ b/src/client/keyboard.cc @@ -127,7 +127,7 @@ Keyboard::Keyboard() key->assign(Key::Shift, "view_prev"); add_key("w", SDLK_w, 'w'); - add_key("x", SDLK_x, 'x'); + add_key("x", SDLK_x, 'x', "target_center"); add_key("y", SDLK_y, 'y'); add_key("z", SDLK_z, 'z'); @@ -165,7 +165,10 @@ Keyboard::Keyboard() add_key("f1", SDLK_F1); add_key("f2", SDLK_F2); add_key("f3", SDLK_F3); - add_key("f4", SDLK_F4); + key = add_key("f4", SDLK_F4); +#ifdef _WIN32 + key->assign(Key::Alt, "quit"); +#endif add_key("f5", SDLK_F5); add_key("f6", SDLK_F6); add_key("f7", SDLK_F7); @@ -215,7 +218,7 @@ Keyboard::Keyboard() // joystick button aliases add_key("joy0", 564); - add_key("joy1", 565); + add_key("joy1", 565, 0, "target_center"); add_key("joy2", 566); add_key("joy3", 567); add_key("joy4", 568); diff --git a/src/client/view.cc b/src/client/view.cc index eef3920..e1e0820 100644 --- a/src/client/view.cc +++ b/src/client/view.cc @@ -31,7 +31,7 @@ namespace client core::Cvar *draw_ui = 0; core::Cvar *draw_stats = 0; -core::Cvar *draw_location = 0; +core::Cvar *draw_devinfo = 0; core::Cvar *draw_keypress = 0; core::Cvar *ui_pointercolor = 0; @@ -53,8 +53,8 @@ void init() draw_stats = core::Cvar::get("draw_stats", "0", core::Cvar::Archive); draw_stats->set_info("[bool] draw network and render statistics"); - draw_location = core::Cvar::get("draw_location", "0", core::Cvar::Archive); - draw_location->set_info("[bool] draw world location"); + draw_devinfo = core::Cvar::get("draw_devinfo", "0", core::Cvar::Archive); + draw_devinfo->set_info("[bool] draw developer information"); draw_ui = core::Cvar::get("draw_ui", "1", core::Cvar::Archive); draw_ui->set_info("[bool] draw the user interface"); @@ -161,16 +161,14 @@ void draw_status() Text::draw(video::width-Text::fontwidth()*12-4, 4 + Text::fontheight()*2, stats); } + // draw keypress + if (draw_keypress->value() && input::last_key_pressed()) { + Text::setcolor('F'); //set fancy color + Text::draw(video::width-4-Text::fontwidth()*6, video::height-Text::fontheight()-4, input::last_key_pressed()->name()); + } + // draw a basic HUD if (core::localcontrol()) { - status.str(""); - status << "^Nthrust ^B" << std::setfill(' ') << std::setw(5) << std::fixed - << std::setprecision(2) << core::localcontrol()->thrust() << " "; - - status << "^Nspeed ^B" << std::setfill(' ') << std::setw(5) << std::fixed - << std::setprecision(2) << core::localcontrol()->speed(); - - Text::draw(4, video::height - Text::fontheight()-4, status); unsigned int state = core::localcontrol()->eventstate(); if (state) { @@ -186,16 +184,19 @@ void draw_status() statestr << "^FJumping..."; } - Text::draw(4, video::height - Text::fontheight()*2-4, statestr); + Text::draw(4, video::height - Text::fontheight()*3-4, statestr); } - if (draw_location->value()) { - std::stringstream location; - location << std::fixed << std::setprecision(2) + if (draw_devinfo->value()) { + std::stringstream devinfo; + devinfo << std::fixed << std::setprecision(2) << "^Nx:^B" << core::localcontrol()->location().x << " " << "^Ny:^B" << core::localcontrol()->location().y << " " << "^Nz:^B" << core::localcontrol()->location().z << '\n'; - Text::draw(4, video::height - Text::fontheight()*3 -4, location); + + devinfo << "^Nthurst:^B " << core::localcontrol()->thrust() << " " + << "^Nspeed:^B " << core::localcontrol()->speed() << '\n'; + Text::draw(4, 4 + Text::fontheight(), devinfo); } float y = 1.0f; @@ -216,12 +217,52 @@ void draw_status() y = 3.0f; } + Text::setcolor('N'); //set normal color Text::draw(video::width-4-Text::fontwidth()*32, video::height-Text::fontheight()*y-4, core::localcontrol()->zone()->name()); - } - if (draw_keypress->value() && input::last_key_pressed()) { - Text::setcolor('F'); //set fancy color - Text::draw(video::width-4-Text::fontwidth()*6, video::height-Text::fontheight()-4, input::last_key_pressed()->name()); + Textures::bind("bitmaps/hud/thruster_base"); // 316 x 32 bitmap + gl::color(1, 1, 1, 1); + gl::begin(render::gl::Quads); + + glTexCoord2f(0, 0); + gl::vertex(4, video::height - 4 - 32, 0); + + glTexCoord2f(1, 0); + gl::vertex(4 + 316, video::height - 4 - 32, 0); + + glTexCoord2f(1, 1); + gl::vertex(4 + 316, video::height - 4 , 0); + + glTexCoord2f(0, 1); + gl::vertex(4, video::height - 4 , 0); + + gl::end(); + + float u = core::localcontrol()->thrust(); + if ( u > 0) { + Textures::bind("bitmaps/hud/thruster_indicator"); // 316 x 32 bitmap + gl::begin(render::gl::Quads); + glTexCoord2f(0, 0); + gl::vertex(4, video::height - 4 - 32, 0); + + glTexCoord2f(u, 0); + gl::vertex(4.0f + u * 316.0f, video::height - 4 - 32, 0); + + glTexCoord2f(u, 1); + gl::vertex(4.0f + u * 316.0f, video::height - 4 , 0); + + glTexCoord2f(0, 1); + gl::vertex(4, video::height - 4 , 0); + + gl::end(); + } + Text::setfont("bitmaps/fonts/gui", 14, 24); + std::stringstream speedstr; + speedstr << "^B" << roundf(core::localcontrol()->speed() * 100.0f); + Text::draw( 316+4+10, video::height - 6 -16 - render::Text::fontwidth() /2, speedstr); + + Text::setfont("bitmaps/fonts/gui", 12, 18); + Text::setcolor('N'); //set normal color } } -- cgit v1.2.3