Giter Site home page Giter Site logo

qfusion / qfusion Goto Github PK

View Code? Open in Web Editor NEW
325.0 34.0 122.0 98.51 MB

Source code for cross-platform OpenGL gaming engine

Home Page: http://qfusion.github.io/qfusion/

C 57.91% C++ 40.93% Makefile 0.57% CMake 0.53% Shell 0.02% Objective-C 0.04% Dockerfile 0.02%
fps quake-engine opengl opengl-es game-engine-3d cross-platform-game angelscript shadow-mapping game-engine gamedev

qfusion's Introduction

qfusion

Build Status Build Status Coverity Scan Build Status

http://qfusion.github.io/qfusion/

qfusion is the id Tech 2 derived game engine

Features (incomplete list)

  • Fully open-source under the GPLv2 and easy to mod
  • Runs on Linux, macOS, Windows and Android (in development)
  • Modern and fast OpenGL 3.0 and OpenGL ES 3.0 renderer, running in a dedicated program thread
  • Realtime lighting and shadows via omnidirectional and cascaded shadow maps
  • Scriptable User Interface based on XHTML/CSS standards with support for remote content and scalable vector graphics
  • Support for vertex and skeletal animation
  • HDR & Bloom support with configurable color correction profiles
  • Fullscreen Anti-Aliasing support in the form of MSAA or FXAA
  • Powerful multiplayer & eSports features (global stats, friend lists, IRC, TV-server, etc.)
  • Ready to go FPS example gametype scripts from Warsow
  • Multithreaded sound mixer design
  • OpenAL support
  • Hardware-accelerated Ogg Theora video playback

Extensible

  • C/C++ mods (plugins) can ship new gameplay features while maintaining compatibility with the core
  • UI and game mechanics scriptable with AngelScript (C++ style syntax)
  • Flexible HUD scripting
  • "Pure" (models, maps, textures, sounds) game content is automatically delivered to players by game servers
  • Players are allowed to locally override non-"pure" game content

Notable games

License (GPLv2)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

qfusion's People

Contributors

adem4ik avatar chobbes avatar dnk777 avatar gewchie avatar hettoo avatar kalhartt avatar mailaender avatar mark90 avatar stopiccot avatar stylemistake avatar sundflux avatar triang3l avatar viciious avatar vkni 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qfusion's Issues

Improve cartoon outlines

For now latest QF & WSW 1.03 have such outlines for Models & World:
wsw_130905_223839
wsw_130905_223807
As you can see, there is a lot of glitches, especially at the corners & joints, lines have different width which depends on the distance from the viewpoint.

After experimeting with Xonotic, which uses DP engine, i've found 2 useful cmds:
r_celOutlines and r_celShading. The 1st one looks very cool, here is an example (i've used g_picmip 20 to make textures flat):
xonotic20130905223101-00
xonotic20130905223144-00
There are a few pitfalls - some places haven't outlines when they should, r_celOutline requires OpenGL 2.0.& it can cost some FPSes.

I'm not sure but that thread could be useful too - http://blenderartists.org/forum/showthread.php?172282-cartoon-in-GE/page2&highlight=Cartoon+in+BGE%3F

[LLVM/Clang] ui/as/asbind.h:248:17: error: 'A' declared as an array with a negative size

Build log: http://bpaste.net/show/139617/

Compilation errors out when using llvm/clang (this also present on 1.0.2/3 source).
I change the offender to 1 - 1 to avoid going to -1 just to be able to build the game, I haven't noticed any issues with doing so. Not sure how correct of a fix that really is as this is not my area of expertise.

I've also ran static analyzer over the code and it comes up with ~450 issues so you may be interested in looking in to that at some point in case any are of interest to you, this is the only show stopper in regards to building and running the game on my end though :)

Transparency effect of picked items & cg_simpleitems 1|2

So the transparency effect is a feature =) but it works well only with 3D items (cg_simpleitems 0). With 2D items (cg_simpleitems 1|2) it doesn't. After picking item its icon is drawn with zero transparency & it looks like item is still available for pick.

