DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • October 22, 2017, 03:35:46 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Visual weather  (Read 3535 times)
0 Members and 1 Guest are viewing this topic.
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« on: March 31, 2006, 06:42:56 PM »

so, I wrote this module, and it works, but there are complaints about it slowing down computers when it's running.  So, I'm posting it here to see if anyone wants to try and help with 2 problems with the module.

1.  It slows down players computers.
2.  Does not work in all browsers.

Both are going to be java related, so I don't know if anyone can help or not.  all i know is i love the module and I want everyone to love it!!
Logged

Derek
Member
Captain of the Guard
***
Offline Offline

Posts: 122


"I think I just thunk"


View Profile WWW
« Reply #1 on: April 01, 2006, 03:15:22 PM »

First off, there's a huge difference between Java and Javascript. If you made a visual weather module in Java then of cource it would slow the heck out of computers.
Anyway, you can search the internet for all different kinds of snow, rain, etc. Javascript codes. I will take a look and see if I can find a very efficient one and I will tell you when I find one Smiley
Logged

Check out My Modules

Check us out! 1 hour days, heavily modded, friendly admins!
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #2 on: April 01, 2006, 04:40:44 PM »

I'm pretty sure that sixf00t4 knows the difference between Java and JS and was merely saving time by typing Java, not knowing that some person would attack for semantics.

Yes, people can disable Javascript via their browser. Yet, there is some script that you could put in, HTML, called <noscript> which would be executed if JS is not enabled or it doesn't get executed. Most Javascript should be cross-platform functional, save for some visual elements that don't work in FireFox, but work in IE and Opera. http://www.w3schools.com/dhtml/dhtml_examples.asp

However, in my person opinion, I find those floating leaves/snow/ash and whatnot to be quite tacky.
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #3 on: April 01, 2006, 10:14:50 PM »

The problem with this script might be - especially on slower computers - that every second it recalculates the position of every raindrop, snow flake or anything else you show. Maybe you can make the weather a user_option that they can enable if they like (and they could set their own base-amount of raindrops).
Logged

Running for more than three years now:
DaveS
Mod God
*****
Offline Offline

Posts: 1544


Dfly... you know, as in DaveFly


View Profile
« Reply #4 on: April 01, 2006, 10:39:02 PM »

Actually, there's a way to disable the visual weather.  What would be nice is if the weather was off on the login screen.  It's quite impressive, but if that module is running and the login screen is on for longer than a couple seconds it causes the laptop fan to kick in because it causes it to heat up that quickly.

So the big question here:

Is there a way to disable the visual weather for the login screen?
Logged

Check out my Last Module:
The Dragon Eggs Expansion
http://dragonprime.net/index.php?topic=8474.0

About my Retirement:
http://dragonprime.net/index.php?topic=9080

See my complete module list here:
http://dragonprime.net/index.php?topic=3038.0
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #5 on: April 02, 2006, 06:49:45 AM »

yes, dave, just not hook into the login screen:)

Logged

robert
Old Dog
Mod God
*****
Offline Offline

Posts: 1047


LoGD Buff!


View Profile WWW
« Reply #6 on: April 02, 2006, 10:02:16 AM »

I did the same modification about a year ago to a 097 version.
I too liked the effects but suffered the same problems you encountered.

The majority of the problems as you know are on the user end, IE; slow ISP conection, slow PC and a host of differant browsers and settings. While I enjoyed seeing the snow fall on my own PC ...users suffered greatly as most are on even slower connections than mine and use even slower PC than the one I use. Plus the fact that many users also have tons of other programs running besides thier connection and browser makes things even worse, some run thier DVD and watch a movie, some have thier CD running playing music, others are multi-tasking and using a host of other programs, all ON while browsing the net or playing games. I may be one of the few who run programs only in use and have all others turned off and shut down while the PC is on ...even then, this mod did slow me down a bit, as ChirsX mentioned the reason above.

While I do like the mod - I just dont think technology is quite right yet ..to use this in a browser based text game ....yet.  Wink
« Last Edit: April 02, 2006, 10:11:44 AM by robert » Logged

White Knight
Mod God
*****
Offline Offline

Posts: 1030

For the truth!


View Profile
« Reply #7 on: April 02, 2006, 03:43:44 PM »

It's quite impressive, but if that module is running and the login screen is on for longer than a couple seconds it causes the laptop fan to kick in because it causes it to heat up that quickly.
I've tried this on an "older" P4 2.8GHz PC with Firefox. As is, this mod makes Firefox take up almost 90% CPU time.  Of course a laptop fan would kick in very soon after starting this up.  Then I went into the module and changed speed from the default 10 to 100.  Processor utilization dropped to about 20%.  From totally unacceptable to ok.  While normally FX takes up about 0-1% of the processor time when idle, 20% is not at all that bad.  The snow still refreshes 10 times a second, which is not too bad, if a little jerky.

I think this could be a great addition to many servers if a few more options are added.  Speed, naturally, should default to something less resourse-hungry than 10ms (like I said, 100ms worked fine for me), and the number of flakes/raindrops should also be user-adjustable.  That said, it could be a setting *or* a pref, if not both.  One other idea to make it take up less processing power is to confine it to the upper part of the screen the width of a regular banner.  That also takes care of the problem of the flakes being non-transparent (it's hard to read the text with all those non-transparent things moving about).

I believe this module has some great potential if all those wrinkles are ironed out.  Just my 2 cents...

EDIT: I also think that it's very acceptable for the images to move much slower than they would in real life.
« Last Edit: April 02, 2006, 03:53:05 PM by White Knight » Logged

Helping you help yourself.
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
26 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search