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

Client side refreshing…?


Zappy
 Share

Recommended Posts

I'm trying to refresh my quest log to update how many items you've collected or npcs you've killed as soon as you've increased the value. It currently refreshes, but only after closing the quest log and reopening it.

Put simply, where would I put a chunk of code I intend to run through frequently on the client side in association with frmMain?
Link to comment
Share on other sites

I'm going to answer the question rather than your "put simply" version which I believe is not the answer to your question.

Well, there are two ways of doing things (in terms of Eclipse):

* **Poll-Based**: Constantly ask the server if anything has happened. This is easier sometimes, but also requires a lot of unnecessary packets. This is what you want to do.
* **Event-Based**: The server will notify the client if anything has happened. This requires the minimum amount of packets. This is what I think you should do.

Poll-Based:
If you wanted to do poll-based, check out Sub GameLoop() in modGameLogic.bas. You could use the tmr10000 to run the code every ten seconds (or tmr100 to run every .1 seconds). Send a packet to the server asking for any quests updates. The server will send the data to the client, which will then redisplay the quest log. I dislike this method, it's slow and inefficient.

Event-Based:
When the quest advances, tell the client that an update has happened with a packet filled with the quest data. The client will then update the quest log. (I like this method a lot better.)

Also, what quest system are you using? (Custom or Alatar's?) If you tell I might be able to help you better.
Link to comment
Share on other sites

thanks sir :3 I figured it out shortly after posting. I originally put it in Game Loop(), but had errors so assumed that wasn't the correct place to do what needed to be done. I later realized that my system was changing a variable to 0 occasionally… -sigh- and fixed it from there ^_^
Link to comment
Share on other sites

Oki doki, I'll look for the right place to initiate it. But right now I can't seem to find it, so throwing it in the loop will be a temporary fix. x)

EDIT:
… Okay, yeah. Nevermind. Found it. Forget about that place. Now I can actually play that success sound too. Merci Merci~
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...