Jewel Rush - quasi-Boulder Dash clone

Everything about the modern clones and remakes.

Moderator: Admin

User avatar
CWS
Member
Posts: 429
Joined: Wed Jul 11, 2007 2:32 pm
Location: Austria - Europe

Post by CWS »

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! ;)
User avatar
rjm
Member
Posts: 16
Joined: Sun Mar 29, 2009 2:57 pm
Location: United Kingdom
Contact:

Post by rjm »

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
subotai
Member
Posts: 251
Joined: Sun Jan 25, 2009 4:19 pm

Post by subotai »

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.
User avatar
rjm
Member
Posts: 16
Joined: Sun Mar 29, 2009 2:57 pm
Location: United Kingdom
Contact:

Post by rjm »

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 :shock:). 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!
subotai
Member
Posts: 251
Joined: Sun Jan 25, 2009 4:19 pm

Post by subotai »

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: Select all

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 ;-)
Post Reply