TILED 2D Tilemap is jumpy/jerky in Unity - c#

Using the application Tiled I made a 2D tilemap for a 2D Unity game I am making. The game is very simple, and the map consisted of only some regular tiles, and some with collision detectors. When I import the map into Unity to use for my game with Tiled2Unity, the game loads fine and everything works well, except every now and then the map skips like there is a rendering lag. The jump seems to be independent of the size of the tilemap, does anyone have any idea what the problem could be? I'm happy to answer any questions about the situation.
Here is a picture, you cannot see the problem because it's not a video but here is the situation at least:

Related

Sprites disappear after game is built (unity engine C#) Not an issue of layer they are on

I am currently writing a 2D game in unity and whenever I build the actual game, the sprites all disappear, the player is the only thing that remains.
However, the sprites are still there, just invisible. It's not an issue of order of layer and am having trouble fixing it.
I am using SpriteShapeController.
SpriteShapeController auto shows as it having a sprite so it made me think I had a sprite already
I just made Custom Square Sprites and added them in.

How do I make dynamic 2D collisions faster in unity?

Currently I'm working on a 2D game with destructible terrain in unity. It works great! Except for one thing.... collision generation... Since the terrain is destructible, I have to generate collisions on the go. I tried and it's awful performance. From 1000 fps from editing the terrain to 1 fps when I enable collisions generation. This is a huge issue and I know it's possible within unity because this guy :
https://forum.unity.com/threads/wip-nimbatus.221798/
created it with collisions as well. I tried contacting him but no response yet! Any of you guys have any ides on what I can do? Thanks!
I found a rather annoying but working solution to the issue. So basically what was wrong was I was setting points as vertices. The guy I messaged told me that at the time when he made his game, the 2D engine wasn't a thing in unity so he was forced to use regular 3D components. I didn't want to do this because it would possibly limit what I can do with 2D packages since I am not using the 2D engine. But in the end I decided that unless I could find a extremely fast edge finding algorithm that supported concave meshes WITH holes, I would need to just use the regular Unity3D MeshCollider component. I'm not sure why I was having an issue with the Polygon collider as I thought it would work the same as the MeshCollider but in 2D. I think the issue was I was setting the path of the Polygon Collider as each vertice. This is wrong because I think I would need to set the edge vertices only. (My mesh does not share vertices so I'm not sure how to find the edges) Of course I could re write it to share vertices but I think I will be find with the 3D components (For now at least)

Why is MapBox lagging in Unity VR?

I am trying out the MapBox SDK for Unity.
https://www.mapbox.com/unity/
This provides a 2D map where you can zoom in and out to preview
different levels of detail.This honestly works like a charm.
I am trying to get this 2D map working in Virtual Reality.
The only problem is that it is lagging since the VR camera moves a
lot.
I am using either SteamVR Player or CameraRig.
Does someone know how to improve the MapBox performance for Virtual Reality?
At this point, my unity is just freezing.
I am looking forward for any advice / insight

Create a terrain with Blender for XNA

I have been poking around online about creating height maps for terrain and I really can't get the hang of it, my question is, if I create a terrain model in blender would I be able to use that in XNA, (VS2010) as my terrain?
Are there any drawbacks from doing so?
Xna support .FBX model so you can export your model from blender and use in Xna.
using-blender-models-in-xna
Blender-toXNA
but using a model that used for terrain is not good at all,as you know in each frame game engine render each object in your your camera view so if you have a large terrain it must rendered and it is not good.
so Using a model for the terrain is probably a bad idea unless the terrain is just one big square plane. You're probably going to have better luck building your terrain in code no matter what you intend the terrain to look like.you can split your terrain to small part like 512 unit.
Edited
An example of terrain in xna
A complete guide

Tile based collision in XNA

I have drawn tiles in my XNA game and loaded my character. My character, however, doesn't move- the map does, which gives it the illusion of movement. Now I am wondering how to actually test against them for collision. I mean, where does the collision code go and how do I make all tiles represent 'one big thing'?
There's a tutorial on pixel based collision detection on XNA Creator's club. You'll need to figure out what objects you want to do collision detection on. I guess you want the character to move across the tiled background, so you don't want to check for collision between your character and the background. Instead you should make any obstacle s sprites and do collision detection on those.
You might have a look at Nick Gravelyn's Tile Engine Tutorials, it goes through the whole process of creating a tile engine. There's a link here to see all the tutorials on YouTube.
You could have a look at the Platformer Starter Kit, it shows how to organize tiles in a map and check for collisions.
Rectangles have a intersects method. If your player is centered and you know the coordinates, loop through the other texture2ds and check for an intersection before scrolling the map.

Categories