Author Topic: Dynamic Lights Test for XP (brand new script)...  (Read 2008 times)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19906
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Dynamic Lights Test for XP (brand new script)...
« Reply #20 on: July 01, 2016, 01:46:09 PM »
Are you using linear interpolation when you rotate the image? You should be able to get an even smoother movement that way.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline schmoggi

  • Trained Member
  • *
  • Posts: 37
  • LV: 1
    • View Profile
Re: Dynamic Lights Test for XP (brand new script)...
« Reply #21 on: July 01, 2016, 02:12:29 PM »
This looks absolutely amazing. I can't think of any additional Features at the moment, but i guess by releasing a first Demo people will see how it works and functions... and maybe have some Ideas for new things. I can't wait to try it out :).

greetz

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 727
  • LV: 29
    • View Profile
Re: Dynamic Lights Test for XP (brand new script)...
« Reply #22 on: July 01, 2016, 02:35:10 PM »
Are you using linear interpolation when you rotate the image? You should be able to get an even smoother movement that way.

@Blizz - Im not, not yet.  I still have to take a look at your source code, just havent had time to yet.  Only got the bug that was crashing me a little bit ago.  How hard is it to implement Linear Interpolation?

@Schmoggi - I may put up a prototype demo around the time I get Lightning Effects implemented.  Im already up to about 3000 lines of code, which really isnt that much.  Most of it is trying to make things easy for users by not requiring every other event having goofy configurations, which is one of the things that drives me up the wall in other peoples scripts.

For example, the way they might make you create a light:

0
Light.png
255
[24, 24]
[32,96,96,32,76,1.0, 1.25]

Um, what?

Needs to be easier.

Put in a Comment: \light[]
Want to use a different source file?  Put in a Comment: \light[MyLight.png]

Want a Spotlight?
\light_spotlight[character_id]

Want to change the size of the Light?
\light_zoom_xy[2.0, 2.0]

Even when parameters are expected, for example, the Zoom one, zoom_xy immediately tells a person the first value is X Zoom and the second value is Y Zoom.

I will probably have something up in a couple of days.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19906
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Dynamic Lights Test for XP (brand new script)...
« Reply #23 on: July 01, 2016, 02:46:41 PM »
LERP is easy. You just take the values of the pixels around the rotated pixel in a weighted manner and calculate an average rather than just taking the pixel value bluntly.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 727
  • LV: 29
    • View Profile
Re: Dynamic Lights Test for XP (brand new script)...
« Reply #24 on: July 03, 2016, 11:53:52 PM »
I havent gotten much done this weekend.  Holidays always mean "do loads of work around the house".

Anyway, I said I'd let everyone take a look at what is available so far, so here you go.

This is NOT a proper demo as a ton of the stuff is just junk that I use for testing purposes.

Heretic's Dynamic Lighting - Prototype Demo
http://downloads.chaos-project.com/heretic86/LightingPreRelease.exe

*** WARNING ***

Im not making this legal to distribute in games yet, although you can play with it to see what else it needs and how to improve it. 

It should be stable, but features may be changed around completely.  Not recommended for use in development with the advanced features.

With all that having been said, two very important things I need to work on are Lightning Flashes and LERP.  Although the code for Lightning is relatively easy, I would like to know what would be expected during a Lightning Strike / Flash.  Fade out the Shadowmap entirely or change its color?  I dont think every Lightsource will be expected to react to Lightning flashes, but some will be expected to, such as Windows.  I think I may have written myself into a corner the way that Dawn and Dusk are implemented...

@Blizz - You'll probably need to glance at the code, but Im using stretch_blt.  Should I use XPA_Window instead of stretch_blt for non rotated lightsources?  And for rotated lightsources, should I use your Linear Interpolation in KK20's DLL file?
« Last Edit: July 03, 2016, 11:55:12 PM by Heretic86 »
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19906
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Dynamic Lights Test for XP (brand new script)...
« Reply #25 on: July 04, 2016, 09:35:27 AM »
Yes, I would definitely recommend it. My LinearWrite() is faster than stretch_blt() and unlike stretch_blt(), it does bi-linear interpolation.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 727
  • LV: 29
    • View Profile
Re: Dynamic Lights Test for XP (brand new script)...
« Reply #26 on: August 16, 2016, 03:31:30 AM »
Okay, I believe I am finished with the script, so I need some folks to test it out.  I worked on putting it into the "Collection", and just need to make sure it runs.  There is one issue I am aware of and it will be fixed before release.

http://downloads.chaos-project.com/heretic86/LightCollectionBeta.zip

Anyone care to check it out?

I'm also working on a simplified Demo for this that doesnt include the whole Collection since it is quite large in size.  That will be out once I can confirm everything works for people.

Thoughts?
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2954
  • LV: 368
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: Dynamic Lights Test for XP (brand new script)...
« Reply #27 on: August 16, 2016, 06:19:46 AM »
Link borkt



(click to show/hide)
NNID: KK20-CP

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 727
  • LV: 29
    • View Profile
Re: Dynamic Lights Test for XP (brand new script)...
« Reply #28 on: August 16, 2016, 12:06:47 PM »
Okay, link removed on purpose.

FULL VERSION RELEASED
http://forum.chaos-project.com/index.php/topic,13682.0.html
« Last Edit: August 21, 2016, 10:09:04 AM by Heretic86 »
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)