 |
Boulder Dash Forum The only Boulder Dash discussion board in English language!
|
View previous topic :: View next topic |
Author |
Message |
CWS Member

Joined: 11 Jul 2007 Posts: 384 Location: Austria - Europe
|
Posted: Mon Sep 24, 2012 7:00 am Post subject: |
|
|
Your game is really nice! Only one thing: Could you please use softscrolling and only scroll the playfield as soon as the player is nearing a border? The scrolling you are using now is really hurting my eyes!  |
|
Back to top |
|
 |
rjm Member

Joined: 29 Mar 2009 Posts: 16 Location: United Kingdom
|
Posted: Mon Sep 24, 2012 4:32 pm Post subject: |
|
|
CWS wrote: | Your game is really nice! Only one thing: Could you please use softscrolling and only scroll the playfield as soon as the player is nearing a border? The scrolling you are using now is really hurting my eyes!  |
Thanks for the feedback! If by softscrolling you mean smooth scrolling, then yes, this is something I'm still trying to do, the currently implementation is... unstable. I'll tinker the offset before scrolling begins as well.
Thanks again!
Richard Moss _________________ Jewel Rush - http://binaryrealms.co.uk/jewel-rush |
|
Back to top |
|
 |
subotai Member
Joined: 25 Jan 2009 Posts: 251
|
Posted: Mon Sep 24, 2012 5:31 pm Post subject: |
|
|
How is your implementation of the scrolling? Are you using a timebased movement or delay values? A timebased movement is the better choice!
The implementation is not very complicated: Scrolling starts when the player gets close to the screen border and ends, when the player is "centered" again. The scrolling speed can always remain the same. But for the smooth scrolling issue, it shouldn't make any difference if the scrolling speed is constant or variable. |
|
Back to top |
|
 |
rjm Member

Joined: 29 Mar 2009 Posts: 16 Location: United Kingdom
|
Posted: Mon Sep 24, 2012 6:32 pm Post subject: |
|
|
subotai wrote: | How is your implementation of the scrolling? Are you using a timebased movement or delay values? A timebased movement is the better choice!
The implementation is not very complicated: Scrolling starts when the player gets close to the screen border and ends, when the player is "centered" again. The scrolling speed can always remain the same. But for the smooth scrolling issue, it shouldn't make any difference if the scrolling speed is constant or variable. |
It's time based - back when I last wrote games in DOS I used to rely on machine speed and basically use delays but that wouldn't work with the variety of hardware available today (probably didn't back then, but it was OK on all the 286 machines I had access to!). Everything in my engine is time based so that in theory it should run the same on all machines. Unless their system clocks are dodgy I suppose
I'm actually updating on one of the test projects I did for ensuring various aspects of my engine work to properly test scrolling without the game itself getting in my way. However, when checking how I implemented smooth scrolling tonight I've see that I did it in a very silly way, although in fairness I was missing a piece of the puzzle when I did that first draft and forgot to go back to it. Still, it's wrong. And games are supposed to be fun to play, not eye strain inducing!
The good news is that it should be quite simple to correct (I think it involves deleting a large swath of code and replacing it with one, maybe two lines ). Perhaps a little more complicated that that as I haven't implemented the way you describe (ie continuing to scroll until back in the center), but it can't be that complicated!
Thanks for the comments, helpful as always! _________________ Jewel Rush - http://binaryrealms.co.uk/jewel-rush |
|
Back to top |
|
 |
subotai Member
Joined: 25 Jan 2009 Posts: 251
|
Posted: Mon Sep 24, 2012 8:44 pm Post subject: |
|
|
rjm wrote: | It's time based - back when I last wrote games in DOS I used to rely on machine speed and basically use delays but that wouldn't work with the variety of hardware available today (probably didn't back then, but it was OK on all the 286 machines I had access to!). |
Well, I'm just asking, because if you are using OpenGL in combination with timebased movement, smooth scrolling should be no problem. O.k., I'm using Dephi, but OpenGL remains OpenGL. Here is my implementation:
Code: | IF QPC_Old=-1 then
QueryPerformanceCounter(QPC_Old) else
QPC_Old:=QPC_New;
...
//Scrolling:
CoordX:=CoordX+ScrollSpeed*TimeFactor //Scroll to the right
...
Render;
...
QueryPerformanceFrequency(QPC_Freq);
QueryPerformanceCounter(QPC_New);
TimeFactor := (QPC_New-QPC_Old) / QPC_Freq;
|
... and I have no trouble with smooth scrolling. As already mentioned: There is no need to "adjust" the ScrollSpeed (just keep it constant).
rjm wrote: | Perhaps a little more complicated that that as I haven't implemented the way you describe (ie continuing to scroll until back in the center), but it can't be that complicated!
|
The scrolling routine was also much more complicated in my old implementation.
rjm wrote: | Thanks for the comments, helpful as always!
|
You're welcome. I try my best  |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|