Mirage Source
Map Respawn - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51)
+----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44)
+----- Thread: Map Respawn (/showthread.php?tid=2655)



Map Respawn - Anthony - 27-03-2009

In a freshly downloaded MS4 the map respawns even when players on are the map.


Re: Map Respawn - Matt - 27-03-2009

Anthony Wrote:In a freshly downloaded MS4 the map respawns even when players on are the map.

Yupp. Well, the items do. I dunno about the rest.


Re: Map Respawn - Anthony - 27-03-2009

Private Sub UpdateMapSpawnItems()

Find:

Code:
' Make sure no one is on the map when it respawns
        If Not PlayersOnMap(y) Then

Change it to:

Code:
' Make sure no one is on the map when it respawns
        If PlayersOnMap(y) = NO Then

Fixed.


Re: Map Respawn - GIAKEN - 27-03-2009

It would be better to just make PlayersOnMap a boolean.

(boolean is faster than byte)


Re: Map Respawn - Doomy - 27-03-2009

when can a boolon be used anywhere a byte can or in certain instances? ive nvr used it before


Re: Map Respawn - Rian - 27-03-2009

Not really. A byte is a variable with a value between 0 and 255, (256 total)

A boolean is a variable with a true or false value

Public PlayersOnMap as Boolean

Usage:

Toggle - PlayersOnMap = True or PlayersOnMap = False

Check - If PlayersOnMap = True Then or If PlayersOnMap = False Then


Re: Map Respawn - Doomy - 27-03-2009

ahh i get it


Re: Map Respawn - GIAKEN - 27-03-2009

Most of the checks we do are If Byte = 1 Or Byte = 0...those need to be Boolean = True or Boolean = False.

There's a small downside, Booleans take more memory than Bytes. Not that much more, but it's still considered a down side. Speed over memory usage.


Re: Map Respawn - Matt - 27-03-2009

GIAKEN Wrote:Most of the checks we do are If Byte = 1 Or Byte = 0...those need to be Boolean = True or Boolean = False.

There's a small downside, Booleans take more memory than Bytes. Not that much more, but it's still considered a down side. Speed over memory usage.

Takes two bytes, I believe.


Re: Map Respawn - Labmonkey - 29-03-2009

Its such a minor difference (in speed, and memory) does it really matter?


Re: Map Respawn - GIAKEN - 30-03-2009

Yeah any loss is still a loss. If I lose 2$ instead of 1$...oh it's not that much of a loss, but still that's 50%...

You're looking at it like you're just fucking lazy. Any optimization is better, no matter 10 milliseconds faster or 1000 milliseconds faster is something that should be done.


Re: Map Respawn - KruSuPhy - 30-03-2009

GIAKEN Wrote:Yeah any loss is still a loss. If I lose 2$ instead of 1$...oh it's not that much of a loss, but still that's 50%...

You're looking at it like you're just fucking lazy. Any optimization is better, no matter 10 milliseconds faster or 1000 milliseconds faster is something that should be done.
Wouldn't that be a 100% loss?


Re: Map Respawn - Pbcrazy - 30-03-2009

no...
2$ = 100%
-1
1$ = 50%

aka: 1$ is 1/2 of 2$, and 50% is 1/2 of 100%


Re: Map Respawn - Doomy - 30-03-2009

but if your looking at it from the small point of view wouldnt it be 100% loss


Re: Map Respawn - Matt - 30-03-2009

Technically, losing $1 would be a 100% loss. Losing $2 would be a 200% loss.

Since those are the only variants involved.


Re: Map Respawn - GIAKEN - 30-03-2009

Who cares? The point is any optimization is good.


Re: Map Respawn - james1992_2006 - 30-03-2009

Doomy Wrote:but if your looking at it from the small point of view wouldnt it be 100% loss
Edit: Nvm, someone delete this post.


Re: Map Respawn - Matt - 30-03-2009

GIAKEN Wrote:Who cares? The point is any optimization is good.

We have to take this thread off topic. It's the MS way. Quit trying to make us think like programmers, damnit! Big Grin