texts: Making a scriptable dynamic Distance Joint in Unity

texts:
I have 2 2D RigidBodies that are connected together using a Distance Joint 2D...

I update the distance of said Distance Joint 2D (using a script) expecting the distance between the two RigidBodies to change, but nothing actually happens.

I'm guessing this is to do with the Physics engine not updating the positions of the RigidBodies?


texts: How difficult and expensive would be to obtain 3D models for my game?

texts:
So, basically I'm looking for a way to get some 3D models and animations for my game.

I know this is kind of vague, but I don't need a precise answer, the details would be like this:

The 3D models are for humanoid units, but there could be some alien-ish units too.
The level of detail of the units would be similar to Warcraft III ones
Amount of units, to begin with, 30-35
The units will need to have animations like: walk, attack, block and attack, and maybe some special movement.

That's all.

Now, the question is, how hard/expensive/complicated would be to get those units made by an artist, bought in a website, etc.

I just want to know what to expect.

Thanks!


texts: Passing a list of existing entities to a new client when using a component system?

texts:
My game server uses entities containing components to represent everything in the game world. This has worked great so far but I've run into a problem now that I'm allowing clients to connect to the server.

Basically the server needs to tell the connecting client about all the existing entities in the game, Since the player, the monsters, the trees etc. are all instantiated from the same Entity class I currently have no way of telling the client what each entity actually is.

What would be the best way of sending the entities to the client so that the client knows what components to add to each? The only thing I can think of is having a string "name" on the entity and then sending packets like this to the client...

{

     'action': 'create-entity',
     'data': {
         'entity-type': 'dragon',
         'x': 300,
         'y': 40,
     }
}

So now the client would know to call the "createDragonEntity" function to create the correct entity.

Any better suggestions?


texts: How do I save a screenshot and load it as a texture for use in game?

texts:
I have a Unity level that takes a screenshot taken in the previous level and applies it as a material to a Plane, the problem is that it will get stuck and not apply the most recent version of the screenshot.

I figure that the best way would be to handle it with a C# script instead of just simply dragging and dropping the image file from the assets folder like I have been doing.


texts: How to generate a "loop room" in a platformer game (by Unity)?

texts:
I want to build a level with a room whose left edge is linked to right edge in a 2D platformer game in Unity.

My goal is let all objects disappear in one side will appear in other side of the room.
Just like this:

Both sides should have collision with other objects.

Right now I'm doing this by cloning objects on the other side, but it is too complicated. Is there any other good way to solve this?


texts: How do you actually build once you encounter the 'Too many method references' error?

texts:
I'm making a very simple mobile F2P arcade game in Unity
After adding SDKs for facebook, gamesparks, firebase, and appodeal I coud not build, getting the "Too many method references: 76221; max is 65536" error.

The solution from Too many field references: 70613; max is 65536 is apparently to export an ADT project, import it into Android studio and go from there.

I built following these instructions, and after building my Android studio project had errors relating to the facebook SDK similar to here: Unity exporting android project with Facebook SDK issue

The solution proposed there is to copy all the .aar from your Unity project to files to the Android studio project and add lines to the build.gradle file referencing them, which I did.

After doing all that the 4 facebook related errors are gone but one new one appears:

  Error: more than one library with package name 'android.support.v7.appcompat

A proposed solution for that is to search for the offending file and delete it in windows explorer but there is nothing with that name in my Android studio project folder. I tried removing some .aar files with appcompat in the name but I ended up reverting to the previous 5 facebook errors

This whole thing has been a bit of a nightmare and I have no idea what I am doing. I would love to hear from someone who encountered this error and got past it and was able to build their game again. Surely this must be a common issue for anyone making a commercial mobile game in Unity?


texts: Is GetFixtureA() of b2Contact guaranteed to return the body on which GetContactList() was called?

texts:
For example, in the code below, will the assert ever fail?

for (const b2ContactEdge *contactEdge = playerPhysicsBody->GetContactList(); contactEdge; contactEdge = contactEdge->next) {
    assert(contactEdge->contact->GetFixtureA()->GetBody() == playerPhysicsBody);
}

I wasn't able to determine this from the source code. From some brief debugging, it seems to be the case, but I want to avoid any subtle bugs if this assumption is wrong.

The reason that I want to do this is to find the particular fixture that belongs to the player that was involved in the contact.


texts: Drawing a object with Box2D and HTML5 canvas on current mouse position

texts: I'm attempting to create a air hockey type game with HTML5 canvas and JavaScript, using Box2dWeb for the physics calculation. I need a way to draw the puck at the current mouse x and y position every animation frame with Box2d. I've been researching for quite a while and haven't found a solution yet. I need someone to point me in the right direction.


texts: Entity Component System: where do I put containers?

texts:
I'm pretty new when it comes to the whole Entity Component System structure and I got some questions I just can't wrap my head around.

I know that for example collisions, you'd have a CollisionComponent and a CollisionSystem for handeling collisions. But what if I'd like to use a quadtree for collisions? Where do I put that quadtree? What do I store in that quadtree? Both the PositionComponent and CollisionComponent?

A quadtree is just an example, it could be any abstract container really. If somebody who has more experience with ECS could give me a primer on this, I'd be very grateful.


texts: OpenGL and Java user interface architecture/comunication

texts:
I'm working on the UIs for a turn based tactical rpg made with Java and LWJGL.
I'd like to make a set of "dynamic" UIs similar to those of the game Torchlight 2. I would like to know if there are any good technique (or article) for build UI's architecture and regarding the comunication between UI and game (to handle, for example, events like button clicking).


texts: With Unity and Mecanim, how do I trigger an effect animation?

texts:
We have a Mecanim animation. We'd like to play a particle effect on it at a certain frame in the animation.

Do we need to use an AnimationEvent and have it call a function that triggers the effect? Or is there some editor-only way to do it without script?

We're using Unity 5.3.5.


texts: How to call a method after a yield instruction in the same frame?

texts:
When I run this script...

int frameCount;

void Start()
{
    frameCount = 0;
    StartCoroutine(first());
}

void Update()
{
    frameCount++;
    Debug.Log("Frame " + frameCount);
}

public IEnumerator first()
{
    Method1();
    yield return StartCoroutine(second());
    Method2();
}

public IEnumerator second()
{
    Method3();
    yield return null;
}

void Method1() { Debug.Log("Method1"); }
void Method2() { Debug.Log("Method2"); }
void Method3() { Debug.Log("Method3"); }

I get the following output:

Method1
Method3
Frame 1
Frame 2
Method2

How can I call all three methods in same frame without changing the code structure? The output i want:

Method1
Method3
Method2
Frame1
Frame2

Note: If this is not possible, please show me whether i can get this output (without changing the code structure):

Method1
Method3
Frame1
Method2
Frame2


texts: Constraining an orthographic camera to an isometric world

texts:
I am using Unity3D, and I am building an isometric world by rotating a plane on the Y axis by 4.205 units.

I am using an orthographic camera. I want to constrain the camera so that the viewport never shows the area outside of the world (in green).

How can I calculate the corner points of my rotated plane in screen coordinates, represented by green?
How do I stop the camera from scrolling to prevent it from showing the area outside the world, represented by gray?


texts:
My player have a line of sight and all objects between the white lines, turns red.
To compute this, the following conditions are met: if the angle between the yellow line and the red line are small or equal to the angle between the yellow line and the white line above, then the object is considered to be inside the line of sight. It also works if the object are below the white line. Here is the code:

def _getTeta(obj_1, obj_2):
    deltaX = (obj_1.centerx - obj_2.right)
    deltaY = (obj_2.top - obj_1.centery)
    return math.acos(deltaX / math.sqrt(deltaX**2 + deltaY**2))

  Obs.: centerx and right are X values and centery and top are Y value; all of them representing values encountered under certain points of each object's rectangle.

Then, I do:

if _getTeta(platform.rect, self.rect) <= _getTeta(abovePoint, self.rect):
    return True

where above point is the point in which forms the white line on the top, and platform is the object to be checked.

However, as the second image shows, it doesn't work if the line of sight are inverted in the X axis. The problem is that I don't know how to set values right so it could also work when the player is looking to the left.

Let me know if I'm not being clear in my question! Thanks!


texts:
Programming in Java.  Tinkering around with physics.  My entities all have position and velocity.  In the main loop, all I'm doing is applying gravity and bouncing off the edges, like so:

    //  add gravity vector
    o.velocity.add(GRAVITY.cpy().mul(dt));

    //  bounce off walls
    if ((o.position.x<0 && o.velocity.x<0) || (o.position.x>WORLD_SIZE_X && o.velocity.x>0))
        o.velocity.x*=-1;

    //  bounce off of ground
    if (o.position.y<=0.0f) {
        o.position.y=0.0f;
        if (o.velocity.y<0)
            o.velocity.y *= -1;
    }

The x and y values of my vectors are just floats.

For the first second it looks like it's working fine, but the vertical velocities slowly decay.  Any idea why?


texts:
I have a small .PNG file. I load it with:

  picSmiley = love.graphics.newImage("salamander.png");

and I draw it with:

love.graphics.draw(picSmiley, objects.ball.body:getX(),
        objects.ball.body:getY(), math.rad(rotation), 1, 1, 40 / 2, 22 / 2);

Nothing else should influence it. The background color should not matter, as the image has an alpha channel. Despite being red, however, my image draws with a murky green color.

Only the color is wrong. How do I fix it?

Wrong (the salamander is on the grey block):


texts:
I currently have an editor that creates shapes out of (X, Y) coordinates and then triangulate that to make up a shape of those points.

What will I have to do to rotate all of those points simultaneously? Say I click the screen in my editor, it locates the point where I've clicked and if I move the mouse up or down from that point it calculates rotation on X and Y axis depending on new position relevant to first position, say I move up 10 on the Y axis it rotates that way and the same way for X. Or simply, somehow to enter rotation degree: 90, 180, 270, 360, for example.

I use VertexPositionColor at the moment.

What are the best algorithms or methods that I can look at to rotate multiple points in 2D at once?

Also:

