Anyone know why does my Godot viewport and scene looking like these? What should I do to make it right?
Related
So, I have been working in Unity but I've decided it's time to change to something I know better: JavaScript. I've been considering switching to Phaser.js but I have some questions regarding an issue I've been having even in Unity and that I found no solution to at the moment while searching on the internet. I have no code to provide as I haven't yet started actually programming in Phaser, so I'll try to be explicit.
My game idea basically revolves around some lights that change colors. The sprites I have for the lights look identical, but just with different colors, but not entirely (only parts of them are colored differently). The problem is that my game has many different colored lights and it has to change between them. Like, if one light is red and you click on it, it becomes green, for example. Creating and loading so many sprites that look almost the same seems like a bad practice, and I wonder if there is a way to change the color of a sprite or a part of the sprite by code. I know that Phaser doesn't support svg and that svg in games is a bad idea in general because of performance issues but it would have saved me a lot of time to just add the generated svg code of the sprites I use and just change the fill of the parts I want.
So, my question is: what are the best alternatives (if any) to using multiple sprites or how can you change the color of specific parts of them?
Another alternative, depending upon your light sprites, is to use Phaser's tinting capabilities.
Both sprites and images in Phaser can be tinted, and since Phaser supports sprite grouping, even if you wanted to change only a part of the image you could easily have each displayed object consist of two sprites, one of which is the same for all lights (the part that doesn't change) and another that is also shared, but tinted.
Phaser 3 example of tinting an image:
this.add.image(300, 300, 'pixel').setTint(0xff0000);
Phaser 3's setTint() documentation.
Phaser 2 CE example of tinting a sprite, in case you're looking at using this version:
sprite = game.add.sprite(game.world.centerX, game.world.centerY, 'atlas', 'greenJellyfish0000');
sprite.tint = Math.random() * 0xffffff;
If the lights don’t have to move, then you can just have a few images and change their src’s. Alternatively, I believe you could have it so that when the sprite is clicked it changes to a different looking animation. That is, after all, the point of a spritesheet, isn’t it?
To be quite specific in what I'm wanting to do...
I have a scrollable map on a canvas. I have zoom in/out capabilities. I want to place a cross hair/bullseye on top of the map so I know where I am going to be zooming in/out with high accuracy. I realize I could be more flexible and do it by locating the mouse pointer position and just have it zoom in/out based on where the mouse is at but I think given the magnitude of the project and the way it keeps evolving I better plan otherwise.
I'm thinking I would have to have two canvases on the screen to pull off what I'm wanting to do. That shouldn't be a problem. The problem...is it possible to make the top canvas trans????, is that parent or lucent...aka see-thru(I can never remember which is which, LOL:)) while still being able to see the cross hairs placed on the center of the top canvas. I don't think it could be done with only one canvas but I might be wrong.
Yes, this is a bit of a tricky question.
No, it is not possible to have a transparent canvas.
If all you need is a crosshair, just draw one on the canvas. You can hide it temporarily while you zoom so that it doesn't get zoomed along with everything else.
I'm working on a Sprite Scaling pickup for a 2D Platformer assignment, and have most of it worked out.
I am running into a few issues however.
When scaling the Capsule Component (It being the Parent object), when walking up to a sprite on the TileMap, the map disappears until you move away again.
I am not sure entirely why. The player is not falling off the map, and it will reappear again if you move to the side a little, but when the player is small and is colliding with the TileMap, it disappears.
Player Resize Code:
GIF of the described Issue:
https://gyazo.com/e23d24cfc9af406c2808bcf73ea5dad4
Any help is appreciated guys!
This question has been resolved.
Turns out that this is an engine issue with Unreal Engine using the TileMap. The TileMap is currently experimental and does not correctly handle rendering tiles when the Capsule Component is Scaled.
This bug has been reported to Epic Games and is awaiting a hotfix in the upcoming patches.
I'm creating a procedural terrain in unity with hexagons. When the camera is fairly close the textures and colours work perfectly fine but... as soon as I zoom out I get this.
Map view from an angle:
As you can see I get these weird dots that become more exagerated the further I zoom...
When I'm up close I don't get this and the hexes blend very well toghether.
The textures blend very nicely when it's close and you can't see any boundaries. But as you go further out, some dots start appearing and even further so the colours get completly distorted.
Does anyone know what's causing it and how it could be fixed? I'm sorry, I'm really new to unity and this is my first unity project
Also, I presume this wouldn't be due to the texture bleding at boundaries because when I set the colour of the hexagons to be the same, I still get that effect.
(for example the sea in the pic below)
Same Colour hexes still show the problem
And when it gets further out, the problem pops up
Any help would be greatly appreciated! :)
Hmm, these might be artifacts caused by mipmapping (lower texture resolution as you zoom out). Try disabling mipmaps in your textures. It will negatively affect your game's performance but it might fix the problem.
I made a game in unity3d, Its graphics looking perfect in unity engine. but when i built it and played in web-player its graphics become pixelated and blurry.
So how can i make it pixel perfect game for web-player?
This also happened to me once. But i got the answer after some searching on unity.
this is what you need to do.
Select the texture which becomes pixelated.
-From import settings
Texture type=texture
Filter mode=Trilinear
Slect web as a platform and check yes on override for web
Max size=max
Format=truecolor
and click apply this should and definetly help me.
Source
Try to change you image size in photoshop i think you save it in small size.
And always make you graphics in vector so it become pixel free and you always have achance to make a new image from vector.