14-10-2009, 04:31 PM
http://web.miragesource.com/old-tutoria ... 20Tut.html
What would it take to properly optimize this system?
What would it take to properly optimize this system?
I'm no good with optimizations..
|
14-10-2009, 04:31 PM
http://web.miragesource.com/old-tutoria ... 20Tut.html
What would it take to properly optimize this system?
14-10-2009, 04:49 PM
[code]Sub BltWeather()
Dim i As Long If WeatherTick = 0 Then WeatherTick = GetTickCount End If Call DDS_BackBuffer.SetForeColor(RGB(255, 255, 255)) If GameWeather = WEATHER_RAINING Then For i = 1 To MAX_RAINDROPS If DropRain(i).Randomized = False Then If frmMirage.tmrRainDrop.Enabled = False Then BLT_RAIN_DROPS = 1 frmMirage.tmrRainDrop.Enabled = True If frmMirage.tmrRainDrop.Tag = "" Then frmMirage.tmrRainDrop.Interval = 200 frmMirage.tmrRainDrop.Tag = "123" End If End If End If Next i Else If BLT_RAIN_DROPS > 0 And BLT_RAIN_DROPS
14-10-2009, 05:30 PM
hmm 0.0
Id say What you got there is close just get rid of the timer and make it Get tick. also Type DropRainRec x as long y as long speed as byte Randomized as byte End Type use byte instead of Boolean ^^. 1 or 0 Would work =]. and in the MapRec add Weather() As byte 1 rain 2 thundering rain 3 snow ^^ you can Make them public Consent ^^ as well for the max amount of drops Public Const MAX_BLTDROPS As Byte = 100 Reason for Adding to map is to allow Each map to be able to have a different Weather. like Mountains with snow then walk off rain forest woot. You could also add a Gettickcount to Count down, to turn the Drops on and off for each map and Have a set variable In the map editor for it =]. If you ask why i use byte instead of Boolean because i think its faster ^^.
14-10-2009, 05:43 PM
Most of that is already done with this system..
14-10-2009, 05:55 PM
from what i see you still got frmMirage.tmrRainDrop.Enabled = True
get rid of all timers =[ they are bad.
14-10-2009, 06:29 PM
I said most. And I know timers are bad. I just wanted to get the other part fixed BEFORE I did that.
Anyways, thanks to Jacob, this is fixed.
14-10-2009, 07:04 PM
Posting in a locked topic!
|
« Next Oldest | Next Newest »
|