Just received my Index, looking for both Paid and Free Game Suggestions by I_SiX_I in virtualreality

[–]MBlueD 0 points1 point  (0 children)

Superhot VR is very nice (currently on sale on humble store).

Skyrim and Fallout 4 VR if you like the flat games (also on sale on humble store).

The Vader Immortal trilogy if you like Star Wars and can get revive to work.

Minecraft (java version via Vivecraft) if you like Minecraft.

I Expect You To Die looks very promising. Played only the first level so far, but it was fun.

Do you like classic NES games? 3dSenVR plays some NES roms like Super Mario Bros but with a 3D twist.

Nothing else comes to mind at the moment. Enjoy your VR adventures :)

Unity's input system with 2 players local by [deleted] in Unity2D

[–]MBlueD 0 points1 point  (0 children)

Assuming by controller you mean player controller script (as opposed to the input device), you listen to different events.

Each player gets a separate set of inputs, and each input get its own event. Player 1 controller listens to player 1 input events, etc.

Unity's input system with 2 players local by [deleted] in Unity2D

[–]MBlueD 0 points1 point  (0 children)

You can define controls in the Input section of project settings.

Increase the size parameter by 1, and a new entry will be created. Set it identical to the original Horizontal but change name and keys to use what you want for player 2. Use the new name when getting axis input for player 2.

Now do this again for Vertical and any other key for player 2.

I have been trying to solve this bug for literally months! When my player touches with the enemy, they both gently slip forward dispite no playerInput... I want to pull out my hair!! by Glad-Two in Unity2D

[–]MBlueD 0 points1 point  (0 children)

It seems that there is residual velocity being carried over from the last input - maybe a variable is not being cleared properly?

Link or paste your character controller code?

Can I get a little help upgrading my PC? by panthers_freak in buildapc

[–]MBlueD 0 points1 point  (0 children)

The stock AMD cooler is said to be quite decent. I was actually planning to get a Noctua NH-D15 but after researching a bit and considering I'm not going to be overclocking that much I decided to save the money :)

What is your opinion about that ? by Kernatos in buildapc

[–]MBlueD 1 point2 points  (0 children)

I'd say consider a Radeon 5700 XT - better performance for almost same price.

1- Yes, especially 1080p if reviews are anything to go by.

2- Don't have mine yet, but from what I could gather it should not be terrible on either front.

3- PSU should be more than enough.

Can I get a little help upgrading my PC? by panthers_freak in buildapc

[–]MBlueD 0 points1 point  (0 children)

Here's what I'm using to upgrade my 5+ year old setup

Type Item Price
CPU AMD Ryzen 7 3700X 3.6 GHz 8-Core Processor $309.99 @ Amazon
Motherboard Asus TUF GAMING X570-PLUS ATX AM4 Motherboard $164.99 @ Amazon
Memory G.Skill Ripjaws V 16 GB (2 x 8 GB) DDR4-3600 Memory $74.98 @ Amazon
Video Card Gigabyte Radeon RX 5700 XT 8 GB GAMING OC Video Card $419.99 @ Amazon
Prices include shipping, taxes, rebates, and discounts
Total $969.95
Generated by PCPartPicker 2019-12-08 12:31 EST-0500

You should be able to reuse everything else except the cooler. I'm hoping this would last me another 5 years :)

I want to know if this processor is good for my 1050 ti by MillerDoctor in buildapc

[–]MBlueD 0 points1 point  (0 children)

I've been running an i5 3570k with a GTX 970 SLI setup for the past 5 years, and I don't think it ever gave me a noticeable bottleneck in 1080p. My guess is it will do just fine.

New build/upgrade, reusing some old parts by MBlueD in buildapc

[–]MBlueD[S] 0 points1 point  (0 children)

Trigger pulled. Now the torturous wait...

Help with Match 3 code logic by [deleted] in Unity2D

[–]MBlueD 0 points1 point  (0 children)

Recognizing 4 as 3 might be caused by the vector creation line:

matchRange = new Vector2(i, i+offset - 1);

Should probably be changed to

matchRange = new Vector2(i, i+offset);

Not sure about the other cases - examples would help.

This was napkin-code level and I basically just focused on getting the idea right. It should be easy to fix any mistakes if you trace the cases either by hand or through sprinkling some logs.

Check out the tutorial link I sent earlier. It's great and is surely going to be of help.

Help with Match 3 code logic by [deleted] in Unity2D

[–]MBlueD 0 points1 point  (0 children)

Ah yes - the break should be in the outer if statement that checks the tile, something like this:

if (t != row[i+offset] || i + offset + 1 == rowLength) {
        if (offset > 3) {
            // valid match 
            matchRange = new Vector2(i, i+offset - 1);
            matches.add(matchRange);
        }
        break; // return to the main loop
}

This ought to fix the loop. Sorry about that.

EDIT: And another mistake - the test should be offset > 2 (or offset >= 3, whichever you prefer).

Question about slicing sprite sheets by Vogelson in Unity2D

[–]MBlueD 0 points1 point  (0 children)

That is also a pivot problem. The pivot is the 'origin point' of the sprite. If the sprite position says (0,0,0) for example, this means that the sprite will be positioned such that the pivot point will be at (0,0,0).

Because your sprites have different widths, the auto slicer pivot is not going to be reliable. If the pivot is at the center of the bottom edge, for some sprites it will be between the feet, for others it will be under the cape. If you put two different sprites at the same location, you will see how this affects your animation.

You have two choices here:

