www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/03/21:46:04

From: Henri Ossi <henri DOT ossi AT mail DOT htk DOT fi>
Newsgroups: comp.os.msdos.djgpp
Subject: Smooth moving
Date: Tue, 03 Feb 1998 18:33:25 +0200
Organization: Telecom Finland News Service
Lines: 40
Message-ID: <34D746D4.84EF3964@mail.htk.fi>
Reply-To: henri DOT ossi AT mail DOT htk DOT fi
NNTP-Posting-Host: pc1010.public.htk.fi
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi.

I've been planning to make a speedball kind of game.
The idea is, that there's some players trying to get a ball to
other teams's goal...

But again, one thing, that has always annoyed me is,
that when the ball moves around the screen
(I'd like to move it with float-numbers and use sin and cos
to get the dx, dy variables counted)

But the ball doesn't look smooth, when it moves.
Because it doesn't move a whole pixel/screen refresh,
it makes my eys to get wet etc. side effects.

So, should I only use angles 0,45,90,135,180,225,270,315 ?
And make the ball to move only 0,1 or 2 pixels?
But now, if the angle is 45, dx=1, dy=-1 and the ball looks like it
is going too slow...

And if i use 0 and 1 for the deltas, the ball moves too fast when the
angle is 45,
135, 225 or 315.

Annoying.

Is there any other solution than to make the screen resolution higher
and
forget the whole thing ever happened?
(I use mode 13h, but I'm planning to make Mode-X graphics someday...)

I know, that this is a silly question, but no I finally understand, why
I couldn't move freely in some other old games...

Well, thanks for your answers.

-Henri Ossi



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019