Forum

Engine traceline?

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Postby Mexicouger » Tue Nov 16, 2010 11:16 pm

frag.machine wrote:
Mexicouger wrote:
Spike wrote:
Mexicouger wrote:So I thought If I just did it in The engine, I might save some memory strains. And the function is to make the crosshairs turn red. when the traceline hits something that takes damage, the crosshair turns red.


Thing is though, traceline *is* in the engine. Its a builtin... Meaning its built in to the engine.

do a traceline, check trace_ent.takedamage. easy!


Thing is, I have nowhere to put it but playerprethink, Which I hate clogging that up. My intention was to maybe move it to the engine for a speed increase


*sigh*

Shoving bad code into the engine won't make things magically works. :roll:

traceline is already as optmized as it can be. If your QC code is slowing things down, maybe you should first consider that your code is the culprit. What exactly are you trying to do ?


It's not what I am trying to do. I have already done it, but I am not satisfied with the fps slowdown. This one features slows the game down like 4-5 frames, But it is needed. I tried spawning an entity that keeps track of your tracelines, And it refreshed ever 0.01 seconds, But if you were a distance away, then the Crosshair would keep flashing(Due to quick refresh). If you have any other way, I am curious to see it.
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Postby Downsider » Wed Nov 17, 2010 1:14 am

Did you completely fail to read any of the replies in this thread?
User avatar
Downsider
 
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Postby Mexicouger » Wed Nov 17, 2010 3:05 am

Downsider wrote:Did you completely fail to read any of the replies in this thread?

I have read every single one of them, Including yours.
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Postby Downsider » Wed Nov 17, 2010 3:14 am

Mexicouger wrote:
Downsider wrote:Did you completely fail to read any of the replies in this thread?

I have read every single one of them, Including yours.


Then you have failed.
User avatar
Downsider
 
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Postby r00k » Wed Nov 17, 2010 3:29 am

Try increasing your delay time to like 0.1, then 0.07, 0.05, 0.025 until you get a solid (non pulsing) crosshair sprite, at a stable fps.


Next to localizing hit sounds, this seems like a nerfed idea to begin with...
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Postby Mexicouger » Wed Nov 17, 2010 3:52 am

Guys, guys, I was just checking to do an engine traceline, that is all. I have my responses, now don't make responses like Downsider. I used the method of checking every 0.1 seconds. It works decently.

Thanks for your responses.
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Postby frag.machine » Wed Nov 17, 2010 12:36 pm

Mexicouger wrote:Guys, guys, I was just checking to do an engine traceline, that is all. I have my responses, now don't make responses like Downsider. I used the method of checking every 0.1 seconds. It works decently.

Thanks for your responses.


Are you trying to make a laser sight or something like that ?
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Postby Mexicouger » Wed Nov 17, 2010 1:43 pm

No, I am just making the crosshairs turn red so the player gets a cue on when it's a good time to shoot. The reticules changing really helps.
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Previous

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest