Changing velocity of object in Java Game
<p>So I'm making a sort of space game in Java. Currently, the spacecraft stays in place if the user isn't doing anything, and moves at a constant velocity in different directions based on the user's key input.</p>

<p>I'd like to change it so that when the spacecraft is moving, as the user continues to press the key, the spacecraft's velocity accelerates faster. </p>

<p>In my move method, I currently have</p>

<pre><code>public void move() {
    x += dx;
    y += dy;
}
</code></pre>

<p>I've tried doing such things as </p>

<pre><code>public void move() {
    x *= dx;
    y *= dy;
}
</code></pre>

<p>But constantly multiplying values makes the spacecraft move way too fast.</p>

<p>Is there another approach to doing this? </p>

<p>Thanks in advance.</p>
