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:
This gun uses multiple pre-rotated glow bitmaps to create a beam made of very few particles(each glow is about 100 px long), this reduces lag a lot. To rotate these glows I wrote a program that does it automatically based on a standard glow. It also writes the .ini file for you. Here it is, along with explanations in the readme. download/file.php?id=39081
Then the prerotated glow particles are used by a lua script(also explained in the readme).
And here is a picture:
Attachments:
laser.PNG [ 35.34 KiB | Viewed 13668 times ]
Last edited by Mehman on Thu May 31, 2012 10:07 am, edited 2 times in total.
You, sir, are absolutely amazing. I really longed for a beam like this.
Wed May 30, 2012 2:02 pm
Duh102
happy carebear mom
Joined: Tue Mar 04, 2008 1:40 am Posts: 7096 Location: b8bbd5
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
Mehman
Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
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.
Thanks!
Wed May 30, 2012 9:58 pm
mod tester
Joined: Sun May 27, 2012 4:18 pm Posts: 6
request of a mod
hey can i request something from you please if it doesn't bother you 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 and some other cool things
Wed May 30, 2012 10:06 pm
Duh102
happy carebear mom
Joined: Tue Mar 04, 2008 1:40 am Posts: 7096 Location: b8bbd5
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
Mehman
Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
Re: Lagless continuous laser
mod tester wrote:
hey can i request something from you please if it doesn't bother you 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 and some other cool things
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
mod tester
Joined: Sun May 27, 2012 4:18 pm Posts: 6
Re: Lagless continuous laser
Mehman wrote:
mod tester wrote:
hey can i request something from you please if it doesn't bother you 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 and some other cool things
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
Wed May 30, 2012 10:20 pm
Mehman
Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
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
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
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
Coops
Joined: Wed Feb 17, 2010 12:07 am Posts: 1545 Location: That small peaceful place called Hell.
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?
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.
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