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

Rob Janes

Members
  • Posts

    1117
  • Joined

  • Last visited

    Never

Posts posted by Rob Janes

  1. RichTextBoxes do not support Picture Backgrounds however, there is a work around

    Make a PictureBox on the Form. Put the RichTextBox over (or inside) of the PictureBox.

    Inside of the Source of frmMain At the VERY top, add

    ```
    Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
    Const GWL_EXSTYLE = (-20)
    Const WS_EX_TRANSPARENT = &H20&

    ```
    Then inside from Form_Load() Add
    ```
    Dim result As Long
    result = SetWindowLong(txtChat.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT)

    ```
  2. Having this feature is excellent through it will drastically cut your FPS if you show them all the time for every NPC due to it rendering so many (I have 10 Attackable NPCs on a 30x30 map fps ~ 30 down from 500).  It's really only useful at the moment to ensure you're only showing health bars on attackable NPCs and only ones with less than Full HP.  Else your FPS will suffer.  I'm sure theres a work around, haven't thought of one at the moment though!

    Awesome tutorial though, works great!
  3. An update to quests versus NPC chatting.

    I added 2 new constants for NPC behaviours, NPC_BEHAVIOUR_QUEST and NPC_BEHAVIOUR_TALK.

    During the 'Search' function on the server to search a map position for a target, it compares the NPCs behavior and determines what function to call.  If they are a quest giver, it calls a function to send the Accept Quest window to the client with the 'Start' string and the reward.  If the NPC has a behaviour of talk, it calls a sub to send the NPCs message (just a simple additional string variable in NpcRec) to the client, as seen in this screenshot! >:)

    Alas, the foundation of modification has truly been laid, with NPCs now able to offer 'stories' and 'quests'.  The rest of the modifications will just be value adds, but the core is now there to start developing a game.  I'll tweak all of the mods and comment them, unsure at this point if I will indeed release the source or not.

    EDIT: Text is still distorting at times which is bizzare, even when picScreen height and width equal the MapX and MapY x 32, the text still distorts at times when the map is scrolling, I need to look into this a bit more.
  4. I may do a tutorial on how to add it, or eventually release my own modifications, who knows, I can't say for sure.  There are a few Guild tutorials on here somewhere, or for the right price, someone can help you out (myself included for the right price)
  5. I'm not in a position to give out the Guild System at the moment, there are some examples on the forums.

    Really, all you want to do is add a GuildType where it stores all the Guild information, store the Guilds as an array, give each player a 'specific' guildID that matches the proper guild in the array, and go from there.
  6. Finally tackled the Quest System today after finishing the 8 way movement.

    I will tackle an actual 'Journal' Interface so you can track all of your quests, as well as an actual Quest Editor interface (right now you edit ini files) however all the backend code is done, talking to an NPC if he has a quest that you don't already have you your quest log, or if you've completed, he will give it to you, killing NPCs or collecting items will properly update your quest status and once it's completed, you may go back to the quest giver for your reward).  Again, there isn't a complete Quest UI yet so all the messages are updated in the chat window for now.

    Screenshot
    ![](http://www.samugames.com/quests.png)

    Video
    http://www.youtube.com/watch?v=_YbRSiBzUZY

    Engine modification status:
    Guilds (Completed)
    Weather (Completed)
    Instant Messaging (Completed)
    8 Way Movement (Completed)
    Quests (80% - missing End User Interface)
    Auction House (Not Started)
    Player Statistics (Hours Played, Awards, Scoreboard etc) (Not Started)
  7. You may want to check out the Alpha Blend API rather set setting the form translucent. 

    ```
    Private Declare Function AlphaBlend Lib "msimg32.dll" (ByVal hdc As Long, ByVal lInt As Long, ByVal lInt As _ Long, ByVal lInt As Long, ByVal lInt As Long, ByVal hdc As Long, ByVal lInt As Long, ByVal lInt As Long, ByVal lInt _ As Long, ByVal lInt As Long, ByVal BLENDFUNCT As Long) As Long

    ```
    Though I don't believe it'll properly render over the tiles themselves, that'd need to be done in DX.
  8. A work around (albeit it, tedius), have a 'TextMessage' ini File built like so
    NumTextMessages=2
    [TextMessage1]
    Map=1
    X=10
    Y=10
    Message=Hello There!

    Then during player movement, loop through all the TextMessages and if the players position maps that current TextMessage, send it to the player.
  9. Using vectors will accomplished the exact same results that I have already finished; the movement speed for diagonal now mimics the movement speed of going left/right/up/down, so going back and tweaking is simply redundant.  Why fix what already works?  A lot of programmers have this flaw of wanting to tweak things even though it already works, even if it's messy.  It's just time that could be spent on something else.
  10. >:) That's a bit or extra work, this is simply using DIR_DOWN_RIGHT etc as a new direction and adding x+1,y+1 et all.  Obviously you'll go faster as it is a greater distance covered in the same amount of time.  Easier way to resolve this would be so slow the movement speed for those directions ;)
  11. Real Life has occupied most of my time over the last week, which saw little development on the engine modification.  I got cracking at it tonight in my spare time for an hour or two and hammered out my next feature, it's working except for one minor glitch (walking Southwest - the issue is just with the CheckInputKeys, so it's a simple fix.)

    This update now includes 8 Way Movement.  Ontop of using Up, Down, Left, Right, you can now Combine Up and Right, to go Northeast, or Up and Left to go Northwest, etc etc.  It does all the proper block checking and will block you appropriately if necessary.

    And now for a video of the movement, since screenshots here would be redundant!

    http://www.youtube.com/watch?v=3Q0bf36Cybc
×
×
  • Create New...