Since this is an editor I do now want to rotate it on the Matrix, so if I want to rotate the whole shape 180 degree that's the new "position" of all the points, so that's the new rotation = 0 for example. Later on I probably will use World Matrix rotation for this, but not now.


texts: How do I stop gyroscope-controlled camera from jittering when holding phone still?

texts:
I have here a simplified version of my gyro-controlled camera with a sensitivity modification (a side effect of increasing sensitivity is that the jitteriness is exacerbated).
public class GyroControl : MonoBehaviour{

private Transform _rawGyroRotation;
Vector3 gyroAdjust;
[SerializeField] private float _smoothing = 0.1f;

void Start()
{
    Input.gyro.enabled = true;
    Application.targetFrameRate = 60;

    _rawGyroRotation = new GameObject("GyroRaw").transform;
    _rawGyroRotation.position = transform.position;
    _rawGyroRotation.rotation = transform.rotation;

}

private void Update()
{
    _rawGyroRotation.rotation = Input.gyro.attitude;

    gyroAdjust = _rawGyroRotation.rotation.eulerAngles * 2; //increase rotation sensitivity
    transform.rotation = Quaternion.Euler(gyroAdjust);

    transform.rotation = Quaternion.Slerp(transform.rotation, _rawGyroRotation.rotation, _smoothing);

}}

When in motion, the jittering isn't noticeable. But when you hold the phone still, there's what I assume to be just analogue noise that causes jittering. I would really appreciate any help or advice on how to add a filter or something to reduce the jittering for this kind of controller.
Thanks.


texts: I am currently working on a shooter and I could use some help with this. I want to make my character knock back when he shoots, but also the knock back should be different when the player uses a different weapon. How can I do this?


texts: Is it OK to use player supplied music in my game?

texts: Is it copyright infringement if I create a game based around music beats but allow the players to use their own mp3 files?


texts: How to implement a starwar energy shield in game

texts:
I am using Ogre3D.

How can I implement an energy shield like this image?

In the picture, the shield is a semi-sphere, where I want to make it a sphere surround my object. The shield should be transparent (this should be adjustable). Can the community advise how to do this?  Thanks.


texts: Is there a general name to refer to a script attached to a particular gameobject in Unity?

texts:
I am making use of OnTriggerEnter(Collider other), is there a way to get access to the script attached to my other gameobject without explicitly writing the name of the script?
my code is:

void OnTriggerEnter()
{
  other.attachedRigidBody.GetComponent<xyz>();
}

xyz is the name of the script attached to other, but I don't want to write xyz, but rather want to find a way to make my other gameobject implicitly look for whatever script is attached to it.


texts: Handling movement using an Entity Component-based System Architecture

texts:
I have seen various descriptions of how to handle movement in a component-based entity framework.  The most common I've stumbled across is the idea of using components called Controller, Physics, Transform, Velocity, and Collider.

The idea here is that the Controller influences the Velocity component when movement keystrokes are detected.  The Velocity component in turn influences Physics.  Once the simulation has been stepped, the Collider is either affected if a collision occured or is not if no collision happened.  In the end, the Transform is updated with the new position from the physics simulation step and thusly the Renderable needs to be adjusted so it is drawn in the proper location.

I have often read that one needs to consider both physics-driven and non-physics-driven entities.  As outlined in the above paragraph, manipulating physics-driven entities seems like a piece of cake.  The difference with non-physics-driven entities is that the Velocity component values need to simply be applied to the the Transform based on delta-time.  This would allow moving the entity without being concerned with physics nor collision detection.

For physics-driven entities, one simply iterates entities with both Velocity and Physics components.  But for non-physics-driven entities, simply iterating over entities with a Velocity component isn't sufficient as it would include the above subset as well.

So there must be some factor that clearly separates these two cases.  So with these two cases in mind, how would movement actions that influence the values of Velocity be carried out in such a system to manipulate both types of entities whether physics plays a roll in their movement or not??

And lastly, considering that there may be times where the transform for an entity needs to be manipulated directly, such as player clicking on a portal to be teleported to another x/y/z position, how would one properly propagate this change to adjust both the physics step simultation and the renderable's draw location?

EDIT:
@bobenko
Your explanations provide insight to the most common case where objects are simulated via physics but I'm somewhat lost on the Kinematic aspect regarding updating an entities position via a velocity value?  Are you simply implying that some code of my own will apply movement to the entity via velocity, thus being Kinematic? I still am interested in your explanation on how to avoid cyclic notifications effectively when aspects of these components involved change.

For all who answered, I'm still not clear how would you handle teleporting an entity from one position to another?  Would this involve turning off physics, teleporting the player, then turning physics on after teleport finished?  Turning physics on/off can be as simply as setting the entity as Kinematic YES/NO, right?


texts:
So I've been fiddling around with the new UI system recently -- and one problem I have is adding images of my sprites to the ui.

