2d-games

How to get started with andengine [closed]

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 18:04:32
Are there any good resources to get started with Andengine? Any good tutorials, blogs or books? Of course, I have visited its official website http://www.andengine.org/ , but I didn't think the documentation they have is a good starting point. I started with AndEngine not long ago, these are the thing that helped me : Download the AndEngine Examples from Play store, there is source code of it in Nicolas Gramlich's github: https://github.com/nicolasgramlich Developing Small Space invader from scratch : https://jimmaru.wordpress.com/2012/05/19/jimvaders-my-own-invaders-clone-thingie-tutorial/

Is there any way to “commit” the state in Redux to free memory?

最后都变了- 提交于 2019-12-01 17:52:40
I'm working on a real-time multiplayer game and I use Redux on both the server and the client to store the state of the application. However, the amount of actions dispatched into the store is significantly higher than in an usual application because my game is real-time. I suspect that this is why Redux is using a lot of memory. To my understanding Redux stores all actions dispatched into a store in memory in order to be able to do its " time traveling ". I also noticed that the Redux DevTools allows you to commit the state. What I would like to do is commit the application e.g. every 10

Is there any way to “commit” the state in Redux to free memory?

让人想犯罪 __ 提交于 2019-12-01 17:41:22
问题 I'm working on a real-time multiplayer game and I use Redux on both the server and the client to store the state of the application. However, the amount of actions dispatched into the store is significantly higher than in an usual application because my game is real-time. I suspect that this is why Redux is using a lot of memory. To my understanding Redux stores all actions dispatched into a store in memory in order to be able to do its "time traveling". I also noticed that the Redux DevTools

How to speed up a Sprite Kit game after every additional 50 points

最后都变了- 提交于 2019-11-29 15:59:30
I am making a 2D game with Sprite Kit and I need to add a method to speed up the game after every 50 points. I worked out a method that adds the speed as wanted, but I have to copy, paste and adjust an if-statement in the update method for every additional 50 points. Another problem with my solution is that I have to give my points an increment right after speeding it up, because if not the game speeds up completely, though I don't know why. Here is my solution so far: // inside the update method // points are added when an enemy is destroyed // pointSpeed is the float variable that is used to

CardLayout in Java change by action in one of the 'cards'

不想你离开。 提交于 2019-11-29 15:12:50
I am making a simple game using a JFrame . I have made a simple "Start" screen which basically consists of a String and a JButton . I am picking up the button click with the actionPerformed(ActionEvent e) method. I don't know how to change the cards using a button click. This may seem like a simple problem to solve, but the twist comes with this: My main JFrame, my StartScreen and my JPanel where the game takes place are all in separate files. My main file, Virus.java, is where I create the JFrame . My file VirusGamePanel.java is where the game takes place. My file StartScreen.java is the

How to extract part of this image in Java? [closed]

这一生的挚爱 提交于 2019-11-28 15:32:14
I have this sprite sheet: How can I read this image file to extract part of it to be used as a sprite ? If the sprites area read into a BufferedImage , the getSubimage method can be used to get a subimage of the sprite sheet. The getSubimage method will take the x , y , and the width and height of the desired subimage, so the desired sprite can be obtained. Since most of the sprites seem to be the same size, I would think most of them can be retrieved by a nested for loop to iterate through the large image. For example, if the sprite image is loaded using the ImageIO class (such as the read

How to speed up a Sprite Kit game after every additional 50 points

你说的曾经没有我的故事 提交于 2019-11-28 10:07:24
问题 I am making a 2D game with Sprite Kit and I need to add a method to speed up the game after every 50 points. I worked out a method that adds the speed as wanted, but I have to copy, paste and adjust an if-statement in the update method for every additional 50 points. Another problem with my solution is that I have to give my points an increment right after speeding it up, because if not the game speeds up completely, though I don't know why. Here is my solution so far: // inside the update

CardLayout in Java change by action in one of the 'cards'

别等时光非礼了梦想. 提交于 2019-11-28 09:14:08
问题 I am making a simple game using a JFrame . I have made a simple "Start" screen which basically consists of a String and a JButton . I am picking up the button click with the actionPerformed(ActionEvent e) method. I don't know how to change the cards using a button click. This may seem like a simple problem to solve, but the twist comes with this: My main JFrame, my StartScreen and my JPanel where the game takes place are all in separate files. My main file, Virus.java, is where I create the

How to extract part of this image in Java? [closed]

本小妞迷上赌 提交于 2019-11-27 09:17:12
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I have this sprite sheet: How can I read this image file to extract part of it to be used as a sprite ? 回答1: If the sprites area read into a BufferedImage, the getSubimage method can be used to get a subimage of