game-engine

Google Sign-In with LibGDX

删除回忆录丶 提交于 2019-12-02 07:37:57
I've a problem. I'm making a game with LibGDX. Now I want to implement Google Sign-In. I searched everywhere, but can't find anything. What I need is a Resolver to abstract code for specific platform, but I don't know how to do it. Can someone help? EDIT Here's the code, this is my Android Resolver: public GoogleResolverAndroid(final Context context) { handler = new Handler(); this.context = context; GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestEmail() .build(); mGoogleApiClient = new GoogleApiClient.Builder(this.context) .addApi(Auth

physics engine - phase order and other general information

六眼飞鱼酱① 提交于 2019-12-02 07:30:23
问题 I want to build my own 2D mini-physics engine, that will include(for now) rigid bodys, and constraints (joints, contacts, springs...). And I've tried to figure out what is the right order of the phases, when I start a timestep, when the the general phases are: Broadphase, Narrow phase(Collision Detection, and Contact generation), Resolution (Constraints Solver), and the Integration - hope you can tell me the right order. I allso have general questions about each phase: Narrow Phase - When I

libgdx changing sprite color while hurt

别说谁变了你拦得住时间么 提交于 2019-12-02 07:26:13
I am using libgdx to make a little platformer and I would like to make the enemies blink in red while the player hurt them with his weapon. I already tried to change the sprite color and the sprite batch color with no success, it only melt the new color with the one of the texture. sprite.setColor(Color.RED); spriteBatch.draw(sprite); the effect I want to achieve is: going from sprite texture to full red and then back again. I think there is something to do with the Blending function, but I am not sure about that. I want to avoid making some red sprite for each monsters of my game. Does

“How To Make a Tile-Based Game with Cocos2D 2.X” Make this tutorial with cocos2d V3

断了今生、忘了曾经 提交于 2019-12-02 06:46:08
问题 I have a small problem. In this tutorial How To Make a Tile-Based Game with Cocos2D 2.X used cocos2d V2.0, I wanna make this in cocos2d V3.0. So, it doesn't work! Thanks! (I don't speak english) I think problem in this line - self.position = viewPoint; @property (strong) CCTiledMap *tileMap; @property (strong) CCTiledMapLayer *background; @property (strong) CCSprite *player; - (id)init { // Apple recommend assigning self with supers return value self = [super init]; if (!self) return(nil); //

physics engine - phase order and other general information

扶醉桌前 提交于 2019-12-02 04:46:00
I want to build my own 2D mini-physics engine, that will include(for now) rigid bodys, and constraints (joints, contacts, springs...). And I've tried to figure out what is the right order of the phases, when I start a timestep, when the the general phases are: Broadphase, Narrow phase(Collision Detection, and Contact generation), Resolution (Constraints Solver), and the Integration - hope you can tell me the right order. I allso have general questions about each phase: Narrow Phase - When I've found a collision do I need to seperate the bodies after I've found the collision or just apply an

GLM: function taking degrees as a parameter is deprecated (WHEN USING RADIANS)

陌路散爱 提交于 2019-12-02 03:27:01
问题 Currently using VC++ 11 with SDL2, GLM, and GLEW. The issue is stemming from GLM when I attempt to do two things: Create a rotation matrix, create a perspective camera matrix (3D). The error is: "GLM: perspective function taking degrees as a parameter is deprecated" despite the fact that I am passing radians (as floats) to both functions. It says I should define something like "#define GLM_FORCE_RADIANS." Is that really necessary? Personally I use degrees for everything, but OpenGL, so having

GLM: function taking degrees as a parameter is deprecated (WHEN USING RADIANS)

一笑奈何 提交于 2019-12-02 02:18:57
Currently using VC++ 11 with SDL2, GLM, and GLEW. The issue is stemming from GLM when I attempt to do two things: Create a rotation matrix, create a perspective camera matrix (3D). The error is: "GLM: perspective function taking degrees as a parameter is deprecated" despite the fact that I am passing radians (as floats) to both functions. It says I should define something like "#define GLM_FORCE_RADIANS." Is that really necessary? Personally I use degrees for everything, but OpenGL, so having to convert back and forth (for AI movement and what not) is a pain and actually causes a spike in CPU

“How To Make a Tile-Based Game with Cocos2D 2.X” Make this tutorial with cocos2d V3

自古美人都是妖i 提交于 2019-12-02 01:51:43
I have a small problem. In this tutorial How To Make a Tile-Based Game with Cocos2D 2.X used cocos2d V2.0, I wanna make this in cocos2d V3.0. So, it doesn't work! Thanks! (I don't speak english) I think problem in this line - self.position = viewPoint; @property (strong) CCTiledMap *tileMap; @property (strong) CCTiledMapLayer *background; @property (strong) CCSprite *player; - (id)init { // Apple recommend assigning self with supers return value self = [super init]; if (!self) return(nil); // Enable touch handling on scene node self.userInteractionEnabled = YES; self.tileMap = [CCTiledMap

C# Dictionary - The given key was not present in the dictionary

本小妞迷上赌 提交于 2019-12-01 21:27:03
问题 I'm currently trying to load game objects from a Tiled (Tiled map editor) map file into a game engine I'm making in C#. I'm using TiledSharp (Link to github here). It uses a dictionary to hold properties about each individual tile (or 'game object') I'm trying to load. But for some reason I get an error when I loop through the properties, and I also get an error if I check if it's null Here's a snippet of the code I'm using: for (int l = 0; l < tmxMap.Tilesets[k].Tiles.Count; l++) // This

C# Dictionary - The given key was not present in the dictionary

妖精的绣舞 提交于 2019-12-01 19:21:34
I'm currently trying to load game objects from a Tiled (Tiled map editor) map file into a game engine I'm making in C#. I'm using TiledSharp (Link to github here ). It uses a dictionary to hold properties about each individual tile (or 'game object') I'm trying to load. But for some reason I get an error when I loop through the properties, and I also get an error if I check if it's null Here's a snippet of the code I'm using: for (int l = 0; l < tmxMap.Tilesets[k].Tiles.Count; l++) // This line throws an error if (tmxMap.Tilesets[k].Tiles[l].Properties != null) // and if I remove the above