I know I can create a prefab of an image gameobject with the sprite I want, but I have hundreds of the sprites I want to add to the ui (They're different characters) so I don't want to create hundreds of prefabs. Instead, what I want to do is in a script, create an image gameobject, set its sprite, and child it to a parent panel in my canvas. Is this possible?


texts:
I have a boss with machine gun and i am trying to make him shoot for 5 seconds and then stop for 5 seconds and so on. I tried to create an IEnumerator and call it on Start (as far as i know i can not call it from update) but its not the behaviour i want as i always want him to start shooting when he spots the player. Any help is appreciated.

IEnumerator MachineGunShootTimer()
{
    while(true)
    {
        machineGunOnCooldown = false;
        yield return new WaitForSeconds(3f);

        machineGunOnCooldown = true;
        yield return new WaitForSeconds(3f);

    }

}


texts:
I've got a best/common practice question about cross platform development. We're developing a Unity game and we've got a custom data format (a modified jpeg) that a C# tool we developed pumps out and gets loaded into unity using a dll. We use some nice gdi+ tricks on Windows with this file format, however when we move this to the Mac, we're running into issues that we think is the mono implementation of gdi+ is missing something.

That aside we're not sure what the best practice moving forward is. Should we develop a new file format that works cross platform and is loaded the same on both systems, or should we use a platform specific data format that allows for the use of the C# tricks on Windows and maybe a different trick on Mac?


texts:
I'm trying to count the number of enemies inside Gizmos. Any enemy goes inside it count it ?

Here is my script:

public int enemy_around_me; // count enemies inside palyer orbit
public float player_orbit = 3;
private GameObject enemy;

// Use this for initialization
void Start () {
            enemy = GameObject.FindWithTag("enemy");

}

// Update is called once per frame
void Update () {

}

 void OnDrawGizmosSelected() {
    Gizmos.color = Color.yellow;
    Gizmos.DrawSphere(transform.position, player_orbit);
}


texts:
So after reading https://www.guerrilla-games.com/read/killzone-shadow-fall-creating-art-tools-for-a-new-generation (a guerilla games presentation on PBR) I noticed the Area lights as opposed to the standard Directional, Point & Spot lights in DirectX can produce very realistic shadows.

Now a lot of the resources online talk about it and what it is but there's not much regarding implementation. Some websites online say that it is just an array of lights but I don't think that's what it is.

Can somebody explain how I can implement this (and maybe with some code). If you could include any links to some good resources regarding implementation that would be great aswell.


texts: How can I build a game in Unity with minimum/no use of the visual editor?

texts:
I'd like to write a game completely in C#. In my search for an engine, I found Unity3D, but all the tutorials and documentation are speaking about a visual editor and the Unity IDE in which you click and point around to create scenes and scripts.

I don't want to do that. I prefer full code coverage over designers abstracting things away from me. I'd like to only write pure C# code from scratch or if required the Unity scripts as an addition. I couldn't find any explanation or documentation about doing so; how can I build a game using Unity and making minimum (or no) use of the visual editor?


texts: Can I use a song from a YouTube remix in my game?

texts: If I found a video with a remake/remix/version of a commercial song (for example, the theme of Super Mario Bros) with a CC BY licence, I can take this video for a commercial purpose like the background music of my game?


texts:
I'm currently trying to simply spawn a circle in Farseer. However, it's stuck wherever I spawn it! The game is updating fine, as I can see the circle spinning in place when I spawn it because of how I currently have gravity set up (following code from Game1.cs):

// Initialise the screen center for use with
// the Level class
screenCenter = new Vector2(graphics.GraphicsDevice.Viewport.Width / 2f, graphics.GraphicsDevice.Viewport.Height / 2f);

 world = new World(new Vector2(20, 20));
 currentLevel = new Level1(screenCenter, circleSprite, groundSprite, ref world);

Level1 constructor:

public Level1(Vector2 screenCenter, Texture2D circleSprite, Texture2D groundSprite, ref World world)
    {
        player = new Player(ref world, screenCenter, circleSprite);
        ground = new Ground(ref world, screenCenter, groundSprite);
        listLevelItems = new List<LevelItem>();
        listLevelItems.Add(player);
        listLevelItems.Add(ground);
    }

Player constructor:

public Player(ref World world, Vector2 screenCenter, Texture2D sprite)
    {
        setSprite(sprite);
        setPosition((screenCenter / MeterInPixels) + new Vector2(0f, 0f));

        playerBody = BodyFactory.CreateCircle(world, 96f / (2f * MeterInPixels), 1f, playerPosition);
        getBody().BodyType = BodyType.Dynamic;

        // Ball bounce and friction
        getBody().Restitution = 0.3f;
        getBody().Friction = 0.5f;
    }

If I use a breakpoint and change the playerBody position while the game is halted, the ball does move, but stays fixed in its new location.

Any help would be greatly appreciated.


texts: How To Resolve Collision Before it Occurs

texts: I have 2 objects, A and B, in a 2 dimensional space. If I know A is trying to move by vector M (that is to add vector M to the positional vector of A), and that A will collide with B after A moves, what math would be used to scale back the M's x and y components such that M will no longer collide, whilst still allowing M to make A slide along B should x or y be cut back? (eg. if A is on the left of B, moves with vector (1f,1f), cant move 1 right, but can move 1 up and does so).


texts: Incorrect click event when resize on libGdx

texts:
I want to use scene2D, in libGDX, to detect click on object.

I have this simple Game sample :

Stage stage;

@Override
public void create()
{
    this.stage = new Stage(1280, 720, true);
    MyActor actor = new MyActor();

    Gdx.input.setInputProcessor(stage);

    actor.setTexture(new TextureRegion(new Texture(Gdx.files.internal("plateau.jpg"))));
    actor.setScale(0.1f);

    stage.addActor(actor);

    actor.addListener(new InputListener()
    {
        @Override
        public boolean touchDown(InputEvent event, float x, float y, int pointer, int button)
        {
            System.out.println("down"+Math.random());
            return true;
        }
    });
}

@Override
public void render()
{
    stage.act();
    stage.draw();
}

MyActor is a simple class extending Actor with a rendertexture.
The Event is working fine at start.
But when resizing the frame, while the Actor is streched as wanted, the coordinates of the click are not updated and thus misplaced.

How to make the stage using the new size of the items as base to the event ?

Thanks.


texts: How do I make a natural-looking map from some Voronoi regions?

texts: I'm using Voronoi regions to create a map for my game, much like this. However, the lines are too straight and perfect. How do I make the borders more natural looking? As in, less like US state borders and more like international borders in Europe or Asia.


texts:
I am making a biome map based off the entities in that area but I'd like to make it hexagonal shape instead of a cube. How would I do this? Or at least a better defining word on what I'm speaking of so I can google it.

EDIT: By hexagonate I mean turn an image that is normally rendered as this:

And here is somewhat what I want it to look like but instead of the noise the biomes.


texts:
The answers to this cross-platform related question are useful, however I want my (C++) game to run on Windows and Linux (and be packaged for Ubuntu) only. I'm not interested in platforms like mobile or consoles.

Are there any specific tips or suggestions for this case?

Also, if I get the game to work on linux, is it difficult to add support for OSX?

Updating with more information:

It will be a 3D game simulating the motion of spacecraft in the solar system. We will use Ogre3D for the graphics. We're still in the design phase, so there's no code written yet.


texts: Unity: LineRenderer always behind Sprite

texts:
So I'm not sure what I'm missing here -- I created a bullet gameobject with a linerenderer (no sprite renderer) -- and it always renders behind my other sprites, regardless of what I set the z transform to. If I add a sprite renderer component to the bullet, regardless of the sorting layer, the bullet renders behind every sprite. Why is this happening, and how do I fix it? I believe it's due to my material used in the linerenderer -- I have the shader set to particles additive but when I change it to bumped diffuse it renders in front properly (but I want the visual effect to be additive).

I tried setting the sorting layer via script, and I can confirm that the sorting layer is set correctly but the linerender still doesn't render in front of the sprite.


texts: What type of dashboard should I create to understand how my game is performing?

texts:
This is a two part question. Let's say I release a new Flash game to the web. Once players start playing I want to understand how it is performing:

What common performance criteria do people track? (e.g. viral coefficient, play length, returning players.)
How should I go about measuring and monitoring these attributes? Are there any off the shelf tools?


texts: How to write AI bots that can autoplay a shoot 'em up game?

texts:
In a shoot 'em up game I want to have AI bots that can take up the player's slot and play the game (such as in this video). However they should come with different flavors (varying competency and playstyles). The problem is the related maths and AI programming are very new to me. Where should I start?

Suggestions for existing sample code/libraries/tools, reading materials or advice on architecture/algorithms are all welcome. Thanks in advance!


texts: What are some known 2D/3D physics engines for XNA?

texts:
I'm looking for a physics engine to use in an XNA project (2D or 3D). Because it's for XNA, it needs to fulfill some requirements:

Not necessarily free, but close to it is obviously preferred
Managed code only (or it won't run on the 360)

For 3D I know of
- BulletX (It works, and I'm using it now, but it's not active and could use more work)

For 2D I know of
- Farseer


texts:
I am trying to make a 3D game with C++, SDL, and OpenGL.

My program roughly looks like this:

control function has only CPU operations.

draw function has CPU and OpenGL functions operations.

I just randomly pick numbers.

How can I use GPU when program at control function?

Or I need to use? Do game engines use at every time? For example Unity, or Unreal Engine.


texts: Publish to folder equivalent for a desktop GL project with visual studio Mac 2019

texts:
I'm not home so the only computer I have access to is a Macbook, and now I would like to see how I could pack up projects to export for various platforms. But when I build my project it only produce a windows executable. Since the project is DesktopGL I can execute it via the command
mono-sgen64 DesktopGL.exe

but this requires to include as redistributable the mono runtime. can't I publish the project in order to target Mac OS specific output and then get a fully packed .app executable like I can with the publish to folder thingy on windows?
I'll appreciate any help and really thank you for your attention.
Also if I could have access to linux executables I would be highly thankful.
Here is a recap of what I've found already:

the publish to folder is only available for Mac with a .asp.net or core console project
https://docs.microsoft.com/en-us/visualstudio/mac/publish-folder?view=vsmac-2019
We can use appify.sh script but I don't know how it would read the content files etc. and this won't be compatible with linux
I've allready used this script to create a packed php executable but I never included ressources
https://mathiasbynens.be/notes/shell-script-mac-apps
as I mentioned earlier I can execute the game properly using the mono executable so if I go that way I could create a run.sh script but this won't be the thing I'm looking into
i figured it by looking where was located the actual executable of the game once I've run the project
I've also found this nugget package which seems to add publishing parameters but I don't know if I can trust it
https://www.nuget.org/packages/InfinitespaceStudios.MonoGame.Packaging/0.1.4-alpha


texts: Create quad from texture and screen metrics

texts:
If I have a texture with known metrics (pixel size, byte type) and a GL surface to render to of a know density and measures, and I want to draw a quad composed of two triangles that correspond to the size of the texture in proportion to the size of the surface. For that I need to recalculate the needed quad's vertexes. Can someone explain me the math involved in this process?

Example: I have a screen/surface of 800x600 and a texture of 100x20 that I want to position in (20, 20). How do I calculate the vertex of the quad needed for it.

My shaders are simple

v

attribute vec2 a_texcoord;
attribute vec2 a_position;
varying vec2 v_texcoord;
void main() {
   gl_Position = vec4(a_position, 0.0, 1.0);
   v_texcoord = a_texcoord;
};

f

precision mediump float;
uniform sampler2D u_texture;
varying vec2 v_texcoord;
void main() {
    gl_FragColor = texture2D(u_texture, v_texcoord);
};

And the VAs even simpler

float squareCoords[] = {
     -1.0f,  1.0f, 0.0f,
     -1.0f, -1.0f, 0.0f,
      1.0f, -1.0f, 0.0f,
      1.0f,  1.0f, 0.0f
};

char drawOrder[] = {
      0, 1, 2, 0, 2, 3
};

float textureCoords[] = {
      0.0f, 1.0f,
      0.0f, 0.0f,
      1.0f, 0.0f,
      1.0f, 1.0f
};


texts: Just letting you guys know before anything I'm a beginner at programming. I am just wondering how I should go about calculating the fps using GLFW?


texts:
If I have two objects, Person A and Person B, and I want to know if Person B is facing the same direction as Person A; once I have the vectors, how do I use the normalized vector to show direction?

I've read the math on vectors, but I'm still learning, and I am not understanding how the unit vector shows direction.  I know it does, but I don't know why.

One person said they imagine it on the unit circle. I understand how that can show a direction, but what I don't understand is how the normalized vector shows me a direction.

I have seen "What is a direction vector and why should it be normalized?", but I am still missing it.


texts: A way to make camera get distance from the player when the player gains velocity?

texts:
I'm building upon roll a ball example and I'm trying to make the camera gain distance from the player, when the player starts moving (gaining velocity). i came up with this, but it feels clunky and the camera jumps.
is there a better way to achieve this?

public float MiddleLineForCameraAdjuster = 2.4f;
float velocityCounter, offsetCounter, normalizedVelX, normalizedVelY, normalizedVelZ;

//Camera Adjuster
private void CameraAdjuster()
{
    if (rb.velocity.x < 0) normalizedVelX = -rb.velocity.x;
    else normalizedVelX = rb.velocity.x;
    if (rb.velocity.y < 0) normalizedVelY = -rb.velocity.y;
    else normalizedVelY = rb.velocity.y;
    if (rb.velocity.z < 0) normalizedVelZ = -rb.velocity.z;
    else normalizedVelZ = rb.velocity.z;

    if (normalizedVelX + normalizedVelY + normalizedVelZ < 25)
    {
        velocityCounter = normalizedVelX + normalizedVelY + normalizedVelZ;
    }
    else if (normalizedVelX + normalizedVelY + normalizedVelZ >= 25)
    {
        velocityCounter = 25;
    }
    else velocityCounter = 0;

    if (normalizedVelX > 0 || normalizedVelY > 0 || normalizedVelZ > 0)
    {
            offsetCounter = 2.4f + (velocityCounter / 10);
            CameraController.offset.x = (CameraController.offset.x * offsetCounter) / MiddleLineForCameraAdjuster;
            CameraController.offset.z = (CameraController.offset.z * offsetCounter) / MiddleLineForCameraAdjuster;
            MiddleLineForCameraAdjuster = offsetCounter;
    }
}

offset = (transform.position - Player.transform.position);


texts: How do you filter entities in an Entitiy Component System?

texts:
I am currently writing my own ECS in C++ and I am using std::bitset.

I register a component at compile time and give it an ID.

Position has ID 1
Direction has ID 2
..

vector<bitset<numberOfComponents>>

And so on. The problem with this approach is the more components I register the bigger my bitset for every entity will get.

If I overshoot my goal a bit and say that I will have 1000 components and 5000 entities.

A std::bitset<1000> is 128 bytes big of my machine and for 5000 entities that is 640kbytes of overhead. To be fair that is actually not that big considering that many machines have 8 gigs of ram.

But I am wondering how you guys are doing it? How do you filter your entities? Are you also using something like a component mask?

Update based on congusbongus answer:

vector<DrawComponent> c1;
vector<MoveComponent> c2;

vector<Entity> draw = {1, 2, 8, 42,128}
vector<Entity> move = {8,128};

I assume that is how you think it works right? Two questions:

1.) How do you make vector<Entity> draw = {1, 2, 8, 42,128} contiguous in memory? If the id is just the index into a vector there will be a lot of "holes".

2.) Because there is no filter, how do you then associate entities together? If you have system System<Draw,Move>, you need the Draw and Move component and because of