Error: Failed to load default refresh DLL

Latest Qfusion, Warsow doesn't want to start, console says:

Loading refresh module ref_gl... LoadLibrary (/home/adem/games/warsow_test/libs/ref_gl_x86_64.so):(/home/adem/games/warsow_test/libs/ref_gl_x86_64.so: undefined symbol: vid_displayfrequency)
Not found.
Error: Failed to load default refresh DLL

XError - 155 (GLX) 5 (X_GLXMakeCurrent)

X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 5 (X_GLXMakeCurrent)
Serial number of failed request: 221
Current serial number in output stream: 221

Improve GLSL compatibility layer

This mess needs to be rewritten:

#if QF_GLSL_VERSION >= 130
  precision highp float;
# ifdef VERTEX_SHADER
   out myhalf4 qf_FrontColor;
#  define varying out
#  define attribute in
#  define gl_FrontColor qf_FrontColor
# endif

# ifdef FRAGMENT_SHADER
   in myhalf4 qf_FrontColor;
   out myhalf4  qf_FragColor;
#  define gl_Color qf_FrontColor
#  define gl_FragColor qf_FragColor
#  define varying in
#  define attribute in
#  define texture2D texture
#  define textureCube texture
#  define shadow2D texture
# endif
#endif

Implement sessions for builtin web server

As a security measure of sort, the builtin HTTP server should hand out session ids for connecting players and only process requests from clients that contain valid session id + playernum pair.

Libpng12 compatible version or include libpng15?

It seems like even the current up to date Ubuntu Linux version doesn't ship with libpng15 (only libpng12) and there is no easy way to upgrade that library.

Not sure if this problem still exists with the latest source, but it certainly is a problem with the lastest Warsow release.

Would it be possible to include it in the release, or make the engine backwards compatible with libpng12?

Minor enhancement on item's ghost alpha

Here is the comparison of items before and after picking. Red number is the value of alpha. (cg_ents.cpp (904) cent->ent.shaderRGBA[3] = 127;)
items

Left side is showing current behavior, where you can see that there is not so much differency between available & not available health bubbles. Right side is showing how it can be after changing value from 127 to 63.

Rendering without non-power-of-two texture is broken

Rendering without texture_non_power_of_two forced is broken and gives such result (running 1280x800 windowed):

screenshot

Maybe instead of fixing bug texture_non_power_of_two extension should be made obligatory and thats it. But as far as I know there is no support for non power of two textures in OpenGL ES 2.0 and there is also an old hack (still actual?) that forces them to be disabled on OS X (r_register.c line 634).

SDL

Currently warsow have 3 backends: windows, os x, and X11. What do you think about making single SDL backend instead of maintaining three of them? "It would be great but I have not time for it so it's up to you" would be completely understandable :)

[BUG] Some textures are not displayed

On some maps some textures as well as all hit decals are not displayed. When decal on wall should appear console prints error message:
^3Failed to compile vertex shader for program defaultQ3AShader_cc_ac_dl4_ls3
ERROR: 19:9: 'a_LightmapCoord01' : syntax error syntax error

bug seems to appear after commit c029ea2 "Pack lightmap coordinates into two vertex attributes" (25 April)
Happens e.g. on following map https://dl.dropboxusercontent.com/u/102271334/zenith.bsp

Incomplete compile of the latest qfusion

I've got following message during compile of the latest qfusion on Kubuntu 13.04:

make: *** Нет правила для сборки цели buildx86_64/ui/ui_parsersound.o', требуемой дляcompile-ui'. Останов.
adem@adem4ik:~/qfusion/source$

which means "There is no rule to make the target 'buildx86_64/ui/ui_parsersound.o', which is needed for `compile-ui'. Stopping."

