Giter Club home page Giter Club logo

spearmint's Introduction

Spearmint is a fork of ioquake3 with two main goals; 1) provide a flexible engine for creating new games and mods, 2) support features from (and running) various id Tech 3-based games.

Spearmint can be used to play Quake III Arena, Quake III: Team Arena, and Turtle Arena. Progress has been made toward running Return to Castle Wolfenstein (MP) and Wolfenstein: Enemy Territory but there is still quite a bit left before it's possible. Spearmint is not compatible with existing mods (the QVM/DLL files) or demos (game recordings) for any game.

New Spearmint major releases (X.0.0) will break VM and network compatibility with previous releases.

The source code for the Spearmint Quake 3 game, cgame, and ui code and QVM compiler is at zturtleman/mint-arena. Map editor and map compiler are available at https://icculus.org/gtkradiant/.

Buy Me a Coffe at ko-fi.com

Download

Pre-built packages for Windows, GNU/Linux, and Mac OS X are available at the Spearmint website.

Resources

Git branches

  • master branch is for Spearmint 1.1 development.
  • 1.0 branch is for Spearmint 1.0.x bug fix releases.
  • gh-pages branch is the Spearmint website.

License

Spearmint is licensed under a modified version of the GNU GPLv3 (or at your option, any later version). This is due to including code from Return to Castle Wolfenstein and Wolfenstein: Enemy Territory.

Submitted contributions must be given with permission to use as GPLv2 (two) and any later version; unless the file is under a license besides the GPL, in which case that license applies. This allows me to potentially change the license to GPLv2 or later in the future.

Credits

  • Zack Middleton (main developer)
  • Tobias Kuehnhammer (feedback / bug reports / Bot AI fixes)
  • And other contributors

Spearmint contains code from;

  • Quake 3 - id Software
  • ioquake3 - ioquake3 contributors
  • RTCW SP - Gray Matter Interactive
  • RTCW MP - Nerve Software
  • Wolfenstein: Enemy Territory - Splash Damage
  • Tremulous - Dark Legion Development
  • World of Padman - Padworld Entertainment
  • ioEF engine - Thilo Schulz
  • NetRadiant's q3map2 - Rudolf Polzer
  • OpenArena - OpenArena contributors
  • OpenMoHAA - OpenMoHAA contributors
  • Xreal (triangle mesh collision) - Robert Beckebans
  • ZEQ2-lite (cel shading) - ZEQ2 project

Contributing

Please submit all patches as a GitHub pull request.

The focus for Spearmint is to develop a stable base suitable for further development and provide players with the same Quake 3 game play experience they've had for years.

spearmint's People

Contributors

cmf028 avatar ec- avatar ensiform avatar icculus avatar inolen avatar jeremiah-sypult avatar jonathangray avatar kungfooman avatar lnussel avatar lonkamikaze avatar man-at-arms avatar maxcrofts avatar mecwerks avatar mickael9 avatar miried avatar nuclearmonster avatar pan7 avatar rawr51919 avatar richard-allen avatar shearer12345 avatar smcv avatar smiletheory avatar thiloschulz avatar timangus avatar tjdub avatar tkoeppe avatar tomkidd avatar wolfwings avatar xhairball avatar zturtleman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spearmint's Issues

QVM's trap_Alloc doesn't work correctly

Seems like editing memory block from QVM's trap_Alloc overwrites QVM static memory. The memory block seems to be overwrite as well, cannot trust reading any data from it (which makes it useless).

Sky in ET's railgun map is wrong

Changing the global fog shader textures/mp_railgun/fog in mp_railgun.shader to use linearFogParms will fix the issue.

textures/mp_railgun/fog
{
    qer_editorimage textures/sfx/fog_grey1.tga
    fogparms ( 0.6 0.6 0.6 ) 2560 // ZTM: this is still needed for q3map2, which doesn't know of linearfogparms
    linearfogparms ( 0.6 0.6 0.6 ) 2560 // spearmint: use linear fog like in RTCW and ET
    surfaceparm fog
    surfaceparm nodraw
    surfaceparm nonsolid
    surfaceparm trans
}

Should probably looking to handling the sky shader instead of requiring fog shader change?