vector<Entity> draw = {1, 2, 8, 42,128}
vector<Entity> move = {8,128};

if you just iterate over both of them it doesn't work. because move[0] = 8, and draw[0] = 1.

I mean if you draw something you actually need the draw and move component because u need to draw at a specific position.


texts:
The question came randomly and I think it will really help to know from everyone's experience.

It all started from this article on gamedev.net http://www.gamedev.net/reference/programming/features/x64ErrCol/
and then I saw a couple of more tweets embracing the 64-bit architectures.

So to you what is today's target platform and what important advantages does it have?


texts: Blender - exporting .obj with texture coords

texts: I'm writing a game which uses obj files. I created an object in blender and I applied texture without UV coordinates and my question is: how to export this object to obj file, but with texture coordinates?


texts:
I started working on Wolfire's mathematics tutorials. I got the jumping working well using a step by step system, where you press a button and the cube moves to the next point on the jumping curve.

Then I tried making the jumping happen during a set time period e.g the jump starts and lands within 1.5 seconds. I tried the same system I used for the step by step implementation, but it happens instantly. After some googling I found that Time.deltatime should be used, but I could not figure how. Below is my current jumping code, which makes the jump happen instantly.

 while (transform.position.y > 0)
 {
   modifiedJumperVelocity -= jumperDrag;
   transform.position += new Vector3(modifiedJumperVelocity.x, modifiedJumperVelocity.y, 0);
 }

Where modifiedJumperVelocity is starting vector minus the jumper drag. JumperDrag is the value that is substracted from the modifiedJumperVelocity during each step of the jump. Below is an image of the jumping curve:


texts: Why are my brushes see-through in Hammer/CS:GO?

texts:
I'm making a map for Counter Strike: Global Offensive, but I am having this issue with a part of the map. One of my brushes is weird and see-through in game.
I have no clue what is causing it or how I can fix it. Does anyone know what's going on, and how I could fix it?


texts: Handling non-automatable, repetitive, game tasks

texts:
A problem I'm currently having with a project of mine is deciding how to handle repetitive, but important, in-game tasks.

As an example (Though there will be many other instances of this), earlier in the game, the player must smelt and shape iron without modern tools.
After iron ore has been smelted, it must be shaped into tools, this requires manual labor.

So how are some ways I could handle the shaping process (A repetitive, time consuming, task)?

Having the player sit in a GUI until the shaping process is complete is obviously not a great idea.

I don't want to make the process instant and simply rely on the speed of the smelting process to cull production, as the player could just utilize a huge number of furnaces to bypass that.

For other reasons, it would be incredibly difficult and time consuming to create a short mini-game for each of these situations.

Is there an easy way to solve this?


texts:
i do my first game and already read alot about design strategie, programming style, design .. and so on
theoretically it works perfect but in practice i dont know if i do thinks "right"

i have three classes my main which starts the view
in this i do all my stuff -currently-

it holds an state variable, it has an onDraw method .. and so on

the third class is the game-thread while my game is running, in here are decisions -depending on my current state- what should be done

@Override
public void run() {
    Canvas canvas = null;
    mStartTime = System.currentTimeMillis();
    while (mRun) {
        canvas = mHolder.lockCanvas();
        if (canvas != null) {

            // State Updating State means to manage state transitions, such as a game over, character select or next level.

            switch( mPanel.getModeState() ){
                case Surface.MODE_LOGO_SPLASH :
                break;

                case Surface.MODE_MENU :
                    // the menu

                break;
                case Surface.MODE_LOADING :
                    // loading animation

                break;
                case Surface.MODE_GAME_PLAYING :
                    // game stuff
                                            // GAME START _ RUNNING _ END

                    // Input
                    // AI
                    // Physics

                    // animation
                    //mPanel.animate(mElapsed);
                break;
            }

            // draw everyThing
            mPanel.doDraw(mElapsed, canvas);
            // sound
            // Sound and Video.
            mElapsed = System.currentTimeMillis() - mStartTime;
            mHolder.unlockCanvasAndPost(canvas);
        }
        mStartTime = System.currentTimeMillis();
    }
}

my problem is .. the function onDraw draws everything .. including the menu ?
this sounds for me like bad code because everytime doDraw is executet, i have to check in this function which state i am currently in .. this cost time, dosent it ?

public void doDraw(long elapsed, Canvas canvas) {
    canvas.drawColor(Color.BLACK);

        // currently just gameLayout
        canvas.drawBitmap(background, 0, 0, mPaint);
    gameLayout.draw(canvas);

}

would it not be better do implement an other thread which draws the menu ?
but if so, how can i overlay the menu afer pause the game ?

:\
thanks for help
erwin


texts: Dealing damage over multiple frames without damaging the same enemy twice

texts:
I am using Physics.Overlap to find which enemies are in my damage range. But dealing damage in only one frame is not what I want. Some attacks should be active for a longer time, to catch enemies who come into range part-way through the attack.

But if I call the method again, I can get the same enemy multiple times. This means my damage will be higher if the framerate is higher. To avoid this I can:

Put a timer on the enemy that prevents damage for some period of time after taking damage. This is the simplest approach but it's bad if you have high speed, multi-hit attacks that damages the enemy multiple times quickly.
Keep track of damaged enemies with a list. As long as the hitbox is active, check every frame for enemies inside the hitbox. For each enemy found, check whether it's already in the list, add it to the list and damage it if not.
Same as #2 but use a dictionary/hashset.

Option #2 is my current approach. Hashsets are supposed to make dupe checks faster BUT I'm not sure how It does that. I use a List<damageable>  to track damaged enemies and Damageable is an interface.

How does a Hashset<Damageable> differentiate between each entry if they are interfaces?

If I use dictionaries instead I'd need to generate different keys for each enemy. That's another problem unless game objects already have some sort of unique hash key. Even then, there's the possibility of ignoring a gameobject with multiple damageable components.

Then there's also the possibility that I'm getting nothing by doing this optimization. Most hitboxes will probably intersect with 3-5 enemies at most over it's lifetime. Would looping over a list be faster anyways?


texts: Unity 2018.4.25f1 Errors - error CS0118 & error CS0234

texts:
I am getting 2 errors in my c# script.

Assets\scripts\playerMovement.cs(8,5): error CS0118: 'PlayerControls' is a namespace but is used like a type
Assets\scripts\playerMovement.cs(4,19): error CS0234: The type or namespace name 'InputSystem' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

playerMovement.cs:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;

public class playerMovement : MonoBehaviour
{
    PlayerControls controls;
    Vector2 move;
    void Awake()
    {
        controls = new PlayerControls();

        controls.Gameplay.move.performed += ctx => move = ctx.ReadValue<Vector2>();
        controls.Gameplay.move.canceled += ctx => move = Vector2.zero;
    }
    void Update()
    {
        Vector2 m = new Vector2(move.x, move.y) * Time.deltaTime;
        transform.Translate(m, Space.World);
    }
}

I am using the new Input System 0.2.1 in unity 2018.4.25f.
The PlayerControls script is auto-generated from an Actions Input object, and it is in the main root "Assets".


texts:
I am trying out UNET ( Unity Multiplayer Service ) and I am building a space invaders like game but with two players at each side of the screen shooting at each other.

I want the local player to always be at the bottom of the screen and see the enemy at the top.

I tried checking isLocalPlayer and isServer and only if both are false -> this means it's the enemy player and change his transform and rotation to be facing downwards and be at the top. But this brings unexpected behavior like spawning the bullets on the original position.


texts: Is unzipping SDL2 necessary to set it up on a Visual Studio project?

texts:
Some tutorials, such as the one on WikiHow.com, suggest to download SDL and use it without unzipping it. The instructions there read as such:

  Download the version for Visual C++. It is SDL2-devel-2.0.9-VC.zip (Visual C++ 32/64-bit).

  In downloading window you have the zip folder SDL2-devel-2.0.9-VC.zip, and inside the folder SDL2-2.0.9. Click it > right click > select Copy.
  Navigate to C:\SDL. Inside SDL, right click > select Paste. Click on name SDL2-2.0.9 and rename to SDL2. Now in folder SDL you have folder SDL2.

I'm wondering if it would be better to unzip the library instead, something that would be instructed like this instead:

  Download the version for Visual C++. It is SDL2-devel-2.0.9-VC.zip (Visual C++ 32/64-bit).

  In downloading window you have the zip folder SDL2-devel-2.0.9-VC.zip, right-click on the zip file and select Extract everything...
  In the window that opened up, type C:\SDL, then click Extract.


texts: DirectoryNotFoundException for an existing file path on Unity startup

texts:
I'm not sure why this error appears in my console when I start up my Unity editor but it is stopping me from running any Unity projects by pressing the play button.

I have tried re-installing Unity, checking out the file at the specified file path destination and searched my local Unity folders for any relevant files that are calling for a file path search.

I want to know which file is responsible for specifying/assigning the file path causing the error.

The error message is pasted below with a screenshot of the Unity editor (with the error message in its console) and a screenshot of the specified file in the file path:

Error message

DirectoryNotFoundException: Could not find a part of the path "F:\Computer Science\Aston University Work\Final Year (for real)\Game Development\Labs\LabSeven\Workspaces\labSeven_Home_Vers\Library\PackageCache\com.unity.analytics@3.2.2\Tests\Editor\Unity.Analytics.StandardEvents\Unity.Analytics.StandardEvents.EditorTests.asmdef"
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) (at :0)
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) (at :0)
(wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize, System.Boolean checkHost) (at :0)
System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize) (at :0)
System.IO.StreamReader..ctor (System.String path, System.Boolean detectEncodingFromByteOrderMarks) (at :0)
System.IO.StreamReader..ctor (System.String path) (at :0)
(wrapper remoting-invoke-with-check) System.IO.StreamReader..ctor(string)
System.IO.File.ReadAllText (System.String path) (at :0)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.LoadCustomScriptAssemblyFromJson (System.String path) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:463)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.SetAllCustomScriptAssemblyJsons (System.String[] paths) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:681)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:SetAllCustomScriptAssemblyJsons(String[])

