Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Questions about maps and fullscreen (Robin please help… lol)


GrimReaperReborn
 Share

Recommended Posts

I have a few questions and help would be very much appreciated:

~~1) I know that you can set the spawn locations of NPCs via NPC Spawn tile attribute, but how would I get the X and Y coordinates of this location for a specific map NPC (server side)?~~

2) Will there be more lag in a large map (255x255) with say 30 people or in 30 maps with 1 person each? Or has Robin coded around this problem? In a 255x255 map, will NPCs and tiles far away from players be processed? Because that would be hella' lot of lag processing all that stuff.

3) Is using "Sqr(x)" faster or slower than "x ^ (1/2) " when calculating the square root in VB6?

~~4) Robin, if I remember correctly, you had written some code to make the game fullscreen. You could even set the resolution and stuff. Do you, or anyone else, know where it is?~~

5) Also, when I set the MAX_MAP_NPCS to 500 on both client and server,  I get an overflow with the following line.

```
MapNpcNum = Buffer.ReadLong
```
Found in the following subroutine:

```
Private Sub HandleMapNpcVitals(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
Dim Buffer As clsBuffer
Dim i As Long
Dim MapNpcNum As Byte

    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    Set Buffer = New clsBuffer
    Buffer.WriteBytes Data()

    MapNpcNum = Buffer.ReadLong
    For i = 1 To Vitals.Vital_Count - 1
        MapNpc(MapNpcNum).Vital(i) = Buffer.ReadLong
    Next

    Set Buffer = Nothing

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "HandleMapNpcVitals", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
```
I know its because I just have way too much data… what if I were to send 50 or so NPCs per packet? Lag?
Link to comment
Share on other sites

  • 4 weeks later...
2\.

* "large map (255x255) with say 30 people" = supposedly FPS drop and Latency Lag if Computer and Internet suck, but I doubt it. Basically, I don't think lag would happen.
* "30 maps with 1 person each" would lag if your internet suck. Again, I doubt your internet is that bad. You'll be fine.

3\. I think it's the same thing. And I don't think you can tell anyway. Well, according to Math, they're the same thing. So, again, don't worry about it. Your speed shouldn't be effected.

5 "I know its because I just have way too much data… what if I were to send 50 or so NPCs per packet? Lag?" If you can do that, you wouldn't ask this question >.>
Link to comment
Share on other sites

Thanks for the reply.

I was about to ask another question about 5 but I realized the problem was that MapNpcNum was a byte. Problem solved. I think.

I'll try to get over my laziness and run speed tests on question number 3\. I'm just speed OCD like that.

EDIT: Just ran a speed check between ^.5 and Sqr(). Sqr() is 4x faster. Mystery solved.
Link to comment
Share on other sites

@Mïlk:

> I'll try to get over my laziness and run speed tests on question number 3\. I'm just speed OCD like that.

Then stop using VB6 :D
Seriously, use C or C++ or Assembly or one of those Low Level Languages.

Anywho, you take my word that they are the same speed then. It'll save you the trouble :D
If I'm wrong, you can come back and blame it on me.

Sincerely,
Rithy
Link to comment
Share on other sites

  • 2 weeks later...
@Mïlk:

> If I remember correctly this was the problem for older versions of Eclipse with scrolling maps.

It's not 'older versions'. It's 'older software'. EO is completely unrelated to ES and EE and TE apart from having a distant ancestor in common.

The old scrolling map code was made by Sean. He's not a programmer. In fact I used to sit on vent with him till 7am in the morning listening to him programming whilst on drugs.

No, EO is programmed properly. ;]
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...