Tag Info

New answers tagged

0

You could do this by teleporting the player around - in the case of a staircase, after reaching a certain point just reposition the player several steps back. Of course, the environment would have to be crafted in a way so that the player doesn't notice it (that is, when he looks around in both locations (place where the teleport is and the place he gets ...


0

You can make the moveTo() function a blocking function in the user script, but you should definitely not make it block your script. This way you should have moveTo() return a boolean telling weather the destination was reached or the action was interrupted. I suppose this would be the simplest solution for the user. You cold also have the moveTo() function ...


1

I'm not sure if this question is appropriate for this site, but I'll give you my take. First, kudos on making your game! I am all for doing stuff yourself if you can't find anybody else to do it. You are certainly going for the pixel art retro look, and that is pretty cool. Make your game in the way you like it the most, and take people's advice just as ...


0

var game = new Phaser.Game(480,350,Phaser.CANVAS,"GameContainer"); var GameState = function(){ //var font; }; GameState.prototype.preload = function(){ this.load.bitmapFont('pixelArt',"assets/fonts/pixel-Art.png","assets/fonts/pixel-Art.xml"); // note : The xml file should be saved with UTF-8 encoding or some browsers won't load it. }; ...


0

This is an update to a script found here: http://forum.unity3d.com/threads/groundnpc.181705/#post-1241872 This is a simple fix that prevents NPCs from walking through sloped mesh. #pragma strict var gravity = 20.0; var verticalSpeed= 0.0; private var collisionFlags : CollisionFlags; // The last collision flags returned from controller.Move ...


2

A printer service probably don't want to print such cards. I am not a lawyer, but the way it has been explained to me is that from a legal perspective, they print the cards and sell them to you. If you have them print cards of your design you basically license them to print that design on a set of cards. The printer could be in legal trouble if they print ...


0

Use a raycast or this script. http://forum.unity3d.com/threads/groundnpc.181705/#post-1241872 A don't add rigidbody if you use the cotroller. It breaks it big time. And check off convex on the mesh collider for your terrain. Try this first before adding a script. I remember having this problem before and that's all it took.


0

There is no magical piece of software to do your art for you. However there are tools to make it easier and I can recommend Spine. It was used at a studio I interned at. The artist there really liked it and it integrated well into Unity. http://esotericsoftware.com/ Here's a tutorial that said artist wrote: ...


1

What's the context? For UI, it's very sensible to poll per-frame, especially for cases where the UI and the game simulation have no good reason to be tied together, e.g. highlights when you mouse over a selectable object. For control of a character or the like inside the game simulation, this advice can be flipped. Consider batching up all inputs for ...


0

It depends on what you want to do, whether it's GUI-like or game-like. Most game situations only care about where the mouse is right now, so you go through all the mouse move events and simply act on the last one. This would be per-frame. One example is using the mouse to look. However, there are some GUI-like situations where the intermediate mouse ...


0

You could make your list of if-statements much shorter by storing the game type id as well. for (i = 0; i < quests.length; i++) { if (q_id == i) { wins += 1; // Save consecutive wins for a certain mini-game, i is the id and wins is the amount of wins userStats.saveProgress(i, wins); } } Basically, the code above loops through all game ...


2

Why would you make the game free on android and let PC users pay $10 + $1/month? The big trend for most indies is building a fanbase as soon you have something to show from your game. Blogging about everything that involves your game and perhaps let your fans influence your design. You can find a lot of sources at open indie developers like Grid Sage ...


1

This is very subjective. Digital Tutors is very good tutorial site offering top quality tutorial. It can teach you how to use a tool and goes on showing how they use it. But in the end it is not the tool that creates the art, it is you using the tool and be creative with it. That is something nobody can teach you. Digital tutors does have tutors and ...


0

I'm on mobile, so excuse me if I miss some syntax, but: float speed = 1000; Vector2D mousePosition = GetMousePosition(); Vector2D bulletPosition = GetBulletPosition(); Vector2D direction = (mousePosition - bulletPosition).normalized; bullet.rigidbody2D.AddForce(direction * speed); Where GetMousePosition() and GetBulletPosition() retrieve their respective ...


0

Try using raycast, from the point of your mouse. By creating a variable of type hit and it should be equal to Physics2D.Raycast(Camera.ScreenToWorldPoint(Input.mousePosition), Vector2.zero); And then check if the variable is not equal to null, which means you hit something and then you can check the tag of the object and do what ever you want with it.


0

In addition to Trevor Powell's iteration speed which is really important, here are some other useful considerations: Its like good code... A lot of IFs in there. The more solid the concept the less you need to toy around. If you know what the meat of you are trying to do is, prototyping becomes - what to put and how to arrange things in relation to the ...


1

Don't have the damage reduction be additive, have it multiplicative. Damage = Damage * (1.0 - helmetReduction) * (1.0 - gloveReduction) * (1.0 - trousersReduction) * (1.0 - upperArmorReduction) Each layer of armor reduces not the complete damage, but the damage remaining from the previous layer. As long as no single ...


1

Think ease of use. You always have to start with what you want to achieve first. And it can all be made simple - I want the weakest unit to kill the weakest player with 20 hits. I want the strongest unit to kill the strongest player with 10 hits. The rest is just curving the increments between them. You can build any game on these two considerations ...


1

You'll need to create some way to control the damage passing through. For example: light armor has a maximum reduction of 75%, medium 85% and heavy 95%. If the total reduction combined is above the number, use that value instead. You could also create a weighed reduction: say the player wears one heavy, two medium and one light piece of armor: ...


3

You could reduce the damage for each piece individually. That way you never reach 0 unless a piece reduces it by 100%. You can get very low though. You could also make the different pieces never total 100%. Helmet max 15% torso max 20% arms max 10% legs max 10% Max damage resistance would be 55% like that. You could also go with a much more refined ...


0

I think it would make the most sense to use percentage based reduction, if you don't want to remove damage entirely. For example different pieces could provide different percentages of damage reduction: Helmet - 5% Gloves - 5% Chest - 15% Legs - 10% Total reduction = 35% Then for example if your character is hit for 40 points of damage you would do the ...


2

Vector mathematics! Assuming you're using Unity, you could use the inbuilt functions of Vector2: transform.position = Vector3.MoveTowards(transform.position, target, speed); Otherwise, here's how it's done - first, calculate the direction from point A to point B: public static float Length(float x, float y) { return Math.Sqrt(x * x + y * y); } ...


0

You should look at this tutorial video https://unity3d.com/learn/tutorials/projects/roll-a-ball/moving-the-player And maybe the entire Unity tutorial on Roll a ball For making the balls bounce of the wall and from each other, on collision detection you should add a force based on momentum of ball(s).


0

This is definitely possible. You should look at the Android developer documentation for bluetooth (Ocelot has posted the link). At the minimum you will have to do this - Discover the devices Pairing and connecting devices One of the device needs to become server. It will open a socket and listen for connection. Other device(s) need to become client. ...


1

You will need to take a look at isometric rendering principles. Read more about isometric projection for more details on wiki Since you are in the 2d space you will need to specify the order of drawing. By drawing things all on the same "layer" you will run into tiles rendering "strangely". By applying proper layering you can draw the farthest away ...


0

It all depends on the context of what you are doing but: FLAT : Designing it around flat values is viable if you don't wish the competitive factor to be heavy. = Win or lose vs anyone gets you the same result, no need to seek out better players to play againts. FLAT AND PERCENTILE: You can take percentages of existing points but then you have to work on ...


1

Having a single currency is not simple at all for monetization. This is because you would have to implement many efficient money sinks in the game to stop players from grinding their way to unlocking all content/items. Without good sinks, there is no incentive to buy IAPs. I suppose in terms of coding it might be slightly more complicated, but with a ...


5

In my book I summarized them this way: One of the most central parts of game design is crafting game mechanics; these are individual actions (or systems of actions) within a game. The mechanics in a game are often set up by its rules, whereas the challenges in a game generally come from applying the mechanics to specific situations. For example, walking ...


4

In the context of video game development, game mechanics or gameplay mechanics (the words are quite synonymous in this context) are the set of rules which govern how a game works. They explain things such as: What entities are there in a game (the player-character, the enemies, projectiles they spawn, the environment, etc.) What game-relevant state do ...


0

I would recommend duplicating the obj_cube or using parents. If you duplicate it the objects will do the same thing anyway. You could then write something like this: if (place_meeting(x,y,obj_cube)) && if (place_meeting(x,y,obj_cube1))



Top 50 recent answers are included