Questions tagged [pixel]

A physical point in an image or the smallest addressable element in a display device.

Filter by
Sorted by
Tagged with
0
votes
1answer
25 views

Palette Swapping in Allegro 5

I am trying to do a palette swap in Allegro 5. I have not found any way to do this from my research. So what I've thought of doing is to do it myself by setting individual pixels. I also haven't found ...
0
votes
2answers
593 views

How can i properly display 2D Pixel sprite's pixels without distortion while it's moving ? (in unity)

Introduction to what i'm trying to do Hi, I'm trying to make a 2D Pixel Platformer Game in Unity. Before that i used godot and for some reasons (not about the engine) i switched to unity. And in ...
0
votes
0answers
36 views

Unity Pixel Perfect Camera - Adjusting the Viewport Rect?

I am trying to make a pixel perfect Tetris style game. I have the pixel perfect component attached and have tried playing with settings such as Crop Frame and Stretch Fill. It seems to override any ...
0
votes
0answers
77 views

Drawing pixels with SDL2 advice, is it fine to draw them one by one on the CPU?

I want to make a raycaster and I figured out how to open a window and draw pixels to it with SDL2, but the way I am doing it now just doesn't seem very efficient, I figured out how to do it from ...
5
votes
1answer
2k views

SDL render surface from byte array efficiently

In my current project I need to fill a 256x224 screen with the pixel values from an array. The array is declared this way: uint8_t *vram = new uint8_t[7168]; So as ...
0
votes
0answers
42 views

Unity UI subpixel rendering/antialiasing with Image.fillAmount?

I'm using DoTween to tween the fillAmount of a UI Image. When I check the value, it changes smoothly, and in the scene view it appears to transition smooth. However it appears jerky in the game view, ...
0
votes
0answers
25 views

Changing Pixels Per Unit [duplicate]

First off, excuse my ignorance. I am just getting started in game dev. and ran into a little issue. So I had these weird rippling-lines going across my screen, and saw in a couple forums that this ...
0
votes
0answers
507 views

Unity, Pixel Perfect and Scaling

I am totally stuck on with pixel perfectness of the game. I have tried a few pixel perfect camera -assets, but they have lots of issues considering scalability. is it normal that these cameras zoom in ...
2
votes
1answer
113 views

How to render a grid of dots being exactly 1x1 pixel wide using a shader?

