Allegro.cc - Online Community

Allegro.cc Forums » Game Design & Concepts » Sprite pixelling

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Sprite pixelling
Johan Halmén
Member #1,550
September 2001

Quote:

But you should never use The Gimp.

I use Gimp, but I don't recommend it. It's only for the 1337. Seriously, I really wouldn't recommend it only because I like it. Too many hate it.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Neil Black
Member #7,867
October 2006
avatar

I did some messing around with MS Paint on Sunday, and got some alright results for my first try. But as other have pointed out it gets tedious. For me it got tedious at about the third 32x32 sprite. I really, really don't like pixelling, but I'm the only one who can do it for me, so I'll have to suffer through. Attached are the three frames I did for one sprite, and here is some code I made to look at how it animates

1#include <allegro.h>
2 
3BITMAP* buffer;
4 
5BITMAP* Hero;
6 
7 
8 
9int Frames;
10 
11void Draw_Stuff(){
12 clear_to_color(buffer, makecol(0, 0, 0));
13
14 if(Frames == 1){
15 masked_blit(Hero, buffer, 32, 0, 100, 100, 32, 32);
16 }
17 if(Frames == 2){
18 masked_blit(Hero, buffer, 0, 0, 100, 100, 32, 32);
19 }
20 if(Frames == 3){
21 masked_blit(Hero, buffer, 32, 0, 100, 100, 32, 32);
22 }
23 if(Frames == 2){
24 masked_blit(Hero, buffer, 64, 0, 100, 100, 32, 32);
25 }
26 blit(buffer, screen, 0, 0, 0, 0, 640, 480);
27
28}
29
30 
31 
32 
33 
34int main(){
35 
36 allegro_init();
37 install_keyboard();
38 set_color_depth(16);
39 set_gfx_mode( GFX_AUTODETECT, 640, 480, 0, 0);
40
41 Frames = 1;
42
43 buffer = create_bitmap(640, 480);
44 Hero = load_bitmap( "Characters/Hero.bmp", NULL);
45
46 while(!key[KEY_ESC]){
47
48 Frames++;
49 if(Frames > 4) Frames = 1;
50
51 Draw_Stuff();
52
53 rest(100);
54 }
55}
56END_OF_MAIN()

For some reason the pixels from the previous frame are still visible when the next frame is drawn, despite the clear_to_color(), and I don't understand this. It's also a crappy-looking thing, but I understand that I need practice. Note: the code looks for the Hero bitmap in a file named Characters, just saying that so no one says it won't load because they didn't look at the code ;)

EDIT: Crap, there's some attached code as well, but it isn't the right code, and I can't seem to remove it.

OICW
Member #4,069
November 2003
avatar

Well at first you could try draw_sprite. Then you should see whether there are some artifacts in the sprite itself - ussualy at the edges if the sprite. Sometimes when using tools which generate smooth lines (antialiased) magic pink gets other mixed with some alpha pixels and when saved produces different color.

[My website][CppReference][Pixelate][Allegators worldwide][Who's online]
"Final Fantasy XIV, I feel that anything I could say will be repeating myself, so I'm just gonna express my feelings with a strangled noise from the back of my throat. Graaarghhhh..." - Yahtzee
"Uhm... this is a.cc. Did you honestly think this thread WOULDN'T be derailed and ruined?" - BAF
"You can discuss it, you can dislike it, you can disagree with it, but that's all what you can do with it"

Sirocco
Member #88
April 2000
avatar

Quote:

I use Gimp, but I don't recommend it. It's only for the 1337. Seriously, I really wouldn't recommend it only because I like it. Too many hate it.

Gimp and Photoshop are great for what they are made for: photo editing. Pixeling is something completely different and they aren't geared toward that, so there are more efficient tools I'd look at before resorting to either of those.

-->
Graphic file formats used to fascinate me, but now I find them rather satanic.

James Stanley
Member #7,275
May 2006
avatar

'So you want to be a pixel artist?' is another good tutorial about drawing. It's mirrored all over the place and half of them are down most of the time. Just Google for it...

Rampage
Member #3,035
December 2002
avatar

Quote:

'So you want to be a pixel artist?' is another good tutorial about drawing.

Is that the one from Tsugumo? That's the best I've seen.

-R

23yrold3yrold
Member #1,134
March 2001
avatar

Quote:

Is that the one from Tsugumo?

Yup.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Dennis
Member #1,090
July 2003
avatar

Here's the most recent version of Tsugumo's Tutorial series.

23yrold3yrold
Member #1,134
March 2001
avatar

Oh wow, cool. I thought he stopped writing that ages ago.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Dennis
Member #1,090
July 2003
avatar

Yes, basically that's what he did but apparantly he came back to it at the beginning of this year.

Trezker
Member #1,739
December 2001
avatar

ZOMG!!!!

Tsugumo continuation! People working on Allegro 5!

Is hell freezing too?

Paul Pridham
Member #250
April 2000
avatar

For pixel art, use Graphics Gale: http://www.humanbalance.net/gale/us/

Animation, layers, sprite sheets, colour replacement, etc.

 1   2 


Go to: