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

Xlithan

Members
  • Posts

    311
  • Joined

  • Last visited

Posts posted by Xlithan

  1. Because certain classes become unavailable depending on the race you pick. And that's not how I've coded it lol. The radio buttons are in an array. It takes the index of the array when you click a radio button and uses that to define class selection.
  2. I've been converting my Mirage Source networking code to the one SkyWyre uses. However, I'm getting **RTE 91: Object variable or With block variable not set**

    The error appears in Incoming Data sub routine on this line:

    _TempPlayer(index).buffer.WriteBytes buffer()_

    From my research, it's possible that Buffer() isn't set to anything which is why the error is being produced. But there is a packet containing data, as the DataLength is 43 bytes. Any ideas?
  3. I've spent years developing this, moving to another engine now is not an option as I have no interest in doing this all over again. I think I started this back in 2009 and have just worked on and off with it since then. If anything, I would like to write a browser-based client for it.
  4. Just upgrading the networking system at the moment. The very original Mirage Source one was only good for small games, that didn't send a lot of packets back and forth. I upgraded this to what an earlier version of Eclipse was using, and now im upgrading it to what Skywyre is using, using packet buffering.

    I also want to play around with MySQL and see if I can get that functioning. There was a version of Mirage Source with MySQL I believe, I may take a quick look at that.
  5. @'AcidTumbleweed':

    > Haha the chat window gives it away :p curious though, how are you planning on handling combat?

    Every text game has a chat window similar to this so there's nothing really that gives it away.

    At the bottom you have action buttons, you select one of these, then click the player/npc/item picture in the Room Content box. Much of the original source code remains for combat, the only difference is that you're clicking a picture instead of pressing control next to an NPC or player.
  6. @'whitespirits':

    > I'm noob to all this but I'm guessing winsocket restricts player numbers?

    No.

    What are peoples thoughts on the packet system currently in Skywyre? I'm ripping it and putting it into my MUD to see if packet sending will improve. I have a lot of packets being sent back and forth, because obviously it's text based, and you move from room to room which requires an update potentially every 10th of a second if you move fast enough. And the content is player data, NPCs, room descriptions (Which isn't so bad as that's just text strings), and other things, where as the 2D engine loads the map, NPCs and players and only really sends information on NPC movement unless you attack something or drop something, but I'd say that I'm sending 10 times more packets with this.

    I'm guessing the method used in Skywyre compresses the packets to make them smaller in order to send more quickly, so anything like that would help very much. The issue I have right now is that I can kill a single monster 6 times before it registers (If I have 4 monsters spawned and 3 players in that one room), and that's a massive exploit that I need to fix.
  7. I've been using Mirage 3.0.3 for my MUD. I've currently copied the method used in Skywyre v8 in terms of how packets are handle both server and client, assuming this would help speed up the process compared to the original bog standard method that Mirage Source used.
  8. Ok so I've tried the following (Feel free to use)

    ```
    ' Last Command Memory
    Public LastCommand(1 To 10)                        As String
    Public CommandArray                                As Byte
    ```
    When the player presses Enter, it does this…

    ```
    ' Last Command Memory
           If MyText <> vbNullString Then
               LastCommand(10) = LastCommand(9)
               LastCommand(9) = LastCommand(8)
               LastCommand(8) = LastCommand(7)
               LastCommand(7) = LastCommand(6)
               LastCommand(6) = LastCommand(5)
               LastCommand(5) = LastCommand(4)
               LastCommand(4) = LastCommand(3)
               LastCommand(3) = LastCommand(2)
               LastCommand(2) = LastCommand(1)
               LastCommand(1) = MyText
           End If
    ```
    What I'm having problems with, is that the following doesn't work. I don't know how to check if the player presses the Up key.

    ```
       If KeyAscii = vbKeyUp Then
           ' Last Command Memory
           If CommandArray = 10 Then
               frmGame.txtCommand.Text = vbNullString
               MyText = frmGame.txtCommand.Text
               Exit Sub
           End If

           CommandArray = CommandArray + 1
           frmGame.txtCommand.Text = LastCommand(CommandArray)
           MyText = frmGame.txtCommand.Text
       End If
    ```

    * * *

    Ok I've figured it out. I have to use the _KeyDown procedure on the textbox

    * * *

    If anybody is interested in doing this, this is what I did, and it now runs 100% without any errors. You may need to adjust the code to work with later versions of Eclipse.

    ```
    Private Sub txtCommand_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyUp Then
    ' Last Command Memory
    If CommandArray = 10 Then Exit Sub

    If LastCommand(CommandArray + 1) = vbNullString Then Exit Sub

    CommandArray = CommandArray + 1
    frmGame.txtCommand.Text = LastCommand(CommandArray)
    MyText = frmGame.txtCommand.Text
    End If

    If KeyCode = vbKeyDown Then
    ' Last Command Memory
    If CommandArray <= 1 Then
    frmGame.txtCommand.Text = vbNullString
    MyText = frmGame.txtCommand.Text
    CommandArray = 0
    Exit Sub
    End If

    CommandArray = CommandArray - 1
    frmGame.txtCommand.Text = LastCommand(CommandArray)
    MyText = frmGame.txtCommand.Text
    End If
    End Sub
    ```
  9. Yeah. Just added your fix. I remember adding the fix to my MUD game that uses Mirage Source and it fixed that also. It's all working fine now, all issues solved. Thanks Growlith
  10. I'm guessing the reason why it's staying white is because GetTickCount isn't changing. I'm sure I already added this fix i'll have another look.
  11. That worked, thanks. It's odd because I didn't change anything, I loaded up the source after about a week of not doing anything to it and had this problem. Is it not something to do with weather? I'll have to check to make sure.

    * * *

    Ok I'm now experiencing another problem. I can't move, the game time is frozen, health/mana etc aren't regenerating.
×
×
  • Create New...