Tile Animation
Displaying 1-7 of 7 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Buckermann

Is there a way to show the tile animations without constantly calling Render() in every loop and redrawing the whole screen (including all menus etc)?
If I remember correctly, Verge will do bad things when I add Render() to a timer hooked function.

Posted on 2004-06-22 08:16:35

Gayo

I really doubt it's possible. You'd effectively be calling it constantly anyhow -- VERGE doesn't have any way to render just the altered portions of a screen like Windows does. The hooktimering doesn't work because your entire internal logic and graphics, including the render which is slow, will often take more than a hundredth of a second, and then the whole thing backs up horribly.

I'm not sure why you're reluctant to put Render() and ShowPage() in your loops. If the loop is just waiting for a key press, nothing else is happening anyway to make it a speed issue, and if there's a lot of complex logic going on, the renders will only occur as often as they get a chance to.

Posted on 2004-06-22 11:29:56 (last edited on 2004-06-22 11:32:08)

Zip

I'm with Gayo on this. Render-on-demad is nice, but doesn't fit the verge system well as you have to redo the whole screen anyway. I've spent a fair bit of time looking at your code Buckermann, and though it obviously does work well, I'm sure you'd make your life easier if you had a single main game loop that rendered the screen, checked inputs, then acted on them. As it is, you have lots of functions all doing similar things with similar variables, but a completely different set of code for each. tb_battle.vc is over 2500 lines at the moment, and that's only going to get bigger and harder to manage.

Zip

(TB_BS was my favourite for the comp. as well)

Posted on 2004-06-22 11:55:49

Buckermann

I guess I just hoped there would be a "magical" way to do the tile animation.
Main reason why I'm hesitant to use render() all the time is because of speed concerns. Sometimes I need all the CPU power I can get (path finding comes to mind). Adding Render(), Showpage() etc to that function would slow the calculation to a large degree, and also make the tile animation very jerky.
But it's not a big problem, I can live without animated water for the time being :)

Posted on 2004-06-22 16:34:55

vecna

While I could make the tile animations 'think' on showpage instead of render - I'm not sure I see the point. The tiles wouldn't visibly update unless Render was called. Unless I'm not understanding what you want.

Posted on 2004-06-22 19:12:32

Buckermann

Quote:Originally posted by vecna

While I could make the tile animations 'think' on showpage instead of render - I'm not sure I see the point. The tiles wouldn't visibly update unless Render was called. Unless I'm not understanding what you want.

It was only wishfull thinking. After I have thought a little bit more about this, I have come to the conclusion that what I meant simply isn't possible.

Posted on 2004-06-22 23:13:13

Gayo

Quote:Originally posted by Buckermann

I guess I just hoped there would be a "magical" way to do the tile animation.
Main reason why I'm hesitant to use render() all the time is because of speed concerns. Sometimes I need all the CPU power I can get (path finding comes to mind). Adding Render(), Showpage() etc to that function would slow the calculation to a large degree, and also make the tile animation very jerky.
But it's not a big problem, I can live without animated water for the time being :)


Wouldn't your pathfinding be happening in between render/showpage cycles, though? If you do it that way, you can be confident that the graphics functions will only occur when the computer is taking a break from thinking. Unless you have it set up to think a tiny bit at a time, rather than just solving its problem then moving to the next thing in the loop.

Posted on 2004-06-23 08:08:03


Displaying 1-7 of 7 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.