Welcome to our latest new user
eightbitswide
! (Registered 2024-12-24)
You are not logged in -
nap
CSDb User Forums
Forums
>
C64 Coding
>
Sprite problem (rasters)
2005-06-24
00:40
Wanderer
Account closed
Registered: Apr 2003
Posts: 478
Sprite problem (rasters)
Hi.
Here's my problem... I have 8 sprites on the screen. When they are motionless, they are fine. When I attempt to move them left (scrolling) they shake. The same goes for a sprite scroll routine in another demo I'm working on.
It looks like its the raster because it moves from the top of the sprites to the bottom (they are arranged on top of one another in a stack).
I've tried moving the routine that moves the sprites when the raster is below them or above them and even while it's updating the sprites.
It still shakes... it only does so maybe once every 4 seconds so it isn't every cycle. I don't know why this is happening..
Help?! :)
(This is on CCS64 with auto refresh rate, maybe it's the emulator??)
... 10 posts hidden. Click
here
to view all posts....
2005-06-24
17:49
Wanderer
Account closed
Registered: Apr 2003
Posts: 478
Maybe it is the programmer :) (me). It works fine on my home machine, default refresh rate. On my parents machine it flickers something awful. The sprites 'jerk' a little.
I can only hope the competition demos will be run on a true 64. Where the results will either be very good or something awful that the emulator could not emulate.
2005-06-25
15:34
Cybernator
Registered: Jun 2002
Posts: 154
Generally speaking, why would anyone use tripplebuffering? Ok, say that the first frame is being displayed, and the second is ready in the second buffer, if I want to prepare the third frame immediately I'll have to go for a third buffer (coz the first one's being displayed, and the second is yet to be displayed). BUT, if the rendering happens that fast, I could just wait until the buffers flip, and continue rendering in the first buffer. By the time I reach the VBI, the rendering will be finished. So why go any further than doublebuffering?
Graham wrote:
> Also, if there is a task switch short before the
> vertical blank, the routine will not wait 1 but 2
> frames... theoretically this could happen the 2nd
> frame also etc etc.
Is an ISR routine considered a separate task? I mean, can the ISR be triggered if the task in which it belongs is idle? If it can, I don't see why M$ doesn't implement page flipping with an IRQ. On the other hand, if the ISR cannot be triggered immediately, this could be implemented in the gfx card. Say, the CPU requests a pageflip when the buffer is ready and continues its job. The gfx cards sees this and as soon as the display has finished, it can flip the buffer on its own. Of course, the CPU would need to be notified of this, but that's not timing critical.
2005-06-25
19:09
Optimus
Registered: Jan 2002
Posts: 122
>Generally speaking, why would anyone use tripplebuffering?
I had the same question as you :)
I am new in windows programm, till now I vsynced my effects in DOS, sometimes needing one buffer, sometimes rendering directly to the screen right after Vblank.
In windows, I still don't know how can I make my programms flickerless, there are some times interruptions from the system while my code renders stuff. There is buffer flipping and stuff, but still I think I encounter some problems. I don't know if a 3rd buffer could solve the problem and how do I use it. I have hardly seen smooth scrolling and most people don't care anyways..
I have heard of some demos using interesting techniques with a large ammount of software screen buffers, like some Amiga demos with 3d scenes (The Castle by Loonies), where if for example some frames runs preety fast and some incoming ones slower, the next ones are rendered in memory for future output, while the 1st ones are still outputted to the screen. This way, the demo runs overall in a more steady average frame rate (and not the first frames in 30-50fps and the other heavier ones in 10-20fps eg). But that's with scenes with varying frame rates. Interesting..
Other than that, I don't know what tripple buffering is usefull for. I would like to hear about, hopefully it would save me from those screen clashes at Windows..
Optimus
2005-06-25
20:15
Wanderer
Account closed
Registered: Apr 2003
Posts: 478
I finished coding a demo page only to wake up this morning and find the top raster effect was shaking. Frustrated, cursing, I tried changing the JSR to different parts of the screen. It still shook.
Finally I shrunk the window with the emulator and it looked fine. So I gave up, removed the newest version of the CCGS emulator and went back to the old version. The demo page works (no shaking) but it still gives the odd 'jitter'.
The only real test would be on a real 64.
*sigh*
2005-06-25
22:02
Tch
Account closed
Registered: Sep 2004
Posts: 512
@Wanderer..
If you want,could you have a look at this for me..
Intrology
Especially the menu.
One of the logos is made with sprites,does it jitter?
Also the scroll runs smooth when I watch it with Vice.
As do most demos I have watched.
Maybe it matters how much of your CPU´s power is set to the actual running program,instead of background activities?
Anyway,I hope your coding won´t be frustrated too much with this renditioning of it on emulators.
Good luck!
2005-06-27
08:28
MagerValp
Registered: Dec 2001
Posts: 1078
Triple buffering helps with effects that don't take an integral number of frames to render, as it eliminates the vblank wait. I.e. if you have an effect that takes 25000 cycles to render, with double buffering it has to run at 25 fps, but with triple buffering it'll run at 40 fps. With double buffering the rendering pipeline stalls as the 1st frame is being displayed, and the 2nd frame is waiting for vblank. With a 3rd buffer you can keep rendering.
2005-06-28
12:11
Graham
Account closed
Registered: Dec 2002
Posts: 990
You can immediately continue rendering with double buffering if you disable the vsync, but then you will see "upper half old frame, lower half new frame".
Previous
-
1
| 2 - Next
Refresh
Subscribe to this thread:
You need to be logged in to post in the forum.
Search the forum:
Search
All forums
C64 Coding
C64 Composing
C64 Pixeling
C64 Productions
CSDb Bug Reports
CSDb Development
CSDb Discussions
CSDb Entries
CSDb Feedback
CSDb Info
CSDb moderators
CSDb Questions
Messages to moderators
Requests
for
in
Writer & text
Text
Writer
All times are CET.
Search CSDb
All
Releases
Groups
Sceners
Events
BBS
SIDs
-------
Forum
Comments
Advanced
Users Online
Twoflower/ΤRIΛD
Sokrates
ΛΛdZ
Perff/No Name
DJ Gruby/TRiAD
Nordischsound/Hokuto..
MWR/Visdom
Flexman/VCC
iceout/Avatar/HF
Guests online: 159
Top Demos
1
Next Level
(9.7)
2
13:37
(9.7)
3
Mojo
(9.7)
4
Coma Light 13
(9.6)
5
The Demo Coder
(9.6)
6
Edge of Disgrace
(9.6)
7
What Is The Matrix 2
(9.6)
8
Uncensored
(9.6)
9
Comaland 100%
(9.6)
10
Wonderland XIV
(9.6)
Top onefile Demos
1
Layers
(9.6)
2
Cubic Dream
(9.6)
3
Party Elk 2
(9.6)
4
Copper Booze
(9.6)
5
X-Mas Demo 2024
(9.5)
6
Dawnfall V1.1
(9.5)
7
Rainbow Connection
(9.5)
8
Onscreen 5k
(9.5)
9
Morph
(9.5)
10
Libertongo
(9.5)
Top Groups
1
Performers
(9.3)
2
Booze Design
(9.3)
3
Oxyron
(9.3)
4
Censor Design
(9.3)
5
Triad
(9.3)
Top Logo Graphicians
1
t0m3000
(10)
2
Sander
(9.8)
3
Mermaid
(9.5)
4
Facet
(9.4)
5
Shine
(9.4)
Home
-
Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.039 sec.