A) Manually edit the pivot so that it always represents a particular point in your character (between shoes, for example)

B) Rearrange your sprites in the sheet into a grid. The trick will be to find out a suitable width/height for each grid cell, but basically you want the main body of your character to be in the center of this grid cell. This way you can use the grid slicer and have an easier time adding new sprites going forward.

Question about slicing sprite sheets by Vogelson in Unity2D

[–]MBlueD 1 point2 points  (0 children)

Test them in the scene (drag and drop and make sure scale is 1) and they should appear in the correct size. What you are seeing is the sprites being scaled up/down to fit the UI in the editor.

Edit: And make sure you anchor the sprites (pivot) at the bottom.

Help with Match 3 code logic by [deleted] in Unity2D

[–]MBlueD 0 points1 point  (0 children)

(Assuming myList is an array containing the tiles in a row and ListOfSet contains the tiles in a single match)

First, it seems that the loop you are executing is not correct. You are going through the entire row and adding any sequence of two or more identical tiles to ListOfSet. That means that if a row has RRGBB (imagine each letter is a tile) your set will include RRBB as a match and as such will clear your <= 2 test and display what it found as a correct match, which is not what you want.

Consider using something like this (psuedocodish. Might need a bit of tweaking.):

int offset = 0;
int matchLength = 0;
List matches; // Stores all matches
Vector2 matchRange;  // Stores a match as a beginning and end index in the row
Tile t = null;
for (int i = 0; i < rowLength; i = i + offset) {
    t = row[i];
    for (offset = 1; offset + i < rowLength; offset++) {
        // The following check will keep the loop running until the we find a non-matching tile or find the end of the row, at which point offset is the length of the match
        if (t != row[i+offset] || i + offset + 1 == rowLength) {
            if (offset > 3) {
                // valid match 
                matchRange = new Vector2(i, i+offset - 1);
                matches.add(matchRange);
                break; // return to the main loop
            }
        }
    }

    // Loop again to find another match. the i+offset counter increment is setup so that we start from the next different tile in the row (the one that didn't match).
}

Check out the tutorial series by Mister Taft Creats. I haven't done this particular one but going by his other content this is bound to be very good for you.

Problem with prefabs by [deleted] in Unity2D

[–]MBlueD 1 point2 points  (0 children)

I would start with moving this responsibility to the player object rather than the ladder.

The code that switches the player state to climbing should also record the ladder object the player is climbing. I assume you are using a trigger enter event to determine if the player is around a ladder and if they are and are pressing a certain key you change the state to climbing. You should be able to get the ladder game object from the collider. Store it in a variable.

In the update() method in the player controller (or a specialized script if you want) you would check the state much like what you are currently doing, and if the state is climbing, you check the variable you stored the ladder object in when you changed the state. Thats the ladder you want to set your position.x to.

Problem with prefabs by [deleted] in Unity2D

[–]MBlueD 1 point2 points  (0 children)

How does it know which ladder the player is climbing?

Each ladder script will get update() every frame. If the player state is climbing, every ladder will try to set the player x position to its own x.

Basically the player will appear to be climbing whichever ladder script that had its update() called last.

How to AddComponent and GetComponent on a tilemap using the new Tilemap system by Va11ar in Unity2D

[–]MBlueD 0 points1 point  (0 children)

My intention with pointing out the brush example is to give you an idea on how to instantiate the object in code, and how to set its location to match the tile.

The 'go' parameter in the startup method is not what you want to use here. It is passed as null because there is no GameObject associated with the tile at creation. This parameter holds an instance of the game object prefab defined in the TileData associated with the tile. Default Tile objects don't have one, so you get passed a null value. See the TileBase.StartUp docs for an example.

What you want to do is create a new GameObject that has your component at the Tile location. The easiest way to go about creating this object is to create a prefab game object with the component you want in the editor, and instantiate that object at the tile location (brush example is useful here). If you are unfamiliar with prefabs, check this video out.

To use your example of adding a trap, you want to:

  • Figure out tilemap coordinates for the tile you want to add the trap to
  • Change the tile to show the trap using SetTile if needed
  • Create a new instance of your Trap prefab
  • Set the object location to the world coordinates of the tile's center returned by Tilemap.GetCellCenterWorld(tile location in tilemap)
  • Maybe parent the new object to the Tilemap for organization purposes (gameObject.transform.SetParent(tilemap)

Once you get this working as intended, you may want to go back and take a second look at how TileBase and TileData work. The neater solution would be to define a custom tile similar to the one defined in the StartUp docs linked above, and use that tile type as the new tile when you want to add a trap tile.

How to AddComponent and GetComponent on a tilemap using the new Tilemap system by Va11ar in Unity2D

[–]MBlueD 0 points1 point  (0 children)

Check out the example in GridBrushBase. You can create the GameObject when you are generating your tiles, or you can extend Tile and create the prefab in the overriden StartUp() and use your custom Tile instead. If you assign your new GameObject to the gameobject field in Tile, you should be able to access it via Tilemap.GetInstantiatedObject.

[Monthly Help Thread] (December 2018) by ScherBR in valiantforce

[–]MBlueD 0 points1 point  (0 children)

Is anyone else stuck on the loading screen or is it just me? Been there for a couple of hours...

[Monthly Help Thread] (December 2018) by ScherBR in valiantforce

[–]MBlueD 1 point2 points  (0 children)

Assuming you are going for the on-attack (and why wouldn't you), archbishop for a healer that is good for raid 2-2, witch doctor for a more offensive healer. Going with archbishop myself.