Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 7 months ago. Improve this question I’m a beginner so I used Bro Code’s (a YouTuber) version of snake game. It’s almost identical with minor adjustments,
Tag: game-development
Why does paintComponent get called only on some JPanels?
I’m trying to add a background to different JPanels (henceforth they will be called Window). These Windows are classes I created and make them inherit JPanel. Then depending on the state of the program one Window is set as the content panel of the program’s JFrame. The problem comes when in some Windows the background gets set and in others
Detecting interactions between Canvas objects
In my current prototype I have a fixed grid of rectangles I draw on the canvas in a loop, and a red square “gamePiece” which can be dragged around the screen by a player’s finger (screenshot below). My goal is to make it so that the player square can interact with the grey squares, but I’m not sure how to
Android combine multiple booleans with elements from List
Hello I am developing a game and working on collision detection. For now my method does not allow to add elements dynamically, as you can see I am adding collision nodes (11,12,13,…) manually. Here is my code: I want to dynamically build a boolean isNotCollision() depending on number of elements of collision in List. I want to rebuild it in
How to set JFrame in fullscreen using users native resolution?
I am trying to create a little game for a project in university. Since I need to update the screen permanently I am looking for a good render loop implementation. It should be full screen. I found this on gamedev.net – Java Games: Active Rendering: I executed the code and there are two things I am wondering about: My display