game-development

Android : App not installed

南楼画角 提交于 2019-12-12 08:21:38
问题 Newbie here.....I made my first game with Godot game engine and exported to android successfully.....copied to my phone, it installs and runs fine. After a couple of hours, I made some changes and exported it again.....Again copied the apk but now when I try to install it, It does not complete installation. I tried to change the export settings so many times but it wont install. Please help. Tried installing using adb and I get this: C:\Users\Suhail\AppData\Local\Android\Sdk\platform-tools

How Do I spawn Enemy at either the far left or the far right of the stage and have them move in to the center?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 03:47:57
问题 First I get This Error ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. at flash.display::DisplayObjectContainer/removeChild() at Game_fla::MainTimeline/testCollisions()[Game_fla.MainTimeline::frame1:205] and here is my code // ******* IMPORTS ***** import flash.events.MouseEvent; import flash.events.Event; import flash.events.KeyboardEvent; import flash.events.MouseEvent; import flash.display.MovieClip; import flash.events.KeyboardEvent; //*****VARIABLES*

Why this script seems to work only with the first joystick input?

混江龙づ霸主 提交于 2019-12-12 01:48:38
问题 This program is supposed to move my character forward when there is a positive offset in the Y direction of the joystick and stop moveing when the joystick isn't moving. But my code seems to do that only for the first time. The second time onward, it seems to stop moving when I press the button and moves when I release it. Here is my code: using UnityEngine; using System.Collections; public class move : MonoBehaviour { public Transform obj; float threshold = 0.0f; Vector3 current_pos; void

Loading Tile Maps From Text Files In Slick2D

柔情痞子 提交于 2019-12-12 01:04:42
问题 I am making a fairly simple 2D Game Engine in Java using the Slick2D Library, and am trying to load levels (tile maps) from a text file. I want to be able to load in multiple different tilesets, and therefore don't want to assign each number to a tile like this: 1 1 1 1 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 1 1 1 (Where 1 is a wall and 0 is a floor) instead, I would like to be able to use x and y coordinates in the tilemap to represent how many tiles across and down the tile is located at on

Unet Spawnable prefab not following Player Prefab on Client Side

匆匆过客 提交于 2019-12-11 18:12:36
问题 I have got a problem with Gun not sticking to a Player. It only happens for a client. As you can see on the screen, the gun position is fine for the host(Player on the right). Gun Prefab has Network Identity with Local Player Authority checked, and Network Transform, same for Player. This is my code for Player: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Networking; public class Player : NetworkBehaviour { [SerializeField] float speed = 10f

Get Selected Item from List

妖精的绣舞 提交于 2019-12-11 17:38:59
问题 I'm currently creating an inventory system, in which the user will select an item from a list and the icon on the right will update based on the item that the user has picked. I need a way to get the list item that the user has currently selected. I then need to use that list item to display an icon which the user will see. Currently I have tried using the getSelected() method on the inventory list, which seems to be only returning the first item in the list. I need a way to get the item that

How to set fixed drawing speed and world steps in Box2D and SFML?

岁酱吖の 提交于 2019-12-11 16:59:51
问题 There is a simple project, Box2D is engaged in physics, SFML draws. On different machines with different performance speed of the program varies. How to set a fixed speed? So that would on a powerful, average and weak computer the speed of the program (movement of objects) were the same? We need to make Box2D work on different computers at the same speed. It also gives coordinates, and SFML draws a square at the given coordinates. How to solve this problem? 回答1: Constant Frame Rate is what

How do you display a message once a javascript function restarts?

做~自己de王妃 提交于 2019-12-11 16:13:01
问题 Im wanting to know how to put a message in everytime the timer starts over. And here is my code thus far: <head> <script type="text/javascript"> var c=10; var t; var timer_is_on=0; function timedCount() { document.getElementById('txt').value = c; c = c - 1; if (c == 0) c = 10; } function doMining() { if (!timer_is_on) { timer_is_on = true; t = setInterval(function () { timedCount(); }, 1000); } } </script> <SPAN STYLE="float:left"> <form> <input type="button" value="Mining" onClick="doMining(

Understanding simple simulation and rendering loop

你。 提交于 2019-12-11 06:24:29
问题 This is an example (pseudo code) of how you could simulate and render a video game. //simulate 20ms into the future const long delta = 20; long simulationTime = 0; while(true) { while(simulationTime < GetMilliSeconds()) //GetMilliSeconds = Wall Clock Time { //the frame we simulated is still in the past input = GetUserlnput(); UpdateSimulation(delta, input); //we are trying to catch up and eventually pass the wall clock time simulationTime += delta; } //since my current simulation is in the

Visual Studio doesn't correspond with Unity

走远了吗. 提交于 2019-12-10 22:14:13
问题 So, this happened a couple of days ago. I worked on a project in Unity (latest version) and Visual Studio 2017. I had to change computers/machines, so I archived the folder with the project in order to open it in the future. The computer/machine I migrated to had last year's version of Unity and VS 2017. I updated everything, opened the project in Unity - everything was working fine. However, when I try to open Visual Studio to change the code - firstly, all lines of code are underlined red