Screen shots

Many thanks in advance.


texts: What is the best way to store temporary selected characters and their insertion order?

texts:
I'm developing word game, similar to "Word Mole". I'm having a hard time determining how to store temporarily selected characters, which in turn, will changed into a word.

For example, say, I have the following characters:

      0  1  2  3
   0 O  B O S
   1 S  F  R  H
   2 T  N  E  Z
   3 R  B  D  I

I store all this information in a character array named playCharacter, and I also created a character array named markedCharacter, with the default value of ' ' for each element. Every time I select each cell, say cell[1,0], I set markedCharacter[1,0] = 'b' an so on, until I'm done with current word. How do I store the step information? For example, if I choose to play bored, I'll be marking:

markedCharacter[1,0] = 'b'
markedCharacter[2,0] = 'o'
markedCharacter[2,1] = 'r'
markedCharacter[2,2] = 'e'
markedCharacter[2,3] = 'd'

Do I need another array? if so, what data should I store in it?

In turn, I'll want to use this markedCharacter as a way to check

if certain moves are valid (eg, are they marked within an already marked neighbor cell?)
if stored words are valid or not (this part is already covered)
I don't need to do undo operation


texts: Rigidbody Projectile Being Suspended In Mid-Air

texts:
I am experiencing problems with Unity's Rigibody feature. Whenever I try firing a projectile, it gets suspended in mid-air. The projectiles are stored in an object pool. Below is the code and images of the problem:

Images:

Code:

void FixedUpdate (){
//Logic for firing bullets
if (Input.GetMouseButtonDown (0) && firingBullets < 50)
{
    //Bullets are being stored as a pool. If isKinematic of all the bullets is set to false before it is fired from the gun, all the bullets in the pool will scatter
    bulletProjectile [firingBullets].isKinematic = false;

    bulletProjectile [firingBullets].AddForce (bulletProjectile [firingBullets].transform.up * 10000f);

    //Sets the bullet Transform independant of parent object (which is the weapon) upon firing. If it's not set to null, then the bullet will follow the weapon along x-axis (side-to-side).
    transform.Find (bulletProjectile [firingBullets].name).parent = null;

    //Reference to next bullet
    firingBullets++;
}
}

The reason why I change the isKinematic value is because if it is set to false during runtime, then all the bullets inside the weapon will scatter.

The size of the bullets has no effect on this problem. I've enlargened the bullets so that it would be easier to view.


texts: Is it possible to implement Steamworks functionality in a Java game? How?

texts: I have a basic game that I want to eventually turn into something better. The game is all Java as of right now, but I want to implement the Steamworks SDK into my game (so it can have achievements, and the Workshop, and so on). But Steamworks requires C++. Is it possible to have my full Java game implement the Steamworks SDK without rewriting it in C++? I am currently using the jMonkey Engine 3 for my game.


texts: Why does GameMaker Studio not open from a removable drive?

texts:
I downloaded GameMaker Studio 1.4 onto a jump drive so I could use it between two different computers. I downloaded it in a Windows 7 computer, but when I try to use it on a Windows 8 computer, it flashes the updating box, then nothing happens.

I have tried running it in Windows 7 compatibility mode, and I have tried running it as an administrator. Neither works.


texts: What's the difference between using hardware-accelerated APIs and the OS's drawing API?

texts:
On Windows, I can do drawing with the OS API without OpenGL or D3D. The code I am writing will make calls to a device driver and tell the GPU what to do regardless, right?

How is using OpenGL different exactly? Do these libraries have code that will interact with the GPU differently than just the Windows API does?


texts:
I'm not really a 3D person, and I've only used shaders a little in some Three.js examples, and so far I've got an impression that they are only being used for the graphical part of the equation.

Although, the (quite cryptic) Wikipedia article and some other sources lead me to believe that they can be used for more than just graphical effects, ie, to program the GPU (Wikipedia).

