Questions tagged [pixel]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
485 views

Fixed texture size (Pixel) libgdx, java

If I resize the window (e.g. fullscreen) the texture size also changes! I want that behaviour: If I change to fullscreen you will see more of the game world. The size (Pixel) of the texture stay the ...
1
vote
2answers
1k views

SDL Convert pixel format

I have two pixes stored in a 32 bit unsigned integer (4 bytes per pixel, using SDL's types for convenience): ...
1
vote
1answer
598 views

Drawing UI using density pixels

I have a question about proper ways to draw UI, since I've learned what I know from the internet and by experimenting I often dont code the "proper" way, instead I do it my own way, not knowing if it ...
1
vote
1answer
438 views

Texture Shaders vs. Pixel/Fragment Shaders?

My question is a simple one. Functionally, practically, and performance-wise, what are the differences between using a D3DX Texture Shader, and using a Pixel/Fragment Shader rendered with a full ...
1
vote
1answer
175 views

Application design for specific points on image

Hi guys I am starting a simple hobby app in Unity, its a 2D app, which have some alphabets like A,B,C..Z (images) . There ll be specific paths where user touch one by one to complete drawing the ...
1
vote
1answer
878 views

Picking a suitable resolution for a modern low-res game?

I'm working on a 2D game project right now (using SFML+OpenGL and C++) and I'm trying to figure out how to go about choosing a resolution. I want my game to have a pixel resolution that is around that ...
1
vote
1answer
127 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
634 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 ...
1
vote
1answer
675 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,...
1
vote
1answer
792 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..
1
vote
1answer
658 views

How do I implement pixel-exact collision server-side?

Recently I made a 2D offline game with HTML5 Canvas and JavaScript. I'm detecting collisions by first checking whether image bounding boxes overlap. If they do, I check against the bounding boxes, ...
1
vote
2answers
4k views

RGB values from image into a one dimension array in c# [closed]

I was wondering if there is a was a way to read rgb values from an image into a one dimensional array in C#. If it doesnt make sense, in java I would do something like this. ...
1
vote
2answers
2k views

HLSL Pixel Shader that does palette swap

I have implemented a simple pixel shader which can replace a particular colour in a sprite with another colour. It looks something like this: ...
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 ...
1
vote
0answers
165 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 ...
1
vote
0answers
396 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
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'...
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 ...
1
vote
0answers
87 views

Awesomium custom surface scroll

I have a custom Awesomium::Surface implementation, and I need to create a Scroll function for it. The function asks me to manually move some pixels of my texture by the indicated X and Y offset. How ...
1
vote
2answers
457 views

Easy Method to Change Color on UI Elements

This isn't a language-specific thing as far as I'm concerned. I was wondering what may be a quick way to change the COLOR of a certain on-screen element such as a button and its associated text. I ...
1
vote
0answers
299 views

Vertex shader to Pixel shader NVIDIA problem - restarting drivers

I have problem with my shader on NVIDIA cards. On AMD it's working right. Shader Builder exported CODE: ...
0
votes
4answers
7k views

Trying to figure out SDL pixel manipulation?

Hello so I've found code that plots a pixel in an SDL Screen Surface : ...
0
votes
1answer
965 views

How do I check on non-transparent pixels in a bitmapdata?

I'm still working on my window cleaning game from one of my previous questions I marked a contribution as my answer, but after all this time I can't get it to work and I have to many questions about ...
0
votes
1answer
624 views

Is it possible to render part of the screen in different pixel density using openGL?

Say I have an openGL screen and I want to render part of the screen in different pixel density than the whole screen pixel density. Is it possible and if possible how?
0
votes
1answer
430 views

Is drawing an entire game to a render target and then scaling it up a viable solution to a pixel-mismatching problem?

To clear up some possible confusion caused by my title, my game is meant to be pixelly. I currently achieve this by multiplying sprite sizes and locations by a constant called ...
0
votes
2answers
76 views

How to determine areas of pixels of different colors or luminosities?

I want to create a program that determines all the areas of a given picture that have a different color, or the same color with different luminosities. Are there known algorithms that do this job ? I ...
0
votes
1answer
2k views

Adding Screenshots Specifically For 4-inch, 7-inch, and 10-inch Screen

My boss invited me and assigned me now as publisher for the app in Google Play. I have a 7-inch Google Nexus 7 tablet to take screenshot of any one of my sample projects I've made and post and upload ...
0
votes
2answers
74 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 ...
0
votes
2answers
439 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
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 ...
0
votes
1answer
33 views

Using Gimp and clone tool. Source selection selects center of four pixels

I am using gimp to make tilesets. When I use the clone tool and hold ctrl to select the source, the selection is in the center of four pixels instead of just one pixel. I don't know if I am doing ...
0
votes
1answer
1k views

SDL pixel access very slow

I'm using SDL and need to plot pixels one by one on the screen. When I do this, it's extremely slow. I followed the tutorial here: http://www.programmersranch.com/2014/02/sdl2-pixel-drawing.html ...
0
votes
2answers
652 views

Colour values of a pixel array from a spritesheet image wrong (C++, SDL2)

So basically what i want to do is create a 2D tile based rendering system in C++ that renders each pixel on the screen manually. Rendering an individual pixel on the screen works just fine (or render ...
0
votes
1answer
1k views

Rotating and scaling textures built up of pixel arrays in java?

I'm making my first real game, in Java, and I'm currently working on the base system, for rendering images (sprites) and I wonder how I can rotate sprites. My sprite class looks like this: ...
0
votes
2answers
3k views

Getting a color value from a coord

My goal is to get a RGB value of a pixel based of off a X,Y coordinate. I have been working on AIs for a small project attempting to make a bot that can pass through a maze. I want to get the pixel ...
0
votes
1answer
122 views

Which gaming engine can be used for pixel manipulation? [closed]

Here is the gist of where I am going with this. I work for a printer company and basically all of our input files(or output files for virtual printers) are bitmap files. We currently have a tool built ...
0
votes
3answers
476 views

help using image to overlay grayscale around player

I'm sorry for the confusing title but it is hard to explain in one sentence. This is what I have What I want to do is use that black overlay to convert everything in the black area to grayscale. ...
0
votes
3answers
7k views

How do I create a curved line or filled circle or generally a circle using C++/SDL?

Hello I've been trying for ages to make a pixel circle using the putpixel function provided by SDL main website here is that function : ...
0
votes
2answers
336 views

Android Game Development problem with Speed = Distance / Time

I have been coding speed for an object. I have made it so the object will move from one end of the screen to another at a speed depending on the screen size, at the monemt I have made it so it will ...
0
votes
0answers
55 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 ...
0
votes
0answers
41 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
381 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 ...
0
votes
0answers
21 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
21 views

Easily split up a ripped spritesheet? [duplicate]

So, I'm new and all to game development, and I use the free version of Construct 3. I want to make a Mother 3 fan game, as it's one of my favourite games of all time and seems like fun practice for a ...
0
votes
0answers
42 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 ...
0
votes
2answers
510 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
450 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
309 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 ...
0
votes
0answers
105 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 ...