As I noticed there is only a few compiled libs in "qfusion/source/release/libs/":
snd_qf_x86_64.so
snd_openal_x86_64.so

So in result Warsow doesn't want to start with those bins :/
Here is a full log from console - http://yadi.sk/d/lk9YssHBFA64u

cmake?

It seems that currently there three types of manually maintained projects (Visual Studio/Xcode/Makefile). Maybe it better to use something like cmake?

Add UI localization support

libRocket provides localization support via application's system interface. The engine/UI has to be able to:

  • determine user's language settings
  • load .PO files
  • provide localized string, matching the supplied string identifier against msgid's loaded from .PO

Free extraslot for WSW TV on full server

Nowadays it usually happens that WSW TV can't connect to the full server, it is really a big problem especially when cups/turneys are going on.

Such cases can be prevented by giving free extraslot for the connected WSW TV. Lets say, server has /set sv_maxclients "8", and 8 players are already on it. WSW TV joines the server and gets 9th autoslot.

Also this move would be logical, since WSW TVs are not caunted as a player's number at in-game server browser.

Two (A bit crazy, I guess) enhancement ideas

Ok, I guess both are unlikely to get implemented, but I wanted to throw them out here:

  1. Port the in-game level editor, the terrain and the bullet physics (and what ever else seems cool) from the Quake2 based Ya3dag engine: http://www.moddb.com/mods/r-reinhard/downloads/ya3dag-v142-source-code
  2. (and this is rather for an experiment in a cool art-style) Expand the sprite code to allow for multi-directional sprites that can be animated. The animations should be possible to be influenced by player input and the sprites need to support full multi-texturing (normal-maps etc.). What I actually would like to do is to create character "models" a bit like those back in the Doom/Duke3D times with that, but utilizing modern techniques like mouse driven upper body and head (through md3 tags or bone animation blending) and normal-mapped (pre-rendered) sprites. These kind of advanced spriting tech is already quite successfully used in modern 2D engines (including isometric games) and one could probably make a quite cool and pseudo retro looking 3D game that way. As a side effect, creating new player characters or changing the look of them will be much quicker and simpler to do.

Well, tell me what you think about that ;)

Triggering shaders changes from script-code

Ok I checked the qfusion shader-manual and notices that it is actually quite a bit more advanced than the base q3 one, very nice!

So I would like to make a .iqm or md3 model that has a shader texture which includes some frames of texture animation, but similar to how you can do it with level entities, the shader swap to start the texture animations (or any other shader) should only be triggered on certain key presses (basically the movement keys). That way one could do cool animation supporting texture effects (like a glow only when the player moves or such) or make a 3D/2D pixel style hybrid model with a texture animation for the leg movement for example.

Is that somehow possible with the angelscript? Or is there some other way to do it in qfusion?

Besides that, I noticed that there is a shader function that allows alpha opacity according to view-angle. Is it feasible to make a sort of pseudo directional "sprite" with that by arranging some quads in a * like manner and put that view-angle shader on them so that always only one of the quads is visible (e.g. the one that is facing more or less directly to the viewer).

Load renderer resources in a separate thread

When resource registration is over (R_EndRegistration call), all futher resources should be loaded in a separate thread to prevent hitches during the gameplay.

The R_Register* calls would still return a valid resource handle, internally marked as 'loaded'. volatile qboolean/int loaded needs to be added to shader_t, model_t and glsl_program_t;

The frontend would issue commands to the loader thread using the same mechanics/queue as used in the sound modules.

Mutexes/critical sections need to be added to R_LoadImage/R_FindImage, R_FreeImage, R_LoadShader, R_UnlinkShader, R_RegisterProgram, RP_RegisterProgram, R_CreateMeshVBO, R_ReleaseMeshVBO, possibly other functions too. Global variables would need to be eliminated as much as possible.

The backend will simply skip rendering meshes for unloaded resources. For GLSL programs we could instead fallback to most basic permutation of the same type, which is guaranteed to exit and be loaded.

