Flickering Character
Author |
Message |
Guest
|
Posted: Wed May 24, 2006 2:38 pm Post subject: Flickering Character |
|
|
I have a flickering character, but I fixed some of the flickering with a View.Update and View.Set offscreenonly, but it still flickers abit. Can anyone look at my code and tell me what's wrong? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Guest
|
Posted: Wed May 24, 2006 2:42 pm Post subject: (No subject) |
|
|
By the way, I'm far from finished, that's why I didn't implement a story line or control scheme yet.
Outside World:
-ESC for Menu
-ARROW KEYS to move
-hold SHIFT to run
Battle:
-ESC to run
-enter to select option |
|
|
|
|
|
Guest
|
Posted: Wed May 24, 2006 2:43 pm Post subject: (No subject) |
|
|
By the way, I think there should be an EDIT button so I don;t have to keep posting when I think of new stuff =) |
|
|
|
|
|
Guest
|
Posted: Wed May 24, 2006 3:38 pm Post subject: (No subject) |
|
|
EDIT: Get rid of offscreen only ("causes major glitch when retrieving exp") |
|
|
|
|
|
Remm
|
Posted: Wed May 24, 2006 4:39 pm Post subject: (No subject) |
|
|
*Grr* i WANT to try it but, as with every turing thing i download, it wont work! Well, with my program, a wrongly placed View.Update will cause some flickering,
so delete -> run -> restore if OK
to each of your view updates, make sure your offscreenonly's are in place and so on. Too bad it won work, didint look too bad
Btw, you get a bit spammy; double posting is one thing, but 4 times in a row?! wait a good bit until you get together enough to acually post
Quote:
By the way, I think there should be an EDIT button so I don;t have to keep posting when I think of new stuff =)
that could've gone on the end of somthing else, or be left out entirely. EDIT is taken out so newblets dont erase their stuff right after asking. You can delete your post at the cost of 3 bits, i belive. (top right corner of post-box) |
|
|
|
|
|
HellblazerX
|
Posted: Wed May 24, 2006 8:42 pm Post subject: (No subject) |
|
|
Remm is right in the sense that you are placing the View.Updates in the wrong spots, but it would also good to know why they're the wrong spots.
When you set the graphics mode to offscreenonly, your draw commands doesn't draw to the monitor, but rather to an offscreen buffer. When you call View.Update, it will draw whatever was on the buffer onto the screen. In your program, you call View.Update when you haven't actually made any changes to the screen at all, and so you don't see alot of the things, such as your victory screen.
Also, the flickering in your world map is causes by too many View.Update. View.Update draws whatever is currently on your buffer, so if you call it before finishing your picture, what happens is you end up drawing an unfinished picture. In your OutsideWorld procedure, you're drawing and updating your world map and character separately, and that's where the flickering comes from. The idea of the double buffering (that's what its called) is that you draw your picture as a whole, and that's what removes the flickering, because there's no moment where your background and foreground are two separate pictures.
I've made some changes to your program, if you don't mind, specifically the View.Updates. There still are still one or two things to be fixed, but I'll leave that up to you. |
|
|
|
|
|
Clayton
|
Posted: Wed May 24, 2006 8:55 pm Post subject: (No subject) |
|
|
not bad actually (why did you have to steal ff7 music?? why), instead of processes i would suggest using Music.PlayFileReturn which does the same thing, without the problems processes can bring, now, for all of those arrays that have to do with monster data, why not make a record of it????? it would be much more organized and easier to read, if you dont know how to use records, check the Turing Walkthrough for the tut on them, otherwise not a bad start.
oh another thing, when in a battle, you cant actually kill a monster, you do like 2hp worth of dmg to it, and the battles over, look into that (i dont know for sure if that was intentional for debugging purposes or what) not bad |
|
|
|
|
|
Guest
|
Posted: Thu May 25, 2006 2:56 pm Post subject: Legend of Legaia |
|
|
Well I've updated it a tiny bit. I really need Legend of Legaia sprites badly. And definately I needa learn mapping skills. Also, if you want to encounter montsers more frequently or less frequently, change the var chance.
And the reason why you killed the monster in 1 hit was for testing. I will change it before posting so you must bring them to 0hp. You can uncomment and comment if you wish to change that.
Also you can uncomment the %delay (5500) after you kill the monster in the Victory procedure if you wish.
*THINGS PLANNING TO FIX*
-Going to make it flash when you encounter battle
-Fade in names of towns when you enter (tested but buggy so removed) |
|
|
|
|
|
Sponsor Sponsor
|
|
|
HellblazerX
|
Posted: Thu May 25, 2006 4:06 pm Post subject: (No subject) |
|
|
Dude, did you not even read my post. This version incorporates twice as much View.Updates as the previous version, and to make it even worse, you've added all these View.Sets all over the place. You've just lagged up your game like crazy. I just added a fps counter to your program, and its getting something like 25 fps on average. |
|
|
|
|
|
TheOneTrueGod
|
Posted: Thu May 25, 2006 4:36 pm Post subject: (No subject) |
|
|
Its generally a better idea to edit your previous post and remove the old program then replace it with your own.
Listen to Hellblazer. Your program should only have ONE View.Set and ONE Vew.Update. (Except in cases like having a battle screen and a world map. Then you should have two. Or a battle screen, a world map, and an inventory screen. Then you should have three View.Sets (One at the begging of inventory, one at end, one at start of world map program) and two View.Updates. You should never exceed like 2 per "main" loop. (Once again, circumstantial. This is not one of those circumstances.) |
|
|
|
|
|
Guest
|
Posted: Thu May 25, 2006 5:37 pm Post subject: (No subject) |
|
|
Ok I did what you said, and what do you mean it lagged it up like crazy?? I took out all the stuff that I used like nooffscreenonly, etc, and put View.Updates where you had them. I noticed no lag difference... lol. It's still fast =) But thanks for the help there to clean up my code.
And I don't see an EDIT button, so how can I edit my old post? |
|
|
|
|
|
|
|