So, the GPU is still a processor, right? With a larger and a different instruction set for easier and faster vector manipulation, but still a processor. Can I use shaders to make regular programs (provided I've got access to the video memory, which is probable)?

Edit: regular programs == "Applications", ie create windows/console programs, or at least have some way of drawing things on the screen, maybe even taking user input.


texts: Unity set RectTransform width independent from height

texts: The usual way to set the width or height for a RectTransform is this one as far as I know : RectTransform.sizeDelta = new Vector2(...); . I want to set the width of my object in an EditorScript, so if I would use the mentioned method, I would automatically lock my height value in the editor. But I want to freely adjust my height and at the same time let the width be calculated from my script. So my problem is, that RectTransform.sizeDelta = new Vector2(...); is locking both values in the Editor.


texts: There any way to insert images inside the code (just for comprehesion) in any IDE compatible with Game Engine Unity3D (Monodevelop for example)?

texts: My code has a lot of geometry codes, thinks that shouldn't be represented just by comments I don't know if it exists, but should be fine to insert images like png in the middle of codes explaning that math behind, just in case I forget what any classes/method/lines do in future. Thanks.


texts: Loading an image from Disk to used to replace a source image for an image object

texts:
I am working on a Unity project where I need to be able to grab an image from disk and then have it be replaced as the source image for an image gameobject. Currently I already have a filebrowser implemented that gives me the filepath.

if (File.Exists(output)){
    GameOjbect imageselect = GameObject.Find("ImageSelection");
    imageselect.GetComponent<Image>();
    //I need to make the file location at path output be the sprite?/sourceimage? for imageselect
}

Sorry if this has already been asked, I have been looking at other examples this morning with no luck.


texts: Optimizing graphics for an iOS flash game

texts:
A friend of mine and myself are working on a flash developed iOS (and later Android) puzzle board game. He's a developer and I'm a designer/developer so (no surprise) we have different points of view.

His method: make small tiles (100x100px) in Photoshop join them into the board and then in flash apply effects to the board to avoid repetition (80's not in the good way).
My method: precompose the whole board (960x640px+bleed) in Photoshop and than mask active and inactive areas in flash.

What do you think?


texts: How to play character animation when using A* pathfinding

texts:
Hi I am trying to make racing game. In which I am using mecanim animation system to animate my character. Here are the conditions for the animation to play

Speed --> 1       Run
Speed --> 0-0.5 - walk
Speed --> <-0.10   -walk back

if I set the speed to 1, my character will run i.e

anim.setFloat("Speed",1);

will run my character.

As it is a racegame I need to move the other characters from source to destination. For which I am using A* Pathfinding project of arongberg.
using the above algorithm I am getting the path and I am using simpleMove of character control to move the character. Now the problems comes here

1.As the character needs to play run animation while moving, which is not happening, if I set

anim.setFloat("Speed",1); it is not moving in the direction of path instead it is moving on its own direction

I have tried to apply run animation directly instead of animation controller, but the same Happening.
if I  remove all the animation character reaching to destination without any animation.

Here is the question where I have posted the code, I am asking the same question again but I was stuck with from past4 days.

http://answers.unity3d.com/questions/495397/how-to-make-my-character-move-in-the-direction-of.html


texts:
I am using Unity and coding in C#. I have a game object called Enemy, which has a script called EnemyMotor. EnemyMotor has an int called ID. When EnemyMotor starts, I need to find an ID value that is not been using by any other instance of EnemyMotor.

For example: Enemy one spawns; check if an ID value of 1 is not being used. Enemy two spawns; check if an ID value of 1 is being been use. In this case, it is, so I need to find another ID value that is not being used. In this case, it should be 2. Continue with Enemy three, Enemy four and so on.

How do I go about ensuring a unique ID value?


texts: Shoot projectile same direction weapon faces

texts:
I want to be able to shoot a projectile from a weapon mounted on a vehicle. Right now I am able to do it but only in front of the vehicle. I managed to rotate the weapon to the direction the mouse is facing, but the projectile still goes straight.

I believe that the issue is that the velocity of the projectile is the problem here. Right now I have it like this:

if (playerShooting || NPCShooting)
{
    if ((timer >= cooldown) && hasEnergyAvailable())
    {
        timer = 0;
        GameObject intantiatedProjectileContainer = Instantiate(projectileContainer, transform.position, transform.rotation) as GameObject;
        Rigidbody instantiatedProjectile = intantiatedProjectileContainer.GetComponentInChildren<Rigidbody>();

        if (playerController)
        {
            instantiatedProjectile.velocity = transform.TransformDirection(new Vector3(0, 0, speed + transform.root.GetComponent<PlayerController>().getZSpeed()));
        }
    }
}

Where speed is the projectile speed and it's added to the vehicle speed.

I thought that this should shoot forward but with the parent rotation, can someone tell me what I'm missing here?
Thanks!


texts: Can I switch scenes by swipe gesture or drag？

texts:
Can I switch scenes by swipe gesture or drag?

In my game, there are three main scenes, each of them has several layers which have some UI elements, these elements have some tap gesture.

I already know some ways to switch scenes, such as replaceScene, or by some transitions ways, just like CCTransitionMoveInT, so swiping scenes is feasible or not?

If not, why?

If yes, is it possible to cause memory increases that my gameApp crash?


texts:
How is it possible to depth sort tiles and objects in an isometric environments without any limitations? I've been researching this for a while now and there seems to be no publicly available answers to this question.

There are two obvious options for depth-sorting when doing isometric environments:

Draw all tiles from screen top to screen bottom, followed by all objects from screen top to screen bottom
Draw each tile and then each object on that tile from screen top to screen bottom

The limitations with number 1 is that tiles cant have different heights because objects will always appear on top of the tiles. Screenshot example:

The limitations with number 2 is that objects can't move between tiles on the x-axis without the tile below overlapping it (because it's drawn later). I've grabbed a screenshot to exemplify this:

I've read lots on bubble sorting and other algorithms, but none of them seem to take this into account, or if they do, they don't document how.

(Please not before answering, this is NOT about how to sort objects that are larger than 1 tile, I'm more than happy with slicing them up so they fit into a tile)


texts: How to achieve uniform speed of movement on a bezier curve?

texts:
I'm trying to move an image along Bezier curve. This is how I do it:

- (void)startFly
{
 [self runAction:[CCSequence actions:
             [CCBezierBy actionWithDuration:timeFlying bezier:[self getPathWithDirection:currentDirection]],
             [CCCallFuncN actionWithTarget:self selector:@selector(endFly)],
             nil]];

}

My issue is that the image moves not uniformly. In the beginning it's moving slowly and then it accelerates gradually and at the end it's moving really fast. What should I do to get rid of this acceleration?


texts:
I've been trying to find the source of why my render distance is so low (I'm new at using LWJGL and don't know the complete basics yet) and I believe it falls down into this code. My idea for my game (Well, this is more of a practice run to get used to coding 3D games.) is going to be a small island with a size of around 800 which seems extremely low however it is only loading a small portion which I'd estimate to be 600. The code for my MasterRenderer class is below. createProjectionMatrix() is called in the constructor and prepare() is called at the beginning of every render.

private static final float FOV = 70;
private static final float NEAR_PLANE = 0.01f;
private static final float FAR_PLANE = 1000f;

public void prepare() {
    GL11.glEnable(GL11.GL_DEPTH_TEST);
    GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
    GL11.glClearColor(0.49f, 89f, 0.98f, 1);
}

private void createProjectionMatrix() {
    float aspectRatio = (float) Display.getWidth() / (float) Display.getHeight();
    float y_scale = (float) ((1f / Math.tan(Math.toRadians(FOV / 2f))) * aspectRatio);
    float x_scale = y_scale / aspectRatio;
    float frustum_length = (FAR_PLANE - NEAR_PLANE);

    projectionMatrix = new Matrix4f();
    projectionMatrix.m00 = x_scale;
    projectionMatrix.m11 = y_scale;
    projectionMatrix.m22 = -((FAR_PLANE + NEAR_PLANE) / frustum_length);
    projectionMatrix.m23 = -1;
    projectionMatrix.m32 = -((2 * NEAR_PLANE * FAR_PLANE) / frustum_length);
    projectionMatrix.m33 = 0;
}

I've tried altering the FAR_PLANE and NEAR_PLANE with no results other than some minor bugs with changing the NEAR_PLANE to a small number.


texts: Do I need to use the Kinect SDK to develop for Xbox?

texts: I was wondering if I need to use the Kinect SDK from Microsoft to develop games for the Xbox 360. I know there are other libraries such as OpenNI and OpenGL, but can I develop games using Kinect for those? Also where would I get a License to develop for the 360?


texts: Projecting a moon texture to the background

texts:
I want to display a 2d moon image to the background. I have a normalized direction for the center location of my moon texture. I also have the normalized view direction from the camera for each pixel. I'm working in HLSL and I need to find the uv for the texture. How can I do this without the texture being distorted. I tried a variety of spherical uv mapping equations but none of them worked.
This post works but only if d is (0,0,1) in a right handed Y up coordinate system:
How can I calculate the U,V texture coordinates on a disk at infinity given only a view vector and a vector pointing to the disk's center?
It seems like you have to rotate the up righting right vectors with moon's location but how?


texts: Is it possible to have two trigger zones around the same GameObject in unity?

texts: I have created a trigger zone to make sure that only only gameobject passes through it at a time. The moment the gameobject1 entered the trigger zone, it is given a particular tag but I am not how to stop other gameobjects from entering the zone. Is it possible to have two trigger colliders attached to a same object like an outer and inner trigger such that only one gameobject is allowed to pass through the inner one while all other gameobjects wait at the outer one.


texts: Why is my sine based scale animation not changing?

texts:
I followed the code at this YouTube channel: https://www.youtube.com/watch?v=OR0e-1UBEOU&t=4178s, and did some modification on the code so that the scale of the bird will change during projectile using the absolute sine function under the if statement.
I'm using the scale (16/20)*|sin(distance)| for my x and y component. However, when I launch the game, the scale stays as 0 along the path. Why is my scale staying as a constant zero?
using UnityEngine;
using UnityEngine.Assertions.Must;
using UnityEngine.SceneManagement;

public class Bird : MonoBehaviour
{
    Vector3 OldPosition;
    Vector3 DistanceDifference;
    float TotalDistance = 0;
    Vector3 _initialPosition;
    private bool _birdWasLaunched;
    [SerializeField] private float _launchPower = 500;

    void start()
    {
        OldPosition = transform.position;
    }

    private void Awake()
    {
        _initialPosition = transform.position;

    }

    void Update()
    {
        if (_birdWasLaunched && GetComponent<Rigidbody2D>().velocity.magnitude > 0.1)
        {
            DistanceDifference = transform.position - OldPosition;
            TotalDistance += DistanceDifference.magnitude;
            OldPosition = transform.position;
            transform.localScale = new Vector3((16/20)*Mathf.Abs(Mathf.Sin(TotalDistance/5)), (16/20)*Math.Abs(Mathf.Sin(TotalDistance /5)) , Mathf.Sin(TotalDistance /5));
        }

        if (transform.position.y > 15.00 || transform.position.y < -15.00 || transform.position.x > 18 || transform.position.x < -18)
        {
            string currentSceneName = SceneManager.GetActiveScene().name;
            SceneManager.LoadScene(currentSceneName);
        }
    }

    void OnMouseDown()
    {
        GetComponent<SpriteRenderer>().color = Color.red;
    }

    private void OnMouseUp()
    {
        GetComponent<SpriteRenderer>().color = Color.white;
        Vector2 directionToInitialPosition = _initialPosition - transform.position;
        GetComponent<Rigidbody2D>().AddForce(directionToInitialPosition * _launchPower);
        GetComponent<Rigidbody2D>().gravityScale = 1;
        _birdWasLaunched = true;
    }

    private void OnMouseDrag()
    {
        Vector3 newPosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
        transform.position = new Vector3(newPosition.x, newPosition.y);
    }
}


texts: Multiple resolutions for Unity 2D Android game

texts:
I'm trying to target as many devices as possible by providing a consistent experience. So I'm trying to make sure the aspect ratio fits each device it's played on.

After reading some forums and tutorials related to this topic I found that to create a game which runs without creating any black bars on the sides, I have to use multiple resolutions. So my question is how to use multiple resolutions in Unity 2D?


texts: How to make a custom 3d view cone that mixes orthographic and perspective cameras

texts:
I'm trying to make a camera that displays objects the same height no matter the distance, but still changes width relative to distance. Similar to having an orthographic view vertically and a perspective view horizontally. From what I've gathered the best way to go about this is to create a custom 3d mesh. Is that correct or is there a more efficient way? Thanks!
Edit:
Here are some images for visual reference.
This is a white cube against a yellow wall at medium distance.

This is the cube up close.

This is the cube further away.

The cube stays the same height no matter the distance, but its width changes relative to how close the camera is.
I've tried modelling what the view cone would look like for this FOV/perspective based on the form of the perspective and orthographic view cones in unity. As can be seen the height of the view cone is static, but the width increases with distance.

Does anyone know the best way to create this view system in unity?


texts:
Traditionally, non-unique game mobs and NPCs are of the cookie-cutter type.  Seen one, seen 'em all, and you instantly know their behavior, stats and strong/weak points.  Games however become ever more immersive, and this seems like one of the last hurdles to take in that regard.

A quick search for this shows mods like SetBody for Oblivion which allegedly gives all NPCs random bodies (lore friendly), and I've found some DnD discussions about random character creation tools for DMs, but this is only putting a random look on a predefined character.  With full randomization I mean not only random looks (to an extend of course - no orc looks on elves of course), but also random abilities, random AI level, etc.  I'd even go as far as e.g. random attack style (weapon choice, etc.) and AI.

On the one hand this would make games far more interesting, but on the other hand it might make them a lot harder to play.  Imagine a horde shooter which traditionally would e.g. have 10 basic enemy types, each with their own unique looks, stats and attack style.  In the new set-up, you wouldn't be able to know how they would react to you upfront, nor would you be able to know how to best handle them.  Basically every enemy you encounter would be fresh, and you cannot rely on things anymore like "Oh, that zombie is red - it's an exploding one" or "it's obviously one of the 10 available elf body types - it'll surely attack with this-and-that spell when I get closer than this-or-that distance".  It seems like it could only ever work in more strategic games where you have time to study and handle each NPC and mob individually.

Regardless of whether current gaming platforms are up to it hardware wise, would players actually like and want it due to the above?  Or would it only appeal to a niche of the player base, and is it thus not more common today?  And I think current hardware is up to the task; if not, then it's easy to spend say 30 seconds upfront to pre-render the mobs upfront before a level starts, and just create a strong AI with diverse parameters that can be randomly tweaked per mob to weaken its abilities in a random way (a bit weaker path finding skills, smaller alert distance, etc.).

If anyone has any example of such games: please share; I'd be nice to try it on for size :)


texts: What API is used and not used when DirectX 11 feature level is less than 11_0?

texts:
Currently, I am programming a DX11 engine using feature level 11_0+.  I am wondering if I wanted to extend support for DX10, and DX9, what else would I have to do differently?

If I make the feature level 9_1, what API calls/shader versions would have to be changed?  Would I still be able to use all of DX11 API?  If not, is there a list of API that is used and not used based on feature level?


texts: Triangle accuracy picking for animated models in XNA

texts:
I can do picking with triangle-accuracy for non-animated models, but I also have animated models in my game. How do I do picking on animated models?

I use code based on this project for animation.

My first idea for doing it is:

Calculate ray
For each model
    If model bounding sphere collides with ray
         For each meshPart
              Make animation transformation
              Calculate transformed triangles in meshPart
         Test collisions of ray with resulting triangles

Have you ever considered how to make something like this?


texts:
So a few days back, I started playing around with Krypton XNA for 2D lighting in my game.

I noticed in general, that spawning a light at (0,0) with Krypton causes the light to appear in, pretty much, the centre of the game screen. Is there any way to change this so a Krypton light's "starting point" at [0,0] would spawn at the top left of the screen, and thus follow the standard screen co-ordinates for position?

I ask because currently I'm busy working on my game where my spawn point is [512,512]. With hard code, the closest I've got to the light being "central" to this point is the vector position [12,-20], which makes no sense and is impossible to craft, mathematically, if I want the light to move with the camera (the position [480,512] maps roughly to [10,-20]).

So, is there any way to "normalise" the krypton lights to use standard screen co-ordinates?

If you guys can, play around with the demo from the site and please see if you can find anything out about it. Documentation on the engine is rather scarce, so it's difficult to find anything relevant to my "pixel-perfect" need. It might just also be something in the code with regards to the matrices that I'm not fully understanding.

Any help would be useful.

Thanks.


texts:
When optimizing the frame rate of a game, when should I focus on a large
FPS and when should I focus on a consistent frame rate.

This is often a hotly contested issue, so please note I'm not asking which
is better.

What are the pros and cons of each?
In which situations is one preferred over the other?

Also note: my input polling/processing, physics, and game update rates are
independent of my frame rate.  The only thing the FPS affects is how often a
screen is rendered.


texts: How to create a fog effect in XNA with PixelShaderFunction?

texts:
I developped a small XNA games in 3D.
I would like to add a "fog of war" on my models instantiated with an effect in my (.fx) file.
The problem is, I do not know how to change the function
"PixelShaderFunction".

File [.fx]

Here is the declaration of my variables in my effect file (.fx):

// InstancedModel.fx
//
// Microsoft XNA Community Game Platform
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------

// Camera settings.
float4x4 World;
float4x4 View;
float4x4 Projection;

//Fog settings
float FogNear;
float FogFar;
float4 FogColor;

And my function "PixelShaderFunction" in my effect file (.fx):

// Both techniques share this same pixel shader.
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
{
    return tex2D(Sampler, input.TextureCoordinate) * input.Color;
}


texts: How does an energy-conservative Blinn-Phong-Fresnel model work?

texts:
What is a plausible, basic equation/pseudo-code for energy-conservative Blinn-Phong shading, including Fresnel with a coloured light-source?

The net gives so many alternatives that it's hard to figure out which I should use.


texts:
I have a set of vertices in 3D space, and for each I retain the following information:

Its 3D coordinates (x, y, z).
A list of pointers to some of the other vertices with which it's connected by edges.

Right now, I'm doing perspective projection with the projecting plane being XY and the eye placed somewhere at (0, 0, d), with d < 0. By doing Z-Buffering, I need to find the depth of the point of a polygon (they're all planar) which corresponds to a certain pixel on the screen so I can hide the surfaces that are not visible. My questions are the following:

How do I determine to which polygon does a pixel belong to so I could use the formula of the plane which contains the polygon to find the Z-coordinate?
Are my data structures correct? Do I need to store something else entirely in order for this to work?

I'm just projecting the vertices onto the projection plane and joining them with lines based on the pointer lists.


texts:
I am making a game in JavaScript and rendering it to a WebGL canvas.

To give the game some extra spice, I'd like to create filters (or perhaps they're called "Shaders?") to apply directly onto the game's WebGL canvas. More specifically, I'd like to be able to modify the game's brightness, hue, saturation, and give it a bulge effect.

