View unanswered posts | View active topics It is currently Mon Apr 29, 2024 9:36 am



Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
 Lagless continuous laser 
Author Message
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
 Lagless continuous laser
Hi,

So this is a little experiment I made to create lagless glow beams, and it works rather well, so here it is:

Attachment:
Laser.rte.rar [487.68 KiB]
Downloaded 923 times


Please note that this is neither polished nor balanced, it is just a proof of concept. As always you are free to use my code as long as you credit me.

Technical details for modders:


And here is a picture:

Image


Attachments:
laser.PNG
laser.PNG [ 35.34 KiB | Viewed 12737 times ]


Last edited by Mehman on Thu May 31, 2012 10:07 am, edited 2 times in total.

Wed May 30, 2012 12:46 pm
Profile
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: Lagless continuous laser
You, sir, are absolutely amazing. I really longed for a beam like this. :grin:


Wed May 30, 2012 2:02 pm
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Lagless continuous laser
I would probably title this "less laggy" rather than "lagless" because it is a bit laggy.
I would also space the particles in the beam more, you could cut out quite a bit of lag with little visual quality loss that way.


Wed May 30, 2012 9:04 pm
Profile
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
Post Re: Lagless continuous laser
Duh102 wrote:
I would also space the particles in the beam more, you could cut out quite a bit of lag with little visual quality loss that way.


This isn't a standard glow particle beam(as in a particle every pixel or two), the main part of the beam is made of very few particles(varying from 1 to a dozen depending on the length) with properly rotated glows, the usual method is used only to fill holes between the last rotated glow(a rotated glow is about 100px long) and the point of impact, so there is little more that can be done to optimize it.

Duh102 wrote:
I would probably title this "less laggy" rather than "lagless" because it is a bit laggy.

It still is much less laggy than a standard multi particle beam, and I didn't notice any lag when running it on my 6 year old pc.

Gotcha! wrote:
You, sir, are absolutely amazing. I really longed for a beam like this. :grin:

Thanks!


Wed May 30, 2012 9:58 pm
Profile

Joined: Sun May 27, 2012 4:18 pm
Posts: 6
Reply with quote
Post request of a mod
hey can i request something from you please if it doesn't bother you :oops: i would want the brain robot from the trailer from the homepage if you can because you look like the guy who can do it :wink: and some other cool things :smile:


Wed May 30, 2012 10:06 pm
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Lagless continuous laser
Mehman wrote:
the main part of the beam is made of very few particles(varying from 1 to a dozen depending on the length)

Ah, I had not looked into the bmp folders, I thought all your glows were in Glows. I had actually toyed with this idea when I made my beams, decided against it because I was lazy.


Wed May 30, 2012 10:10 pm
Profile
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
Post Re: Lagless continuous laser
mod tester wrote:
hey can i request something from you please if it doesn't bother you :oops: i would want the brain robot from the trailer from the homepage if you can because you look like the guy who can do it :wink: and some other cool things :smile:


Sorry but I can't sprite(almost all the sprites I use are made by others), plus I don't have time right now since I've got several exams planned next week(this is an old mod I forgot to release).

Duh102 wrote:
Mehman wrote:
the main part of the beam is made of very few particles(varying from 1 to a dozen depending on the length)

Ah, I had not looked into the bmp folders, I thought all your glows were in Glows. I had actually toyed with this idea when I made my beams, decided against it because I was lazy.


I could theoretically optimize it even more by making it a single glow, but drawing every possible glow length and angle would make the .rte huge.


Wed May 30, 2012 10:15 pm
Profile

Joined: Sun May 27, 2012 4:18 pm
Posts: 6
Reply with quote
Post Re: Lagless continuous laser
Mehman wrote:
mod tester wrote:
hey can i request something from you please if it doesn't bother you :oops: i would want the brain robot from the trailer from the homepage if you can because you look like the guy who can do it :wink: and some other cool things :smile:


Sorry but I can't sprite(almost all the sprites I use are made by others), plus I don't have time right now since I've got several exams planned next week(this is an old mod I forgot to release).

ok i understand :cool:


Wed May 30, 2012 10:20 pm
Profile
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
Post Re: Lagless continuous laser
Also I just noticed I forgot to release the .exe that draws the rotated glows into .bmp files(along with automatic .ini file generation, because you don't want to type 10000 lines of ini when the computer can do it in less than a second), I'll release it tomorrow, along with instructions on how to use it in case some of you want to use this beam technology with your own glow bitmaps. I'm just too tired to do it now, so good night.


Wed May 30, 2012 10:27 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: Lagless continuous laser
Impressive as always.

I didn't notice much lag, so this is a great step on modding.


Wed May 30, 2012 10:37 pm
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post Re: Lagless continuous laser
Making all those glows must have been.. time consuming.

Good work though.

What did you do to rotate the glows like that? Did you use a program or did you have to manually rotate all the glows?


Thu May 31, 2012 12:05 am
Profile
User avatar

Joined: Wed Apr 25, 2012 4:17 am
Posts: 202
Location: Brisbane
Reply with quote
Post Re: Lagless continuous laser
Gotcha! wrote:
You, sir, are absolutely amazing.


Why, thank you. :grin:


Thu May 31, 2012 8:02 am
Profile
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
Post Re: Lagless continuous laser
Coops9753 wrote:
Making all those glows must have been.. time consuming.

Good work though.

What did you do to rotate the glows like that? Did you use a program or did you have to manually rotate all the glows?


I wrote a program that does that automatically based on a glow you give it, here it is:
Attachment:
las.rar [224.18 KiB]
Downloaded 391 times


Everything is explained in readme.txt.


Thu May 31, 2012 10:01 am
Profile
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: Lagless continuous laser
Sir wrote:
Why, thank you. :grin:


You are welcome! 8)


Thu May 31, 2012 12:51 pm
Profile

Joined: Fri Dec 30, 2011 3:33 am
Posts: 276
Reply with quote
Post Re: Lagless continuous laser
Tested this out, and this is apparently broken in B27. Something about incorrect arguments to CastObstacleRay()

That said, why can't you just make the glow particles along the path, using just one bitmap for each instance? Not quite understanding why it's necessary to have 24 MB in bitmaps for this.


Wed Jun 13, 2012 8:07 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 19 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.050s | 19 Queries | GZIP : Off ]