The fog from my 3d game looks good in Unity (Desktop) but on Android the fog looks different? Can anyone explain the reason?
PC Unity:
Android:
There are few settings, which you have to check first.
Project Settings/Quality: make sure that your editor quality is same as your Android build.
Project Settings/Player/Other Settings: Color Space and Graphic APIs
According to your android screenshot, you also have color bending issue. And you have different gamma value on displays too.
Oversized scaled cubes/low vertex objects often cause issues on mobile
The solution would be cutting/separate the cube into more small cubes or add even more vertexes to the cube
Here is the thread I found this reference from
I imported an image instead of a 3d model for am enemy, and the game is supposed to be in dark at night but the image is not blending with the rest of the environment so can anyone plz help.
If it is set to sprite it uses an unlit shader that does not respond to lighting. If you have it on a material as the albeto channel on a 3D plane, it will respond to lighting but only as a flat surface. Unless you also have a normal map for it.
So I have been looking for a way to implement SIMPLE 2D lighting into a top-down game I'm creating in MonoGame. I have searched far and wide, and have found few tutorials that help me little, if any. I simply wish to add a black overlay to my level, and then cut out the areas from the texture in which a light source would be. I am foreign to the concept of .FX files and converting them to be compatible with MonoGame. If there is some sort of way to have a "subtraction" blend mode, that would be perfect, if I only knew how to create/use it.
i have a 2d plane that is generated thru script and i need it to have a material on it that will work as a light.
What i am doing is having a side scroll game with a generated 2d torch which is the plane, now the environment color and the skybox are pitch black and my 2d torch needs to light up the background that is 3d so far i have gotten almost desirable effects with a particle additive material however the contrast is weak and will not help if the environment is black.
will i need to develop my own shader as i have never done this before id prefer not to or is there a simple material solution that i can use.
i am using unity3.55 free
A particle system won't light anything up. Your only out-of-the-box solution is a pixel point light.
I am going to make a game like XNA example game "Platformer1" which comes with the XNA. But I need longer levels which doesn't fit in the screen (like Super Mario levels). How can I manage this kind of level? Do I need to use a 2d camera that follows the sprite? If I do this way how can I load the level? I am a bit confused and I am not sure if I could explain my problem clearly. Hope someone can help?
The tutorial based on Platformer Starter Kit in MSDN has a step Adding a Scrolling Level which guides you through creation of longer levels. The tutorial is very detailed, I highly recommend it.
I couldn't find the tutorial in the section for XNA Game Studio 4.0, but differences should be minimal. According to the comment at the bottom of the page, all you need to change is replace
spriteBatch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Immediate, SaveStateMode.None, cameraTransform);
with
spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.Default, RasterizerState.CullCounterClockwise, null, cameraTransform);
in the tutorial code.
If you want to create a side scrolling game, then I would look into parallax scrolling. A quick google/bing will help you find lots of tutorials. Also, another useful tip is to search YouTube for XNA videos has we a lot of posters share their source code .
Here is a link to Microsofts Parallax Scrolling.
Sounds like you have a few problems ahead of you.
But I need longer levels which doest'n fit in the screen(like super mario levels). How can I manage this kind of levels.
There are several ways to do this, but a fairly easy way would be to have a 2d array (or sparse array, depending on how large your levels are) of a class named Tile that stores info about the tile image, animation, ...whatever.
Yes, you'll probably want a "camera". This can be as simple as only drawing a certain range of that array or a more featured camera that uses transforms to zoom out and translate across your level.
Hopefully this will help get you started.
I've done a decent amount of work in XNA, and from my experience, there are 2 ways to draw a 2D scene:
1) Strictly 2D. This method is much easier, but has a few limitations. There is no "camera" per se, what you do is move everything underneath the fixed 2D "camera". I say "camera" in quotes because the camera is fixed (as far as I know). The upside is that it's easy, the downside is that you can't easily zoom in or out or do other camera effects.
2) 2D in 3D. Set up a 3D world with a 2D plane. This is more flexible, but is also more challenging to work with because you will need to set up a 3D world and 3D camera. If this is your first attempt with making a game, I would highly recommend against this method.
I'm really only familiar with the strictly 2D method, and you would want a list of map objects that have a 2D coordinate. You would also want to store which section of the map you are looking at, I do this with a Rectangle or Vector2 that stores this. This value would move forward as the character moves. You can then take your 2D map objects' coordinate and subtract the (X,Y) of the top-left of what you are looking at to determine an object's screen position. So:
float screenX = myMapObject.X - focusPoint.X;
float screenY = myMapObject.Y - focusPoint.Y;
An other thing to note, use floats or Vector2/3 to store locations, you may not think it's required now, but it will be down the line.
It might be overkill, but my SF project uses XNA to draw a Strictly 2D scene that you can move around: http://sourceforge.net/projects/asteroidoutpost/
I hope this helps.
Have a look at Nick Gravelyns tutorials. They helped me tonne when I was first starting out - Really really worth a look for learning a lot on 2D games.
All the videos are now on youtube here