# DominicHughes

Member

119

143 Neutral

• Rank
Member

2. ## DominicHughes

Finally copyed a block of pixels now just need to do that 10-20 times and move the orginal and copyed pixels up and down ,position them correctly , and wala pixelated water :D then going to figure out how to smooth it http://i.imgur.com/vEuD9.png

4. ## DominicHughes

Been working on The Fish Pond game finally onto the pixel animated cinematic introduction sequence then will work on the player whilst still working on silly platformer which is taking alot of code learning.

bump
6. ## Left over garbage pixels from copying a pixel value to new location? C/SDL

I generally have no idea about all of this accept my 2 functions , it would be awesome if someone could do like a simplist explanation on all this new stuff so I can see and know whats going on . Your drawing a rectangle for the water right then altering the pixels on that rectangle how? Why are we comparing surfaces? How are you setting the area of which the pixels values can be gotten and placed elsewhere? yes a full explanation is required !
7. ## Left over garbage pixels from copying a pixel value to new location? C/SDL

1) What type of pixels are you looking to "detect"? Are they a certain color? Image pixels as in the pixels in the PNG Image which is RGBA 32bpp "That could be wrong format". 2) What type of pixels do you consider "garbage"? What makes them "garbage" - their color or some action? There garbage if a pixel value and location is left-over after one pixel value is gotten and placed in a different location. 3) You said detect "around" the area of the garbage pixel. What does "around" mean? One pixel around? Two pixels around? Detect the pixels around the area as in any area I specify could be 40 by 40 pixels or 100 by 100 pixels. 4A) Could you also explain, carefully (it takes me some time to understand ), what it is, in detail, that you are wanting (and why)? To make a wave effect by moving 40 by 40 pixels up and down in a png image. So I can have a decent and cool water effect without loading in each frame of animation of a Adobe After Effects Water Animation . 4B) How are you currently attempting it? I don't actually know the code to get rid of pixel in a png image which has already been found from pixelget which puts in a different location with the pixel found by the function pixelget. 5A) What is the correct result that you'd like? 1.) having user-defined way to put in the x and y values of the area of pixels 2.) to find and place the pixels in a different location using the x and y values. 5B) What is the wrong result your current attempt is giving you? Well I can get values and place them somewhere else but not automatically and in a area specified by me in the x and y .
8. ## DominicHughes

Pixel art! that I drew http://imgur.com/6gKH2

BUMP

Anyone?
11. ## Left over garbage pixels from copying a pixel value to new location? C/SDL

Servant the lord : I know I have to redraw over it but how can I detect the pixels around the area of the garbage pixel automatically? I don't know the code to do it.
12. ## Left over garbage pixels from copying a pixel value to new location? C/SDL

Hi all I'm able to draw pixels in many ways and get pixel values and place them somewhere on the screen surface but when It happens the left over pixel is still there and I was hoping someone could show me code and explain how to remove it from the screen surface here is my code to draw and to get pixels : #include <SDL/SDL.h> #include <SDL/SDL_image.h> #include <math.h> #undef main int y = 10; int x = 10; int x2 = 40; int y2 = 40; SDL_Surface *Screen = SDL_SetVideoMode(640,480,32,SDL_SWSURFACE), *Image; void pixeldraw(int x, int y , int color) { unsigned int *ptr = static_cast <unsigned int *> (Screen->pixels); int offset = y * (Screen->pitch / sizeof(unsigned int)); ptr[offset + x] = color; } unsigned int pixelget(int x, int y) { unsigned int *ptr = static_cast <unsigned int *> (Screen->pixels); int offset = y * (Screen->pitch / sizeof(unsigned int)); return ptr[offset + x]; } int main(int argc , char *argv[]) { SDL_WM_SetCaption("Image Pixel Manipulation", "PM"); Image = IMG_Load("image.png"); //unsigned int *src0 = (unsigned int *) Image->pixels + y * //Image->pitch; SDL_FillRect(Screen,NULL,(0,0,0)); pixeldraw(10, 10, 0x0000FF); unsigned int color = pixelget(10, 10); pixeldraw(x2,y2, color); printf("%08x\n", color); //unsigned int *pixels = (unsigned int*) Screen->pixels; //unsigned int color = pixels[y * (Screen->pitch / /sizeof(unsigned int)) + x]; // pixels[y2 * (Screen->pitch / sizeof(unsigned int) + x2] = color; //src0[1] = 0; bool done = false; SDL_Event event; while(!done) { //SDL_BlitSurface(Image,NULL,Screen,NULL); while(SDL_PollEvent(&event)) { switch(event.type) { case SDL_QUIT: return 0; break; } } SDL_Flip(Screen); } return 0; } any tips and suggestions are also welcome although this was intended as a test case not a perfect example of coding grammatically and correctly per-say of my ability. Thanks for anyone who reads this .
13. ## DominicHughes

Just finished the player movement mostly in my platformer game just gotta round out a few edges and glitches then I literally can work on the first level and this will get finished without worry or doubt what so ever . :) chocobo racer is on halt till I come up with a solution.
14. ## DominicHughes

SPAMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM...
15. ## DominicHughes

no matter how hard life gets keep going you will understand why eventually ;)