game-development

Client-side prediction & server reconciliation

时光总嘲笑我的痴心妄想 提交于 2019-12-10 22:04:10
问题 I’ve read some articles about client-side prediction and server reconciliation but I'm missing some parts, I take the part of client side prediction but I don’t understand how exactly is reconciliation done. I’ll take these two pieces of well-known articles as reference: http://www.gabrielgambetta.com/fpm2.html #2. So applying client-side prediction again, the client can calculate the “present” state of the game based on the last authoritative state sent by the server, plus the inputs the

How to make an enemy follow the player in pygame?

落爺英雄遲暮 提交于 2019-12-10 11:19:32
问题 I made part of a game. It runs well but I would like to add enemies in my game. So far I add the image of the enemies in pygame sprites. But how do I make the enemies follow the player? I tried do this but it just made the image of the enemy direct to the player: def moveEnemy(self): enemies.rect.x = player.rect.x enemies.rect.y = player.rect.y all_sprites_list.add(enemies) enemies_list.add(enemies) I thought this would make the image of the enemy follow the player. Instead it just overlaped

How does touchDragged work in libgdx?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-09 17:44:18
问题 I am currently learning libgdx game programming,now i have learnt how to use touchDown but iam not getting idea how to use touchDragged.How will the computer knows in which direction the finger is dragged(whether the user has dragged to left or right) 回答1: The computer doesn't know that. Or at least the interface won't tell you this information. It looks like this: public boolean touchDragged(int screenX, int screenY, int pointer); It is nearly the same like touchDown: public boolean

Xbox one dev mode and Unity free version

痞子三分冷 提交于 2019-12-09 13:15:24
问题 I have a retail Xbox one console with Dev Mode activated Unity (latest free version) and a MSDN individual developer account. I am able to deploy test apps from Visual studio on the Xbox however i want to know how do i build and run apps on Xbox from Unity? I contacted unity and they said i need approval from my account manager however I'm an individual developer. What I want to do is deploy from Unity to Xbox one I'm running parallel from a Mac (Windows 10 version) but Unity is installed on

Collect coins and add to score label in Sprite Kit

一个人想着一个人 提交于 2019-12-09 12:22:29
问题 I'm trying to implement a simple scoring system into my game using this tutorial as a reference: http://www.raywenderlich.com/87232/make-game-like-mega-jump-sprite-kit-swift-part-2 The problem is, if I try to implement as is, it crashes in the GameScene.swift on this line: let another = whichNode as! GameObjectNode Here are the main parts of the code where the player collects the coins. I can also invite you to my repo if you'd like to take a closer and better look. I know it can be hard from

border color change is working only for first time

﹥>﹥吖頭↗ 提交于 2019-12-08 11:37:21
问题 I am trying to make a javascript based small game. Here is the Fiddle for the GAME It is almost working except a few issues:- On click of any TD , if the image is in that TD , cell border color should be green otherwise if you have clicked on wrong TD , border color turns to red. This functionality is working only first time you start the game. from next time it is always showing red border color. Till level 8, the changing of border color is visible, but as you increase the level, user

How to copy folder's out of resources from jar both in runtime and dev-env?

旧巷老猫 提交于 2019-12-08 03:17:20
问题 I am currently making a game which have levels which are pre-made and i currently store them in resources. I want a solution to how i can extract a folder out of a jar in production and development environment. I have tried copying the folder by using the given method below and pass the src as File defaultWorld = new File(GameData.class.getClassLoader().getResource("worlds/").getFile()); and destination as private static File worldsDir = new File("run/worlds"); public static void copyFolder

Blank Screenshots In Vista and Win7 when gaming

假装没事ソ 提交于 2019-12-07 02:17:30
I noticed another person also requested help on this. I read that post and it seems it wasn't resolved yet. I also tried changing from my code to the code in the "Screen shot in 2 clicks" Post, But implementing that in my code messed around with all my other code for some reason. At the moment, The screen shots show up perfectly in Win XP. In Vista and Win7 how ever, they show up blank unless the game is played in window mode. I hope someone out there can help us as this is the last step to finishing our program and we cannot finish without this issue fixed. The C# code I am using for screen

How to make an enemy follow the player in pygame?

我是研究僧i 提交于 2019-12-06 08:28:00
I made part of a game. It runs well but I would like to add enemies in my game. So far I add the image of the enemies in pygame sprites. But how do I make the enemies follow the player? I tried do this but it just made the image of the enemy direct to the player: def moveEnemy(self): enemies.rect.x = player.rect.x enemies.rect.y = player.rect.y all_sprites_list.add(enemies) enemies_list.add(enemies) I thought this would make the image of the enemy follow the player. Instead it just overlaped the player's image. I read though many pygame sprites examples but the examples saids to replace the

Java JProgressBar using Image

喜你入骨 提交于 2019-12-06 07:14:10
问题 I am making a game in Java, and I am using a JProgressBar for a health bar. I want to use an image (instead of colours) for the JProgressBar , but I have not been able to do it. I have tried using the paint method, paintComponent method, making a new class, but it's not working. May someone please help me? 回答1: Without going to the extent to creating your own ProgressBarUI implementation, you could simply create your own... This example essentially makes a "bar of potions" out of a single