I am totally new to WebGL and would love some guidance!


texts: how do i make an object in gamemaker only overlap on one side?

texts:
I am making a small flash game in game maker 8.0 pro and I need some help. In my game, the character is in an office with cubicles. I need my character to be able to walk behind and in front of the cubicles with the correct overlapping for each scenario. Here are some pics. As you can see walking up to the wall from the back looks fine but it over laps the same way walking up to the wall from the wall from the front which is a problem. If anyone could help me with this problem that'd be great. Thanks]1

edit: i resolved my issue. It turns out you can use any objects position on the y axis to set its depth with: depth=-y
you might have to adjust it slightly to account for collision masks like this:
depth=-y-32


texts: If player leaves a rectangle take him back to his previous position

texts:
Okay, I'm making a game. The map contains all the blocks/buildings/structures etc... The map is bordered by a rectangle.

So what I want is if the player attempts to exit the rectangle he goes back to where he was. This way he cannot leave the map.

My attempt's output (right side), this one is perfect:

But the left side is not perfect:

My code:

public class Player extends GameObject{

BufferedImageLoader loader;
Texture tex = Game.getInstance();
BufferedImage image;
Animation playerWalkLeft;
private HealthBarManager healthBar;
private String username;
private int width;
private ManaBarManager manaBar;

public Player(float x, float y, ObjectID ID) {
    super(x, y, ID, null);
    loader = new BufferedImageLoader();
    playerWalkLeft = new Animation(5,tex.player[10],tex.player[11],tex.player[12],tex.player[13],tex.player[14],tex.player[15],tex.player[17],tex.player[18]);

}

public void tick(LinkedList<GameObject> object) {

    setX(getX()+velX);
    setY(getY()+velY);

    playerWalkLeft.runAnimation();

}

public void render(Graphics g) {

    g.setColor(Color.BLACK);

    FontMetrics fm = g.getFontMetrics(g.getFont());

    if(username != null) width = fm.stringWidth(username);
    if(username != null){
        g.drawString(username,(int) x-width/2+15,(int) y);
    }

    if(velX != 0){
        playerWalkLeft.drawAnimation(g, (int)x, (int)y);
    }else{
        g.drawImage(tex.player[16], (int)x, (int)y,  null);

    }

    g.setColor(Color.PINK);
    g.drawRect((int)x,(int)y,33,48);
    g.drawRect(0,0,(int)Game.getWalkableBounds().getWidth(), (int)Game.getWalkableBounds().getHeight());

}

@SuppressWarnings("unused")
private Image getCurrentImage() {
    return image;
}

public float getX() {
    return x;
}

public float getY() {
    return y;
}

public void setX(float x) {

    if(isPlayerInsideBoundry(x,y)){
        this.x = x;
    }

}

public void setY(float y) {
    this.y = y;
}

public float getVelX() {
    return velX;
}

public void setHealthBar(HealthBarManager healthBar){
    this.healthBar = healthBar;
}

public HealthBarManager getHealthBar(){
    return healthBar;
}

public float getVelY() {
    return velY;
}

public void setVelX(float velX) {
    this.velX = velX;
}

public void setVelY(float velY) {
    this.velY = velY;
}

public ObjectID getID() {
    return ID;
}

public void setUsername(String playerName) {
    this.username = playerName;

}

public String getUsername(){
    return this.username;

}

public void setManaBar(ManaBarManager manaBar) {
    this.manaBar = manaBar;

}

public ManaBarManager getManaBar(){
    return manaBar;
}

public int getLevel(){
    return 1;
}

public boolean isPlayerInsideBoundry(float x, float y){
    Rectangle boundry = Game.getWalkableBounds();

    if(boundry.contains(x,y)){
        return true;
    }

    return false;
}

public Rectangle getBounds(String boundType){
    if(boundType.equalsIgnoreCase("left")){
        return new Rectangle((int)x,(int)y,33/2,44/2);
    }
    return null;
}

}


texts:
What is a easy way to generate a 3D "hollow" and square grid around a central point, more like a cube (that can vary in size), with each cell being evenly spaced (based on a value)?

Note: I know how to make a 2D grid but not a 3D one.

Edit: I'll try to explain it more: I'm looking for a way to create a grid at every face of a cube (6 faces) at runtime, that lets suppose is 3x3x3m, and each cell being every 1 meter apart from each other. Something like that:


texts:
How do i get a plane to always face an object with the flat/mesh/xy side? I tried sticking in Vector3. forward and up but i always get the plane facing the object on an edge.
    void Update()
{
    planeRotate.transform.LookAt(cube.transform, );
}


texts: In Unity, how do I dynamically manipulate parts of a mesh?

texts:
I'm trying to achieve mesh manipulation of any mesh based on user input (mostly sliders). Here's an example of what I want. I am not sure whether to call this "morphing", as I am trying to change one part of the mesh without modifying the other parts.

How does this work?


texts:
Could someone tell me what this projection is called?

It's as if you are looking at an object from directly above it and then smear it up and left equally. Only the one dimension seems to be true scale while the other two are skewed.

I'm not finding many games that uses this style, but some of the Ultima Series seemed to or at least something similar:


texts: How to add energy ball which disappears when touched by player in UDK?

texts:
I am new to UDK and learning game development. I want to know about how to add a ball to the game world with the following effects/actions:

Glowing effect
Physics-like object (just having gravity)
Particles when touched by player-avatar
Disappears in 1-2 seconds after touch
Score updates based on different colors of ball

I know little about this can be done by kismet, cascade and content creation, but do not know where to start. Please tell me the steps for this. I am trying this weekend in depth.


texts:
I am new to pathfinding but i have read and watched through some articles, blogs and videos about Pathfinding.

Since those that i have read and watched from are mainly for RTS Games, Grid Based Pathfinding.

I couldnt find any tutorials where it explains in details of how you can make your own Node Based Pathfinding System.

So i hope, you guys could give me some insightful information to enlight me or even provide useful links which can help me.

I just want to make a very Basic Node Based Pathfinding system, and from that i hope to work from it to make it into a Pathfinding System suitable for my game.


texts: Can I use the HD Graphics 3000's quad list primitive type via D3D?

texts:
I was studying some technical documentation on the Intel HD Graphics 3000 GPU, which I'm using as a lower-end reference for my 2D game engine. I noticed the hardware supports a nice "Quad List" topology, where every 4 vertices in a vert buffer are interpreted as an independent quad. My engine draws nothing but sprite quads, so that would be a nice optimization in my case, to eliminate the need for copying / caching / processing an accompanying index buffer with 12 bytes per quad of trivial triangle edge definitions (I'm using indexed TriangleList primitives at the moment).

From what I can tell though, DirectX 9 doesn't expose quad list, and after some cursory peeking around in DX10/11 (which I don't plan to support at this point) it seems they don't expose this feature either.

Does anyone know if there's a way to use Quad Lists in DirectX? I'd be curious about OpenGL also, if anyone has experience on that side.


texts: How to Interpolate between two game states?

texts:
What is the best pattern to create a system that all the objects positions to be interpolated between two update states?

The update will always run at the same frequency, but I want to be able to render at any FPS. So the rendering will be as smooth as possible no matter the frames per second, whether its lower, or higher than the update frequency.