Xcode 6.01

Други, давеча вышел XCode 6.0.1, и моя система предлагает обновить XCode с текущей версии 5.1.1 на неё. Насколько я знаю, кроме меня под OSX компилирует наш уважаемый Stopiccot, но может быть ещё кто-нибудь этим балуется. Есть ли у вас возражения против перехода на XCode 6.0.1 и соответствующего обновления проекта QFusion xcodeproj?


Same as above. Dear Friends, Xcode 6.0.1 is out. My OSX system invites me to update my current XCode 5.1.1 to this version. As far as I know there are other people who compile QFusion for OSX besides me. For instance respected Stoppicot. So, does anyone mind if I upgrade XCode and QFusion xcodeproj to 6.0.1?

Reimplement bloom

The old bloom code dating back to 2007 is gone but nothing has yet been implemented as the replacement for it. Bloom and/or HDR is pretty much a must-have feature for any modern engine so this is a blocking issue for the next release.

Adding better documentation for modding with this engine

First off, it's great that qfusion is adopting a more open development style with this repository here on Github. The new features are also quite impressive.

Now the issue is that besides some very fragmented and partially outdated documentation on the warsow forums and wiki there is hardly any details on how to make a game with this engine.

The first step would be probably to include a feature readme in this repository.

Additionally it would be great if an editing & scripting wiki could be set up. I would help to compile as much of the scattered information from various Warsow sources in it, but obviously there would be a need to double check and update it to reflect the most up to date features of the engine.

It is actually a pity that qfusion is so relatively unknown, and IMHO that is due to a lack of documentation and an overview on the features etc.

Black screen while running QF with Warsow 1.03 packages on Kubuntu 13.04

I was trying to run lastest QF with Warsow 1.03 packages on my Kubuntu 13.04. In the result I can hear sound, run any map, but without ingame screen image. Here is the console output - http://yadi.sk/d/LcDnEoPk8dJq7

My PC has such specs:
Intel i5 2320 Sandy Bridge, 8GB RAM, Nvidia GTX 650 1GB RAM.

As a side note, I have xorg-edgers' ppa included to get latest beta Nvidia driver 325.15 - http://www.nvidia.com/object/linux-display-amd64-325.15-driver.html I don't think it is the reason of the problem, since Warsow 1.03 and Dota 2 run perfectly without any graphics glitches.

Originally I've started discussion on warsow.net forum - http://www.warsow.net/forum/thread/t/219987#post-219987 . Also there was a temporary fix for the Black Screen, but I guess it turns off a lot of graphics features:

""#version 120\n"
"#extension GL_EXT_draw_instanced : enable\n"

made it work for me. Not sure if that is the proper way though.
I still got some shader error in-game. "

Weapons not selecting

Somehow I am unable to select (use) all weapons except gunblade, machinegun, plasmagun and lasergun.
Rocketlauncher does select on spawn.

Android/WebGL port of qfusion

Not really a highly needed feature, but with OpenGL 2.0 ES as the new rendering target, an WebGL and/or Android port would seem feasible too.

Any plans for this?

MM Login while connected

You can't login while connected to a server. This looks intentional, maybe as a security measure? I think it would be useful to allow logging in when already connected. Mainly because I'm worried about sessions timing out when playing for hours on a server across many maps, haven't been able to test due to my other login issues so far :D. Thoughts?

typo in game/g_weapon.cpp

hi, might wanna fix this ;D

--- a/source/game/g_weapon.cpp
+++ b/source/game/g_weapon.cpp
@@ -113,7 +113,7 @@ static void W_Fire_Lead( edict_t *self, vec3_t start, vec3_t
}
#endif

-#define DIRECAIRTHIT_DAMAGE_BONUS 0
+#define DIRECTAIRHIT_DAMAGE_BONUS 0
#define DIRECTHIT_DAMAGE_BONUS 0