textures/mp_railgun/sky
{
    qer_editorimage textures/skies/sky_6.tga
    q3map_skylight 90 3
    q3map_sun 0.55 0.55 0.55 90 220 60
    skyparms - 200 -
    surfaceparm nodlight
    surfaceparm noimpact
    surfaceparm nolightmap
    surfaceparm sky
}

If first argument for "skyparms" is a hyphen and there are no shader stages, no sky with be drawn. In which case making sky exp global fog color should be fine...

TV Overscan Compansation

Add cvar to scale down and center the menus/HUD? Should do in the cgame/ui VM code.

Ouya docs say 10% gap between UI and edge of screen. link

Support per-game map surface/content flags

Q3 and RTCW/ET have slightly different surface and content flags. SoF2/JK2/JA have major changes.

Need to completely abstract surface and content flags in engine, allowing games/mods to reorder or remove known flags. Not the the prettiest thing, but seems like the best way to support existing maps for games ported to Spearmint.

Renderers reads surfaceParms from shaders, will need to get tokens/flags from cgame/ui vm.

BSPC should be modified to handle RTCW/ET surface/content flags too? :-/

Make info_camp be a gentity like target_location ?

In Quake3's botlib's BotInitInfoEntities, target_location and info_camp are loaded and stored in dynamic memory. Spearmint moves that function to game VM and uses gentities directly for target_location, which are used for non-bot stuff too. (saves memory and processing time.)

Should the same be done to info_camp? It's only used by bot stuff and doesn't need to be a gentity, but probably would have if was in game VM to begin with.

Weather Effects are broken

The weather effects system from WolfET doesn't work. I had it working in Turtle Arena awhile back, then removed it. Merged old TA code into Spearmint, not sure why it's broken. iirc it never worked in Spearmint.

Using bots with Game QVM is broken

Recent moving botlib AI stuff to game VM broke game QVM? Native game lib works fine on Linux. The cvarTable in g_main.c is getting modified, and finally errors "Cvar_Update: handle out of range".

QVM can deference NULL I think, so that might be why cvarTable is getting changed.

Note: Only happens after adding a bot.

Support correct accel in botlib and bspc

