Data Realms Fan Forums
http://forums.datarealms.com/

Lagless continuous laser
http://forums.datarealms.com/viewtopic.php?f=61&t=31045
Page 1 of 2

Author:  Mehman [ Wed May 30, 2012 12:46 pm ]
Post subject:  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 925 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 12815 times ]

Author:  Gotcha! [ Wed May 30, 2012 2:02 pm ]
Post subject:  Re: Lagless continuous laser

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

Author:  Duh102 [ Wed May 30, 2012 9:04 pm ]
Post subject:  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.

Author:  Mehman [ Wed May 30, 2012 9:58 pm ]
Post subject:  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!

Author:  mod tester [ Wed May 30, 2012 10:06 pm ]
Post subject:  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:

Author:  Duh102 [ Wed May 30, 2012 10:10 pm ]
Post subject:  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.

Author:  Mehman [ Wed May 30, 2012 10:15 pm ]
Post subject:  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.

Author:  mod tester [ Wed May 30, 2012 10:20 pm ]
Post subject:  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:

Author:  Mehman [ Wed May 30, 2012 10:27 pm ]
Post subject:  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.

Author:  Asklar [ Wed May 30, 2012 10:37 pm ]
Post subject:  Re: Lagless continuous laser

Impressive as always.

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

Author:  Coops [ Thu May 31, 2012 12:05 am ]
Post subject:  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?

Author:  Sir [ Thu May 31, 2012 8:02 am ]
Post subject:  Re: Lagless continuous laser

Gotcha! wrote:
You, sir, are absolutely amazing.


Why, thank you. :grin:

Author:  Mehman [ Thu May 31, 2012 10:01 am ]
Post subject:  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 394 times


Everything is explained in readme.txt.

Author:  Gotcha! [ Thu May 31, 2012 12:51 pm ]
Post subject:  Re: Lagless continuous laser

Sir wrote:
Why, thank you. :grin:


You are welcome! 8)

Author:  xenoargh [ Wed Jun 13, 2012 8:07 pm ]
Post subject:  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.

Page 1 of 2 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/