challengers_queue 0

When challengers_queue is set to 0 and match ends. All players are moved to spec and for some reason they are even invisible in hud when u press tab.

Atleast the last part is a bug. Im also curious if it actually was intended to move the players to spec after game end? It would make more sense if they stayed else what is the point of voting challengers_queue 0?

wbomb6 issues

There are some bugs on wbomb6 "Depot".

First, one spawn point has its cross decal displayed incorrectly:
wsw_140428_203257

I think it would be good to move it to the left side of the box, where it won't be blocked by campers and won't be in the middle of battle:
wsw_140428_212532

So, "origin" "616.000000 2800.000000 240.000000" should be changed to 704.000000 2800.000000 136.000000.

Another issue is the lack of clip brushes on certain pitched roofs. One example is at -1080.1250 2900.3125 759.9375 0 10:
wsw_140428_213052

No "gloss effect" on Grenade Launcher

After running around the map and changing weapons I've found that there is no "gloss" on GL. It feels like every weapon is made from the plastic or metal except GL, which looks like made from the paper, as it only changes color but has no gloss.
Here is a comparison:
weapons
Also I've made a video, which should explain you more than I can. Just look at the weapon and nowhere else during my run.
http://yadi.sk/d/bcQVXMYK96S8N

P.S. I've noticed that "gloss effect" was changed a bit from wsw1.0x, more natural and cool now, or mb it is because weapons look a bit darker now... afaik there is a cvar named "gl_ext_texture_cube_map" which manages it.

Small fix on EB's Wall impact puffs

source/cgame/cg_effects.cpp (749 string):
by changing
CG_InitParticle( p, scale, a, r, g, b, shader );
to a copy of string 795
CG_InitParticle( p, 1.2f, 1, 0.8f + crandom()_0.1, 0.8f + crandom()_0.1, 0.8f + random()*0.1, NULL );

The idea of this fix is simple - to make wall impacts look in the same way as EB particle trail.
wall

Optional, no sound mute when window gets unfocused (Windows only?)

Feature request:
I would like to ask for the feature which can keep ingame sound even after alt+tabbing, when game windows looses the focus. As for me, game looses the ingame sound only on Windows. On Linux Kubuntu Alt+tab doesn't work, but i can hear ingame sound even after the main window gets unfocused.

Advantages:

  • It will save a lot of time and nerves for stream makers, as they can press alt+tab during streaming the match and ask/answer to the questions in the chat, watching brackets and the sites, make some other stuff without loosing gamesound on stream.
  • It could be useful to hear when somebody connects to the server where you're siting and waiting for the players.

I guess it should be connected with https://github.com/viciious/qfusion/blob/master/source/win32/win_snd.c#L815

New QFusion icon

Current max resolution QFusion icon is 48x48:
qfusion_demo-8
We need a new beautiful hi-res icon

Webserver side code?

Maybe I am overlooking things (or is that the second branch?), but where is actually the webserver side code for the player stats and friendlists etc?
I hope it is not kept close source, as that is really one of the main features that sets qfusion apart from other idTech based engines.

Easy use of custom GLSL shaders for mappers

It seems like something like this is very close to being possible now that q3 shaders are parsed on the GPU and glsl shaders are read from the harddrive.

IMHO the best way would probably be if the q3 shader syntax was extended to allow inline GLSL code, or to allow for custom referencing of GLSL code in another file.

Ultimately an easy to use shader node system like used in UDK would be of course the greatest for mappers, but for now an easy to understand way of doing it through the q3 shader system would be great too.

One use could be for example to make an custom shader that takes world normals and dust maps to calculate a direction based snow-cover on textures and map-models, or to add heat-disortion to a flame effect etc.

I hope this made sense and can be added to the engine.

Edit: There seems to be some work on-going to allow for something like that in ioQuake3 (see OpenArena forums), so maybe it would make sense to make a compatible system in qfusion.

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.