Need to add a bot libvar to control acceleration type. q2 style or proper way. Quake 3 uses "q2 style". Turtle Arena uses "proper way" (which was disabled in the quake3's PM_Accelerate).

Need to add support to bspc config and CLI argument.

This the only change in botlib needed for Turtle Arena (after 864c08a), other than in disabled Test function (which should be moved to game and fixed).

void AAS_Accelerate(vec3_t velocity, float frametime, vec3_t wishdir, float wishspeed, float accel)
{
#ifndef TURTLEARENA // Use proper acceleration
    // q2 style
    int         i;
    float       addspeed, accelspeed, currentspeed;

    currentspeed = DotProduct(velocity, wishdir);
    addspeed = wishspeed - currentspeed;
    if (addspeed <= 0) {
        return;
    }
    accelspeed = accel*frametime*wishspeed;
    if (accelspeed > addspeed) {
        accelspeed = addspeed;
    }

    for (i=0 ; i<3 ; i++) {
        velocity[i] += accelspeed*wishdir[i];   
    }
#else
    // proper way (avoids strafe jump maxspeed bug), but feels bad
    vec3_t      wishVelocity;
    vec3_t      pushDir;
    float       pushLen;
    float       canPush;

    VectorScale( wishdir, wishspeed, wishVelocity );
    VectorSubtract( wishVelocity, velocity, pushDir );
    pushLen = VectorNormalize( pushDir );

    canPush = accel*frametime*wishspeed;
    if (canPush > pushLen) {
        canPush = pushLen;
    }

    VectorMA( velocity, canPush, pushDir, velocity );
#endif
} //end of the function AAS_Accelerate

Tell which players are bots in server's status response?

Add [bot] after double-quoted playername if player is a bot. It works in missionpack UI's server status viewer (no parsing is done to player data), q3_ui has no server status viewer.

#if 1 // Tell which players are bots
            Com_sprintf (player, sizeof(player), "%i %i \"%s\"%s\n", 
                ps->persistant[PERS_SCORE], cl->ping, pl->name, (cl->netchan.remoteAddress.type == NA_BOT) ? " [bot]" : "");
#else
            Com_sprintf (player, sizeof(player), "%i %i \"%s\"\n", 
                ps->persistant[PERS_SCORE], cl->ping, pl->name);
#endif

Will this cause issues for other programs that try to parse the player info? I think it's probably best to just assume it will break some server status viewer out there.

Is this feature more important than compatibility with all Q3 server status viewers? Probably not, it's a really minor thing.

Could add a getstatusExt?

Hmm, could add support for arguments after "getstatus". Parse for "bots", if find it include [bots] after bot names? Might make it easier to extend in the future vs. getstatusExt.


Should include clientNums in status response as well, client's serverstatus command shows fake clientNums iirc.

Combain Cgame and UI system calls

Cgame and UI share most import system calls, it would save time adding new one if used the same code.

It would also make it easier to merge UI into Cgame.

Add trap_GetNews UI system call

Tremulous' UI's qboolean trap_GetNews(qboolean begin) which downloads tremulous.net/clientnews.txt to news.dat and puts it in cl_newsString.

Add int trap_GetNews(const char *url, char *buffer, int bufferSize, qboolean begin) to UI. Download URL to modname/news.dat, save URL to modname/news_url.dat. Add status codes for return. Status' meaning: cURL not enabled at compile time, unable to load cURL library, loaded cached news, retrieving file, ...

trap_R_AddPolyBufferToScene from ET is broken

It's used by the weather effects if ATM_NEW is defined in code/cgame/cg_atmospheric.c. I broke it in Spearmint at some point. (or was it broke in initial merge into spearmint?)

I can't find the issue, everything seems fine except that nothing is visible. 😕

Move game dependent stuff in cl_input.c to cgame

The usercmd_t should be created by cgame. Client could still set BUTTON_TALK and BUTTON_ANY, and check angles wrapping?

RTCW/ET have special handling of buttons changing roll angles for leaning. Turtle Arena remaps moving in 2D mode (side view). I think for the way prediction is handled, we don't want to just leave these up to game VM.

Gamepad-specific button names

Show gamepad specific button names for Ouya and Gamestick controls in controls menu.

Probably do it in trap_Key_KeynumToStringBuf.

Ouya guidelines require this. link

zlib.h

The ifdef in code/qcommon/unzip.h and code/qcommon/ioapi.c include zlib.h if USE_LOCAL_HEADERS isn't defined. However, I'm kind of new to all this and I might be making a mistake here, but qcommon doesn't contain zlib.h and this caused the compiler to throw a "file not found" error when I tried to build TurtleArena from CodeBlocks. Instead, I replaced the whole ifdef-endif statement with a " #include "../zlib/zlib.h" ". ioapi.c and unzip.h are the only two files I know as of yet that contain this block of code.

GLES support

GLES is support on android branch, it should be merged into master. (Or maybe a separate branch? plus a sdl2_gles branch?)

Should probably see if there is any interest in having GLES support in ioq3 first. (Though at this point, all I know about my branch is it compiles. I haven't seen it render.)

OpenGL1: Some ET level shaders have default image

Examples: ET's battery map, the default image shown on rocks in water and on telephone lines. In ET's radar map, the road has default image.

They work in OpenGL2 and there aren't any warnings. I'm pretty sure the road use to work awhile ago.

OpenAL: Cannot hear through splitscreen players

When s_useOpenAL is 1, sounds are not heard through extra splitscreen players.


The OpenAL sound system (from what I've read) needs to be changed to use multiple context, one for each player. Might only be supported by OpenAL Soft. Might need to keep track of which player 'hears' the sound if the source limit applies to all contexts.

One benefit of multiple contexts is you can have multiple output devices, so each player could have a separate headset.

http://permalink.gmane.org/gmane.comp.lib.openal/5962

Add WolfET Decal Projector code

Used for bullet/explosion marks, player foot shadow blobs, spotlights, and blood splatter.

void trap_R_ProjectDecal( qhandle_t hShader, int numPoints, vec3_t *points, vec4_t projection, vec4_t color, int lifeTime, int fadeTime );
void trap_R_ClearDecals( void );

Archived VM cvars carry over to mods on first run

Switching from baseq3 to missionpack for first time has team_model set to "sarge" (baseq3 default), but should be "james" (missionpack default).

Note: This may be a general ioq3 issue, though would need a different test case (team_model is in ioq3 client and defaults in "james", not a vm cvar).

New UI Project

After merging cgame and ui vms, I'd like to create a new UI (possibly along side q3_ui and team arena ui — I'm really tempted to scrap them after new UI is good enough to replace them though).

Goals

  • Support Quake 3, Team Arena, RTCW, and ET (including demo versions) — using existing media.
    • (Game theme/layout would be chosen at compile time.)
  • Separate menu structure and items from theme/layout, so it's easier to change them separately.
  • Allow each player to open and navigate menus in-game at the same time.
  • Improve game controller support (easier navigation, don't require a keyboard or mouse)
  • Improve touch screen support (touchable HUD-elements, larger-less clustered UI?)
  • Design for handling TV overscan.

Possibly

  • Integrated HUD editor (item placement / toggle visibility)?

Team Arena, RTCW, and ET use non-free menu files to define the menus. I cannot legally redistribute modified versions to add splitscreen support and new settings as far as I know. So, a new UI is the only way they will get splitscreen stuff in menus.

Capsule Collision Issues

Capsule collision is mostly working in Spearmint (set g_playerCapsule 1 before players spawn). However, there are still some issues.

Players can get stuck in each other sometimes. Happens on q3ctf1 jumppads a lot.

Players landing on players often don't get groundEntityNum set. Due to the sphered bottom and top?

Running into a crouching player makes runner move up. Trying to step up on the player?

There may be other issues. I wonder if just using a vertical cylinder would fix some or all of the issues.

Comments on old issue tracker: https://code.google.com/p/ioq3ztm/issues/detail?id=46

Create a new BSP level format?

Q3/RTCW/ET IBSP level format does not contain draw surface numbers for collision surfaces. Raven's RBSP format (used by sof2, jk2, and ja) does. Loading surfaceNums from BSP would allow new maps to have correct surfaceNums without enabling slow and not always correct cm_betterIbspSurfaceNums.

It's might easier to just create a new BSP format as RBSP has extra lightstyles stuff I'm not planning to support (right now anyway). Either way I'll need to modify q3map2 as it's not possible to use quake3 settings and save a RBSP.

If decide to create new format, I would call it SBSP (Spearmint BSP).


I prefer adding RBSP because maps already exist in the format, plus I or other people might end up trying to support games that use RBSP in the future.

I prefer adding SBSP mainly because I don't like RBSP light styles design/implantation...

So I need to decide if I'm going to support RBSP lightstyles. And if not, whether I'm going to support RBSP for sake of SOF2, JK2, JA maps but without lightstyles support...


RBSP / JA Light Styles. Allows light entities to blink, pulse, and whatnot (13 options defined in cgame, cannot define per-light). Allows lights to be turned off and on! It's done by generating multiple lightmaps, but the way the colors are updated it's not not possible to turn off only one light, it effects all lights using that light style.

ET has dlight entities which also have light styles. It's completely in game and cgame. Allows lights to have custom light styles or use one of 19 pre-defined styles. Can turn on and off single light, doesn't effect any others. (ET has a 16 dlight entities per-map limit though?)

I prefer ET light styles by looking at code and features, the code is way less intrusive. I haven't looked for visuals for either as of yet...

Add support for RTCW and ET model formats

Formats used by RTCW and WolfET:

MD3 used by RTCW and WolfET. (Already supported by Q3.)
MDC is a compressed version of MD3 that is used by RTCW and WolfET.

MDS is a skeleton format used by RTCW player models.

MDM -- meshes only. Used by WolfET player models.
MDX -- skeleton only. Used by WolfET player models.

TAG contains unanimated MD3 tags (name, origin, axis). Used by WolfET. .tag files are loaded by WolfET server (and byte swapped on big endian) so game can get info. Ideally this they will be loaded directly in the game VM.


The RTCW/ET skeletal formats assume cgames tell renderer frame info for legs and torso in refEntity_t, which doesn't translate to most other model formats (IQM, MDR, ..) which have no idea about 'legs' or 'torso'. Not sure how I want to handle it.

OpenGL2: Sometimes have to do a vid_restart after level loads to see level

After loading level using OpenGL2 renderer the level isn't visible, instead the screen is grey-ish blue (sometimes almost black, depends on level?). The color changes as player turns or moves. HUD is visible. Running vid_restart fixing the issue (though sometimes vid_restart has to be done twice?).

Hardware GL fog support

r_useGlFog 1 is intended to use OpenGL fog instead of software fog. Maybe performance using GL fog will be better for some hardware?

It is based on code from RTCW's global fog, though in Spearmint it is used for fog volumes too.

OpenGL1 renderer:
exp global fog: everything is gray.
linear global fog + r_vertexLight 1: no issues (other than ones caused by vextexlight)?
linear global fog + r_vertexLight 0: issues on multistage shaders.

( Tested using ET's battery map, +set fs_game etmain +devmap battery )

OpenGL2 renderer:
there is some code for r_useGlFog, but it isn't run. Need to port code over from GL1.


It's buggy and currently doesn't have clear benefits over current fog method. Not a high priority to get working.

OpenGL2: Missing half of code for ET external lightmaps

Missing ET external lightmap code in tr_bsp.c, but has the code for tr_shader.c ...

See R_LoadLightmaps in renderergl1/tr_bsp.c and renderergl2/tr_bsp.c.

(missing code to set tr.worldDir in gl2/tr_bsp.c too, which is how I noticed this.)

Add support for RTCW skyfogvars

Software fog looks bad on sky (stretching small fog image) plus view angles affecting fog acts weird. Need to find out if sky fog changes based on view origin/angles in RTCW. If it view , makes it easier to fix.

Also need to use skyfogvars...

OpenArena Android

Hi. I'm currently porting ioquake3/OpenArena to Android, and I would like to merge your split-screen functionality.
Could you please describe me in a few words how is it implemented?
Are you running several instances of cgame virtual machine, that render to different parts of screen? Or did you put split-screen rendering and input changes inside cgame itself?
What changes are made to the network code? As I understand, you've dumped compatibility to the old Quake 3 servers.
How much Spearmint changed over ioquake3 overall? Maybe it will be easier to put my Android changes on top of the Spearmint, instead of merging features to the OpenArena engine.

Sources of my Android port are here:
https://github.com/pelya/commandergenius/tree/sdl_android/project/jni/application/openarena
and it's even published to Google Play:
https://play.google.com/store/apps/details?id=ws.openarena.sdl
it plays quite well with touchscreen, and recently I've added gamepad support (I've tested with PS3 controller, but Ouya should work too).
I've mainly modified engine and cgame, and did some minor fixes to ui, I did not touch game. The on-screen keyboard and gamepad support are provided by SDL, thanks to that modifications to ioquake3 code are minimal.

Add Support for Single Model IQM Players

Allow blending at waist and neck. Support legs and torso animations. I'd like to handle torso/legs in cgame completely, so it possible to add more animation-types such as head.

Support RTCW enable/disable shader per-stage fogging

Spearmint's (Quake 3 style) software fogging supports disable fogging for the whole shader using "noFog" like RTCW. However, it doesn't allow re-enabling fog for specific stages like the RTCW OpenGL fogging.

"fog on" -- enables fogging for stage
"fog" -- no fog (default)

R_LerpTag with IQM model

Hello,

I've exported an IQM model from blender, it loads and animates really fine.
But I have an issue while fixing a sword on the character's right hand, the R_IQMLerpTag function always gives some coordinates between -1 and 1, and the sword is placed in the model's origin, probably an odd place.

I've tried to force the sword to be put at the coordinates given by blender (-20.945, -12.396, 5.163) instead of (-0.132598, -0.000035, 0.000035), and it actually works. Are some calculations missing in that function ? How can I retrieve the global armature coordinates from the -1 and 1 ?

Is there a way to reverse that operation in the R_LoadIQM function ( http://pastebin.com/ZEt23cKX ) ? Because I can see the good values in the baseFrame array.

Best regards,
Axel.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.