I would want to update 1 frame into the future interpolate from the current frame to the future frame. This answer has a link that talks about doing this:

Semi-fixed or Fully-fixed timestep?

Edit: How could I also use the last and current speed in the interpolation? For example with just linear interpolation, it will move at the same speed between positions. I need a way to have it interpolate the position between the two points, but take into consideration the speed at each points for the interpolation. It would be helpful for low rate simulations like particle effects.


texts: What data to exchange in multiplayer real time games?

texts:
I am a hobbyist programmer and right now I am curious about what data is exchanged in a multiplayer session in real time games like starcraft 2. I did a bunch of searches. I found gafferongames.com offering a very good overview of the issues to consider.

Glenn in his article and comments gives a very strong case for using UDP over TCP, but SC2 obviously uses TCP. To qoute Gleen,

  The problem with using TCP for games is that unlike web browsers, or
  email or most other applications, multiplayer games have a real time
  requirement on packet delivery. For many parts of your game, for
  example player input and character positions, it really doesn’t matter
  what happened a second ago, you only care about the most recent data.

So from his statement, I am guessing that his approach is to send the the full game state of every unit on each frame. If the server does not receive a player input on the current frame, then it's just back luck on that player. For God of War: Acension, in which he is lead network dev, this should work quite well I guess.

For SC2, due to it's replay capability, my gut feeling tells me that the underlying engine is a deterministic fixed timestep "user input playback machine", where the only data exchanged is player inputs. Hence Glenn's statement mybe completely irrelevant for SC2. Player input is important, and input sequence is even more important. I don't think it's feasible for SC2 sending game state of 200 units and more at 30 - 60 FPS.

Question: I could be wrong, but I have attempted to identify 2 possible types of data. What are other techniques? Will be good to qoute the game if you will.

EDIT: found this link about starcraft networking model


texts:
I have a prefab of a button (btn) that I need to set parent (_canvos) for it after it spawned (online)...

I have try this code:

public Transform btn;
public Transform mkn;
public Image _canvos;

public void test ()
{
    Transform InTank = Network.Instantiate (btn, mkn.transform.position, Quaternion.identity, 0)as Transform;
    btn.SetParent(_canvos);
}

But it doesn't work.

  error: MissingReferenceException: The object of type 'Object' has been
  destroyed but you are still trying to access it. Your script should
  either check if it is null or you should not destroy the object.
  what's the problem??


texts: Know any 3D game makers that work on chromebooks?

texts:
Ok so I make flash games using a website named scratch.mit.edu, and it used to be a downloadable program in 2013. They have had 3 major updates to the site since 2013. Understand that this site is for people ages 8 and up. It teaches you a type of flash coding with blocks. Like IF, Space key pressed, Wait 20 seconds, then change sprite 2's costume to #3. I'm not sure if any of that is a good enough base for actual coding. There are people, more professional, who have managed to use it too make 3D imaging and animations on the site and it's really amazing but I have no idea how to do that or if I want too based on the amount of lag.

So I have two questions:

One, what is the best way to learn coding without college.
 (preferably free)

Two, are there any 3D game creators that don't need coding experience and can actually work using a Samsung Chromebook?

I know i'm not a professional but I couldn't find the amatuer game developer site, if you could direct me there that would be great.


texts: How do I make a puzzle piece move smoothly between locations?

texts:
I'm building a 2048 clone to sharpen my Libgdx skills, but I don't know how to ease a tiles between board locations. When I slide my finger, the tile moves rather swiftly. How I can make the movement smoother?

This is the code I'm using to make it move to the left:

 for(float t=0;t<getMax(currentTile);t++
 {
  shapeRenderer.begin(ShapeType.Filled);
  shapeRenderer.setColor(230/255.0f, 220/255.0f, 230/255.0f, 1);
  shapeRenderer.rect(q-t, r, a, b);
  shapeRenderer.end();
 }


texts:
I cannot make assimp object loader work with universal app, and I got the same problem as this one: Assimp and directX12 universal apps

I tried the static library approach mentioned in the answer of that question.
In the Properties->Linker->Link Library Dependencies, 'Yes' was selected by default.
I also added the path of assimp.dll to Linker->General->Additional library directory, and added assimp.dll to Linker->Input->Additional Dependency. Yet no help.
I'm not sure if I did correctly to link it statically or it's just because it didn't work.

Or is there any other api can be used just like assimp?


texts:
Have been working on a Poker game, it is network based and instead of launching game instance on server. I have managed everything via www class and on server created PHP API.

Now PHP is taking care of tables and rounds and then updating MySQL DB, and clients (mobile devices) just communicate to PHP over http. There are multiple tables and maximum of 5 players can sit on the table.

I need to implement voice chat between the players of the room, there can be visitors in the room as well. so 5 people are playing but may be 10, 20 people are watching them play.

What are my options on implementing voice messages? I am not using any Photon or UNET or any other server game instance.

Thank you


texts: Format of a *.cso file and location of a root signature

texts:
I'm compiling a raytracing shader into a library and want to concatenate the binary data by a compiled local root signature specified in the same source file (I'm doing this, because it seems like there is no direct option to include local root signatures in a compilation with target profile "lib_6_*"; but please correct me if there is a better option to obtain this).
Now, in order to treat such a binary file in a similar way as any other rasterization shader I would like to know where in the binary data the DXC compiler usually puts the global root signature of, for example, a vertex shader. Surprising enough, I wasn't able to find this information in the docs.
So, can anybody tell me where I can find this information?


texts:
Theres an example of something existing:

I tried to replicate this:

I know that the diameter for that ship's circle is 6 blocks (as u the circle is overlapping the edges of the 6ths blocks, which also counts).

I know that the size of the isometric tile is 64*48.

So I replicated that, and that's the output I get:

You can see a few problems:

The size of the ellipse is not the same, even though I use the provided size information.
Even if the size is the same, the edges does not end at the same locations, as in the provided image.

There's my implementation, I am sure I have done the math wrong, as usual:

                    // The vessel radius (diameter / 2)
                    int radious = vessel.getInfluenceRadius();
                    renderer.begin(ShapeRenderer.ShapeType.Line);
                    renderer.setColor(Color.RED);

                    // Calculate the size of the ellipse
                    int width = radious * GameTile.TILE_WIDTH;
                    int height = radious * GameTile.TILE_HEIGHT;

                    // Draw ellipse, centered around vessel where xx and yy is where the vessel starts drawing
                    renderer.ellipse(xx - width / 2 + vessel.getRegionWidth() / 2, yy - height / 2 + vessel.getRegionHeight() / 2, width, height);
                    renderer.end();

What did I do wrong in the calculation? You can see that the ship in the real preview covers 29 blocks (including the small corners on north/south/west/east, and my preview only covers .. like 13.


texts: Heir Class Constructor Throws CS7036 "No Argument Given" Exception

texts:
I'm trying to create a class that holds the data for an an attack, called Attack. I also have special attacks that have more properties, and so I wanted to create a different class that inherits all of the properties of Attack while adding some more, so I created a class called Special that inherits Attack.

This is what my class structure looks like:

public class Attack
{
    public Attack()
    {

    }

    public class Special : Attack
    {
        public Special()
        {

        }
    }
}

My compiler is okay with this. However, as soon as I try adding arguments to the constructor of the Attack class, for example...

public class Attack
{
    public Attack(float damage, float staminaCost)
    {

    }

    public class Special : Attack
    {
        public Special()
        {

        }
    }
}

My compiler throws an error:

Line 13: There is no argument given that corresponds to the required formal parameter 'damage' of 'Attack.Attack(float, float)'

I don't understand why I'm getting this error. I'm not calling Attack(float damage, float staminaCost), so why is it giving me grief over arguments? I tried un-nesting the classes but it doesn't make a difference. I need the constructor for Attack.Special to take in different arguments. Can someone help me achieve this?


texts: What was the typical toolchain for DOS game development?

texts:
I'm wondering how people used to write DOS games (like Doom), I can't find much on this, but would love to learn more about the earlier days of game development.

What language was used predominantly?

I presume it was C. Or C++ already?

What IDEs (or editors/compilers) were popular?

Microsoft Visual C/C++ (or Microsoft C/C++ as I believe it used to be called) didn't exist back then AFAIK. So what did people use? edit and a command-line compiler from Intel or something?

What APIs where used?

What was common for 2D games? What about 3D games like Doom and Tomb Raider?

Anything else that's different from today?

I'd be happy to hear any other differences, like what image/audio formats were used.


texts: How can I ease the work of getting pixel coordinates from a spritesheet?

texts:
When it comes to spritesheets they're usually easier to use, and they're very efficient memory-wise, but the problem that I'm always having is getting the actual position of a sprite from a sheet. Usually, I have to throw in some aproximated values and modify them several times until I get it right.

My question: is there a tool which can basically show you the coordinates of the mouse relative to the image you have opened? Or is there a simpler method of getting the exact rectangle that the sprite is contained in?


texts: Planar reflections not showing when baked reflection probes enabled

texts: I have a reflection probe that is baked that is set to capture static environment objects like buildings/terrain etc. I also have a planar reflection probe that is following the player camera which is only set to capture the player. I am trying to have both of these displaying on a surface. When I have the baked reflection probe turned on the planar reflection will not show. Are they mutually exclusive? I am using Unity 2020.1.6f1 with HDRP.


texts: How can I create light shafts like Journey's in Unity?

texts:
I'd like to create cartoon looking sun / light shafts that look very close (or identical) to the ones in very well known and loved games like Journey:

and Ori:

How can I accomplish this?


texts:
In my Unity 2D platformer, I'm trying to move the camera down a bit when the character is crouching but not moving. I've done this with the following:

cameraPosition = mainCamera.transform.position.y;
cameraPosition = Mathf.Lerp(cameraPosition, cameraPosition - 0.8f, 3 * Time.deltaTime);
mainCamera.transform.position = new Vector3(mainCamera.transform.position.x, cameraPosition, mainCamera.transform.position.z);

This works, but it's causing the camera's y value to decrease continuously rather than just 0.8f, because cameraPosition is assigned a new value every frame. But cameraPosition has to be relative because its location depends on the player's location, so I can't figure out how else to write it.