I would like to render a grid with many dots, all equally spaced and being exactly 1 pixel wide. What I was able to achieve so far is this : What I would like is (simulated using image editing ...
0
votes
0answers
22 views

How big my sprites should be in Unity? [duplicate]

I'm making a 2D retro-style pixel game and I'd like to know how big my sprites should be. I'm not talking about the size of my image files (which I decided to use a 32x32-based artstyle), but the ...
0
votes
0answers
53 views

Creating a border on a tile?

I'm using Godot and I want to set an outline on the tile which is currently being hovered over, but I'm not sure whether to do it as a seperate tilemap which is hidden until it is hovered over or just ...
1
vote
0answers
113 views

After a postprocess effect, can I output a list of all non-zero pixel locations without having to save the entire image?

I am trying to simulate what's known as an 'event camera' in Unreal. Unlike conventional cameras that output full frames, event cameras return the locations of pixels where activity is detected - see ...
2
votes
1answer
537 views

2D isometric pixel art technique

I recently started to work on a project which consists in developing a game similar to the Urbz on Gameboy Advance (the Handheld version of the game developed by Griptonite Games). This is mainly a ...
0
votes
0answers
511 views

GetPixel() doesn't return properly the values

So I'm trying to use GetPixel() function to get which colors is the texture as a value of x and y. So far it works well but it only return 1 color, being unable to get the rest of the colors of the ...
0
votes
0answers
350 views

Using a PBO glTexSubImage2D with GL_PIXEL_UNPACK_BUFFER gives GL_INVALID_OPERATION

I plan to develop a tool for realtime video manipulation using C++, QT 4.7.4 and OpenGL and i'm on visual studio 2008. I check many web site but my code doesn't work since I try with PBO. At the ...
5
votes
2answers
1k views

In pixel art, should i keep the same color palette for every sprites?

The question may sounds weird (and very noobish but i'am :p) but i can't find any answer. When making pixel art, it is often said that a color palette could be 2, 4, 8, 16 or even 256 colors, through ...
0
votes
0answers
113 views

How do I do collision detection in a 2d game using a tile grid but which also has pixel by pixel camera and character movements?

So I've been at this for weeks now and every solution I programmed did not work. I am using Free Pascal and SDL2. So I programmed a 2d game which uses a two-dimensional array which contains the tile ...
21
votes
3answers
6k views

How does one avoid the “staircase effect” in pixel art motion?

I am rendering sprites at exact pixel coordinates to avoid the blurring effect caused by antialiasing (the sprites are pixel-art and would look awful if filtered). However, since the movement of the ...
0
votes
2answers
87 views

Modern Techniques of Drawing Pixels?

How do game engines efficiently handle and draw pixels within a given display? As a personal project / exercise, I had begun developing a simple game engine written in Java, but came across the issue ...
1
vote
1answer
131 views

Looking for a square-to-hex pixel coords algorithm

So as the headline suggests, I am looking for an algorithm/algorithms used for square-to-hex and hex-to-square pixel coordinates convertion. I have an image which looks kinda "interpolated", meaning ...
1
vote
1answer
695 views

MonoGame, sprite to rectangle

I'm working with MonoGame in VB2015 - please don't give answers that involve using C#. Anyway, I found a snippet which I converted to VB for pixel collision. The function below accepts two rectangles,...
3
votes
1answer
1k views

How does the Direct3D 9 rasterizer determine triangle coverage?

I'm working on a software rasterizer to use in my project. I have implemented one that works well, however, often my rasterizer under or overestimates triangle coverage. I need perfect emulation of ...
2
votes
0answers
104 views

Camera that follows a target with sub-pixel movement

As the title says, I have a character that moves at sub pixel movement (no, I can't change this, because this sub pixel movement happens when I normalize the vector during diagonal movements, ...
0
votes
1answer
359 views

Scanline filling of polygons that share edges and vertices

In the image below (a perspective projection of an icosahedron), the scanline (red) intersects that vertex at the top. In an icosahedron each edge belongs to two triangles. From edge a, only one ...
1
vote
0answers
174 views

How to get smooth movement in a low resolution game? [duplicate]

I am using monogame to make a simple platformer with a fairly low resolution. Right now I am struggling to get smooth movement like in the mario games. In those games despite having the low ...
2
votes
1answer
611 views

Java/Libgdx Pixel game with individual pixel changing

I am currently trying to make a game with pixelated graphics. The game is supposed to run with as few textures as possible. Instead of this it is supposed to generate the levels randomly, and fill in ...
1
vote
1answer
656 views

Pixel-art sprite distortion with 1:1 pixel ratio

So I've been studying the Unity's PPU, pixel density, camera settings topic to make my game pixel-perfect. I've set everything in a way that my screen pixel to sprite texel ratio equals 1. The art ...
0
votes
2answers
458 views

Parts of sprite disappear when zoomed out

I'm playing around with making a roguelike and I want to use ascii characters as tiles in the game. I'm using a 256x256 sprite map where each character ends up being a 32x32 box. This works fine, ...
0
votes
1answer
1k views

Resize big sprites in good way

How to resize 2D sprites in the size of like 400px to 64px or 32px in a way that doesn't make it look pixelated and weird?
3
votes
2answers
4k views

Drawing a 1 pixel thick line in Unity

I'm trying to get a cross at the center of the screen (Two lines will do as well). I have a 2048x2048 Texture which I have thrown into a canvas. Filtering is set to point. The image is set to be in ...
5
votes
0answers
1k views

Slope handling in a tile-based platformer

I'm trying to implement slopes in my 2D tile-based platformer made in GameMaker Studio 1.4. I'm done with the normal solid block tiles, they work like charm, but slopes are even harder than I ...
1
vote
0answers
407 views

How to implement pixel level collision detection?

I'm developing a simple game engine for practise purpose, and I used codes like this to do collision detection (fake code): ...
1
vote
1answer
7k views

How to get a pixel color from a specific sprite on touch (unity)?

I have a 2 layers of a different sprites. How can i get a pixel color from lower sprite? I know how to get touch and world coordinates, but i have no idea what to do next. ...
-1
votes
1answer
372 views

How to render pixelated 3D?

I'd like to know how to render games like a.e. Imscared https://gamejolt.com/games/imscared-a-pixelated-nightmare/10058 Its a great game and I wanted some games with a similar art style so..... Yeah! ...
0
votes
0answers
98 views

How can I Increase pixel In rendering my shader?

This is my flow map shader , it works correctly but I have problem In Rendering. how can I Increase pixels per unit In my shader? ...
2
votes
0answers
311 views

How to make sure two Tiles not overlap each other?

I'm trying to make a Grid who will be easily convertible between 2D and 3D and I'm having a problem with overlapping prefabs in the case of the 3D generation. The thing is, the DataObjects (Tiles) ...
5
votes
3answers
2k views

How do I efficiently manage the pixels, on the screen?

I've been looking for a way to efficiently manage the pixels on a screen, but so far all I've found is along the lines of SetPixel(), in Windows, and drawing a ...
9
votes
5answers
42k views

How do I scale up pixel art without blur in GM Studio?

I'm creating a game in Game Maker Studio that uses pixel art. When I launch the game, all scaled-up textures are really blurry. (It doesn't happen to small ones.) For example, this image renders ...
2
votes
1answer
2k views

How can I efficiently make a solid Texture2D?

I am trying to programmatically make an Image to cover the entire screen. I create the Texture2D, then create a Sprite from the ...
3
votes
1answer
2k views

Spritesheet per pixel collision XNA

So basically I'm using this: ...
3
votes
1answer
150 views

How could I do a 2d pixel design in game where you can see though the obstacles/upper floors?

Maybe the question didnt show much... but what I'm trying to do is e.g. if I'm in a train platform with two floors overlapped, or in a place where I'm blocked by some obstacle to see my char. from my ...
4
votes
1answer
3k views

How to handle day and night in a 2D sprite game

Do I need to draw, for example, a tree how it looks in the day (normal colors) and how it looks at night (colors aligned according to the moonlight)? Or does Unity have a function for that?
1
vote
0answers
86 views

Pixel-perfect collision appear to have random behaviour

So I was sitting with my programming teacher with this issue for about two hours and we couldn't figure out anything specific that could possibly be the issue. Therefore I'm taking some measures and I'...
2
votes
1answer
307 views

Circular lighting mask stretches to ellipse in Monogame using Pixel Shader

I am trying to implement a very simple pixel shader for some basic lighting using this tutorial http://www.xnahub.com/simple-2d-lighting-system-in-c-and-monogame/ My problem is that when the effect ...
2
votes
1answer
2k views

SharpDX Texture to Image in C#

I currently have an image processing application that outputs processed images post pixel shaders have been applied. However, using the examples I've found on the internet, the colors are flip to BGRA ...
0
votes
1answer
604 views

Off screen image Direct3D processing with SharpDX, pixel shader and C#

I currently have a working app that can process images with a window handle. This of course makes use of the swap chain and so on... I need to process an image with pixel shader off screen without a ...
2
votes
1answer
4k views

In SDL2 what is the fastest / most efficient way to draw pixels onto the screen? Using SDL_RenderDrawPoint or SDL_RenderCopy with a Texture?

I want to add pixel splatters and particle effects to a game. For this my options were to have a bunch of pre-made animations in the form of textures, OR create a particle engine. For the particle ...
1
vote
1answer
807 views

Apply Pixel Perfect by script in Unity?

How can I apply Pixel Perfect by script in Unity? All I could find on the web is this which does help at all..
0
votes
3answers
1k views

How to use traditional pixel coordinates system in modern OpenGL? (3.1) (with C++/GLFW)

This question is very similar to my other question, however the solution provided there does not work when using OpenGL 3.1. glOrtho seems to do absolutely nothing no matter where I call it in OpenGL ...
1
vote
0answers
91 views

Can we access the internal array of a Android Bitmap?

Does an Android Bitmap function similar to a BufferedImage? When you get the internal pixel buffer as an int[] or as a byte[] and update the values inside them, the image changes. Is that the same ...