Making our player character
We saw in the previous chapter how to create our background image. In theory, it is almost similar to the previous chapter to create our player character, but since we are going to deal with animations in the further part of this chapter, we will need to modify our code a bit. Let's get started with that first.
Now, as a programmer, you have to keep in mind that there are many ways to do one particular thing; therefore, just as a demonstration to get a clearer understanding, we will modify our background image code a little. Open up your BackgroundImage.java file and remove the setVector method. Now, you will see that there will be an error in our GameView.java file since our setVector method does not exist; let's ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access