Giter Club home page Giter Club logo

Comments (4)

j0zzz avatar j0zzz commented on August 12, 2024

The default max particles is 2048, which is not enough for such huge maps like this. Newer engines most likely raised this to a higher value.
As a workaround, a higher number of particles can be set via e.g. -particles 8192

from quakespasm.

sezero avatar sezero commented on August 12, 2024

Joequake recently Raised values of DEFAULT_NUM_PARTICLES to 16384
j0zzz/JoeQuake@315f7ab

@ericwa: Any objections? (CC: @andrei-drexler)

from quakespasm.

sezero avatar sezero commented on August 12, 2024

@ericwa: Any objections to the suggested patch below? (CC: @andrei-drexler)

Raised default maximum number of particles to 16384

Using the -particles cmdline option it can be set up to 32768

Bits taken from JoeQuake.
Reference issue: https://github.com/sezero/quakespasm/issues/57.

diff --git a/Quake/r_part.c b/Quake/r_part.c
index 9420485..5f3cb04 100644
--- a/Quake/r_part.c
+++ b/Quake/r_part.c
@@ -23,10 +23,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "quakedef.h"
 
-#define MAX_PARTICLES			2048	// default max # of particles at one
-										//  time
+#define ABSOLUTE_MAX_PARTICLES	32768		// default max # of particles at one time
 #define ABSOLUTE_MIN_PARTICLES	512		// no fewer than this no matter what's
 										//  on the command line
+#define DEFAULT_NUM_PARTICLES	16384
 
 int		ramp1[8] = {0x6f, 0x6d, 0x6b, 0x69, 0x67, 0x65, 0x63, 0x61};
 int		ramp2[8] = {0x6f, 0x6e, 0x6d, 0x6c, 0x6b, 0x6a, 0x68, 0x66};
@@ -152,15 +152,17 @@ void R_InitParticles (void)
 
 	i = COM_CheckParm ("-particles");
 
-	if (i)
+	if (i && i < com_argc - 1)
 	{
-		r_numparticles = (int)(Q_atoi(com_argv[i+1]));
+		r_numparticles = atoi(com_argv[i + 1]);
 		if (r_numparticles < ABSOLUTE_MIN_PARTICLES)
 			r_numparticles = ABSOLUTE_MIN_PARTICLES;
+		else if (r_numparticles > ABSOLUTE_MAX_PARTICLES)
+			r_numparticles = ABSOLUTE_MAX_PARTICLES;
 	}
 	else
 	{
-		r_numparticles = MAX_PARTICLES;
+		r_numparticles = DEFAULT_NUM_PARTICLES;
 	}
 
 	particles = (particle_t *)

from quakespasm.

sezero avatar sezero commented on August 12, 2024

The patch above is in git now. Closing as fixed.

from quakespasm.

Related Issues (20)

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.