Mirage Source

Free ORPG making software.
It is currently Mon Jun 03, 2024 11:51 am

All times are UTC




Post new topic Reply to topic  [ 18 posts ] 
Author Message
 Post subject: Map Respawn
PostPosted: Fri Mar 27, 2009 6:07 pm 
Offline
Pro

Joined: Mon May 29, 2006 5:01 pm
Posts: 420
Location: Canada, BC
Google Talk: anthony.fleck@gmail.com
In a freshly downloaded MS4 the map respawns even when players on are the map.


Top
 Profile  
 
 Post subject: Re: Map Respawn
PostPosted: Fri Mar 27, 2009 6:10 pm 
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.


Top
  
 
 Post subject: Re: Map Respawn
PostPosted: Fri Mar 27, 2009 6:15 pm 
Offline
Pro

Joined: Mon May 29, 2006 5:01 pm
Posts: 420
Location: Canada, BC
Google Talk: anthony.fleck@gmail.com
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.


Top
 Profile  
 
 Post subject: Re: Map Respawn
PostPosted: Fri Mar 27, 2009 6:31 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
It would be better to just make PlayersOnMap a boolean.

(boolean is faster than byte)

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
 Post subject: Re: Map Respawn
PostPosted: Fri Mar 27, 2009 6:57 pm 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
when can a boolon be used anywhere a byte can or in certain instances? ive nvr used it before

_________________
╔╗╔═╦═╦══╦═══╗
║║║║║║║╔╗║╔═╗║
║║║║║║║╚╝║║║║║
║╚╣║║║║╔╗║╚═╝║
╚═╩╩═╩╩╝╚╩═══╝


╔╦═╦╦════╦═══╗
║║║║╠═╗╔═╣╔══╝
║║║║║║║║╚═╗
║║║║║║║║╔═╝
╚═╩═╝╚╝╚╝ ?


Top
 Profile  
 
 Post subject: Re: Map Respawn
PostPosted: Fri Mar 27, 2009 7:02 pm 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: rs.ruggles@gmail.com
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

_________________
I'm on Facebook! Google Plus My Youtube Channel My Steam Profile

Image


Top
 Profile  
 
 Post subject: Re: Map Respawn
PostPosted: Fri Mar 27, 2009 7:33 pm 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
ahh i get it

_________________
╔╗╔═╦═╦══╦═══╗
║║║║║║║╔╗║╔═╗║
║║║║║║║╚╝║║║║║
║╚╣║║║║╔╗║╚═╝║
╚═╩╩═╩╩╝╚╩═══╝


╔╦═╦╦════╦═══╗
║║║║╠═╗╔═╣╔══╝
║║║║║║║║╚═╗
║║║║║║║║╔═╝
╚═╩═╝╚╝╚╝ ?


Top
 Profile  
 
 Post subject: Re: Map Respawn
PostPosted: Fri Mar 27, 2009 7:39 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
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.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
 Post subject: Re: Map Respawn
PostPosted: Fri Mar 27, 2009 7:42 pm 
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.


Top
  
 
 Post subject: Re: Map Respawn
PostPosted: Sun Mar 29, 2009 7:55 pm 
Offline
Pro
User avatar

Joined: Sun Aug 05, 2007 2:26 pm
Posts: 547
Its such a minor difference (in speed, and memory) does it really matter?

_________________
GIAKEN wrote:
I think what I see is this happening:

Labmonkey gets mod, everybody loves him, people find out his code sucks, he gets demoted, then banned, then he makes an engine called Chaos Engine.


Top
 Profile  
 
 Post subject: Re: Map Respawn
PostPosted: Mon Mar 30, 2009 12:26 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
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.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
 Post subject: Re: Map Respawn
PostPosted: Mon Mar 30, 2009 12:50 am 
Offline
Knowledgeable

Joined: Sun Jan 13, 2008 5:59 pm
Posts: 107
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?


Top
 Profile  
 
 Post subject: Re: Map Respawn
PostPosted: Mon Mar 30, 2009 1:00 am 
Offline
Pro
User avatar

Joined: Tue Apr 22, 2008 2:15 am
Posts: 597
no...
2$ = 100%
-1
1$ = 50%

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


Top
 Profile  
 
 Post subject: Re: Map Respawn
PostPosted: Mon Mar 30, 2009 1:23 am 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
but if your looking at it from the small point of view wouldnt it be 100% loss

_________________
╔╗╔═╦═╦══╦═══╗
║║║║║║║╔╗║╔═╗║
║║║║║║║╚╝║║║║║
║╚╣║║║║╔╗║╚═╝║
╚═╩╩═╩╩╝╚╩═══╝


╔╦═╦╦════╦═══╗
║║║║╠═╗╔═╣╔══╝
║║║║║║║║╚═╗
║║║║║║║║╔═╝
╚═╩═╝╚╝╚╝ ?


Top
 Profile  
 
 Post subject: Re: Map Respawn
PostPosted: Mon Mar 30, 2009 1:24 am 
Technically, losing $1 would be a 100% loss. Losing $2 would be a 200% loss.

Since those are the only variants involved.


Top
  
 
 Post subject: Re: Map Respawn
PostPosted: Mon Mar 30, 2009 1:25 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Who cares? The point is any optimization is good.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
 Post subject: Re: Map Respawn
PostPosted: Mon Mar 30, 2009 1:25 am 
Offline
Regular

Joined: Wed Oct 31, 2007 11:41 pm
Posts: 43
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.


Last edited by james1992_2006 on Mon Mar 30, 2009 1:33 am, edited 4 times in total.

Top
 Profile  
 
 Post subject: Re: Map Respawn
PostPosted: Mon Mar 30, 2009 1:26 am 
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! :D


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group