New answers tagged

0

I encountered a similar problem while working on a project of mine. The player was able to pick up a certain variety of weapons, which shoot different type of bullets. I'll help you to figure out a solution for you by explaining the solution I found for my game. In order to take advantage of inheritance and polymorphism, I managed to work out all the ...


0

You copy other ideas. Then by copying and mixing different other ideas, you'll find that they don't work very well together unless you make some adjustments . You do the adjustments (possibly by copying yet another idea from somewhere else) and then you have a new mechanic. At that point you might find that it still doesn't work well, in which case you need ...


3

It depends primarily on what the player is supposed to do. In games where a gun is facing in the walking direction and the main thing the player is supposed to do is to shoot things by accurately aiming the gun, it makes sense to point the camera and the gun in the same direction, so the player sees what they're shooting at. Disadvantages are that you ...


0

You could add a trigger to the plane and then write a script to check, if an object with a tag "Player" is inside it (don't forget to set the players tag to "Player") . Make the speed variable in the player movement script to public so that other scripts can access it. Then when the player is in trigger set the speed variable higher, and when ever the player ...


0

You have multiple ways to solve this. And you are really trying to solve two separate issues here. One is the highlighting, the other one is figuring out which country has been clicked on. Depending on your requirements for performance you can do multiple things. If you don't care that much about performance, and it sounds like you don't have to, then you ...


0

If your class implements InputProcessor: @Override public boolean touchDown(int screenX, int screenY, int pointer, int button) { MoveToAction mta = new MoveToAction(); mta.setPosition(screenX, Math.abs(stage.getHeight()-screenY)); mta.setDuration(5f); //moves to new location by this time interval stage.addAction(mta); return false; ...


0

I would agree with using the TweenEngine. It's relatively simple to use and provides a lot of functionality. To tween a value you first have to create a TweenAccessor. It would look something like this for a Sprite: public class SpriteAccessor implements TweenAccessor<Sprite> { //Used to identify what type of tweening you wish to do. public ...


2

Ok, I figured it out! I needed to make sure that when it found "turret" it needed to look for the transform. void Start() { turretTransform = turretTransform.Find("Turret").transform; }


4

Put your levels into logical groups. Then have the player select the group, and on the next screen select the level from that group. Grouping can be either by theme or by difficulty. Here is a mockup: First screen: When the user clicks on a tile: When it makes sense in the context of your game, you could also use a map of the game world to represent ...


6

I can share my experience from a mobile game that had 10 worlds with 10 levels each so 100 levels in total. We displayed each world as a map with a winding road on it. Each level had a badge with its number and the badge resembled in a way the signs on US highways. All the maps were then put into a single slide controller so that the user can easily snap ...


0

To expand on @user3068350's answer, something like this should work; public class MyGame extends Game { private Stage stage; private Texture myTexture; private TextureRegion myTextureRegion; private TextureRegionDrawable myTexRegionDrawable; private ImageButton button; @Override public void create() { myTexture = new ...


0

A drawable has information about its size and how to draw itself. It's used to determine size and position by ui components. Since you are using a texture, you can use a TextureRegionDrawable. Drawable drawable = new TextureRegionDrawable(new TextureRegion(playTexture); ImageButton playButton = new ImageButton(drawable);


1

The clearest way to make sense of any equation is to figure out the units. In this case, it's a bit ambiguous, but you know that velocity is m/h and that radius would be some kind of distance. v^2 is a good assumption in this case, but it is not immediately obvious why without knowing something about the units of the denominator. Just by looking at this, ...


0

Edit: Someone pointed out that R is in feet. Makes sense as well, and the rest stands. When in feet, the formula probably describes a tightest recommended curvature instead of a comfortable curvature. If solving from the formula the speed for this scandinavian location, it would be 30 mph or 48 km/h. The speed limit there is 40 km/h, so 48 is uncomfortable. ...


2

There isn't really a standard - it's going to be dictated by the needs of your gameplay. For Splinter Cell, determining whether the player (or suspicious evidence) is seen by an AI is the heart of the stealth gameplay. We needed a lot of nuance - consideration of peripheral vision versus direct line of sight, illumination, AI alertness level, movement ...



Top 50 recent answers are included