Thread: [ELVARG] Updating interface on every tick

Results 1 to 5 of 5
  1. #1 [ELVARG] Updating interface on every tick 
    ¦¦¦ RuneTimes ¦¦¦

    RainDropzZ's Avatar
    Join Date
    Oct 2010
    Posts
    389
    Thanks given
    31
    Thanks received
    108
    Rep Power
    556
    Hello Rune-Server,

    New thing:
    I am currently writing a server control panel for myself. I need to update that like every second, so i can see the players online and check for some other things, what would be the best way to update the view every one second?



    Old:
    i started to play around with Prof. Oaks Elvarg base. I am used to process() being called every tick, so you could update interfaces and such. But how does Elvarg handle that? I couldnt find anything besides:
    Code:
    executorService.scheduleAtFixedRate(this, 0, GameConstants.GAME_ENGINE_PROCESSING_CYCLE_RATE, 
    				TimeUnit.MILLISECONDS);
    I assume that this starts the engine ticking. But how can i execute for example myInterface.refresh(); every game tick?
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Oct 2012
    Posts
    142
    Thanks given
    37
    Thanks received
    60
    Rep Power
    122
    Quote Originally Posted by RainDropzZ View Post
    Hello Rune-Server,

    i started to play around with Prof. Oaks Elvarg base. I am used to process() being called every tick, so you could update interfaces and such. But how does Elvarg handle that? I couldnt find anything besides:
    Code:
    executorService.scheduleAtFixedRate(this, 0, GameConstants.GAME_ENGINE_PROCESSING_CYCLE_RATE, 
    				TimeUnit.MILLISECONDS);
    I assume that this starts the engine ticking. But how can i execute for example myInterface.refresh(); every game tick?
    Refreshing an interface every game tick in most cases is not necessary.

    You could either create a task to execute the interface updating with defined intervals or call the method only when updating is required or again use the cycle to do so every tick.

    The code you provided is related to the engine threading. You'll want the sequence method in Player.java which is the same as process from the servers you are used to.

    Let me know what you're trying to do and I'll give you the code.
    Reply With Quote  
     

  3. #3  
    ¦¦¦ RuneTimes ¦¦¦

    RainDropzZ's Avatar
    Join Date
    Oct 2010
    Posts
    389
    Thanks given
    31
    Thanks received
    108
    Rep Power
    556
    Ok thanks for that one, but i got another thing.

    I am currently writing a server control panel for myself. I need to update that like every second, so i can see the players online and check for some other things, what would be the best way to update the view every one second?
    Reply With Quote  
     

  4. #4  
    Extreme Donator


    Join Date
    Oct 2010
    Posts
    2,853
    Thanks given
    1,213
    Thanks received
    1,622
    Rep Power
    5000
    Either in the void process method in Player class or just make a task

    Code:
    TaskManager.submit(new Task(1) {
    				@Override
    				public void execute() {
    					// Do whatever
    
    					// call stop(); to stop the task
    				}
    			});
    [Today 01:29 AM] RSTrials: Nice 0.97 Win/Loss Ratio luke. That's pretty bad.
    [Today 01:30 AM] Luke132: Ok u fucking moron i forgot i could influence misc.random
    Reply With Quote  
     

  5. #5  
    ¦¦¦ RuneTimes ¦¦¦

    RainDropzZ's Avatar
    Join Date
    Oct 2010
    Posts
    389
    Thanks given
    31
    Thanks received
    108
    Rep Power
    556
    Quote Originally Posted by Professor Oak View Post
    Either in the void process method in Player class or just make a task

    Code:
    TaskManager.submit(new Task(1) {
    				@Override
    				public void execute() {
    					// Do whatever
    
    					// call stop(); to stop the task
    				}
    			});

    Well thanks a lot master oak, and thanks for your awesome base! I love it, just need to get all npc animations right lol.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. 718 updating interface every second?
    By OodlesOfNoodles in forum Help
    Replies: 0
    Last Post: 03-15-2014, 06:01 AM
  2. Replies: 6
    Last Post: 08-20-2009, 06:58 AM
  3. Cool Update Interface I Made
    By Skillz Ftw in forum Snippets
    Replies: 13
    Last Post: 04-11-2009, 11:32 PM
  4. How to make an Object open an Interface on Devolution.
    By Soul Breaker in forum Tutorials
    Replies: 5
    Last Post: 01-30-2008, 03:46 AM
  5. Replies: 3
    Last Post: 08-11-2007, 08:33 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •