View previous topic - View next topic |
Author |
Message |
dbest Milk Maid
Joined: 02 May 2007 Posts: 41
|
Posted: Sun May 20, 2007 5:07 am Post subject: |
[quote] |
|
Yeah with the game engine part... currently not much of progress have I done.... :( So i might use an engine that is already out there. Atleast for the scrolling bit....
Am trying my hand at creating sprites.. and i think i suck... and i think i keep gettin pathetic... :(
Well, I have a quick question... DevX... U have used the player sprite on a pink background against the grass. How on earth does the pink not show? When I create a player sprite, it looks more like a tile than an actual player.....
In between, I am working on a Breakout type of game.. just to keep me from going insane with these ******** tiles... :)
|
|
Back to top |
|
|
BadMrBox Bringer of Apocalypse
Joined: 26 Jun 2002 Posts: 1022 Location: Dark Forest's of Sweden
|
Posted: Sun May 20, 2007 7:38 am Post subject: |
[quote] |
|
That's because the pink is the transparency color. Here's an example;
Code: | '' set up a screen: 320 * 200, 16 bits per pixel
screenres 320, 200, 16
'' set up an image with the mask color as the background.
Dim img As Any Ptr = imagecreate( 32, 32, Rgb(255, 0, 255) )
Circle img, (16, 16), 15, Rgb(255, 255, 0), , , 1, f
Circle img, (10, 10), 3, Rgb( 0, 0, 0), , , 2, f
Circle img, (23, 10), 3, Rgb( 0, 0, 0), , , 2, f
Circle img, (16, 18), 10, Rgb( 0, 0, 0), 3.14, 6.28
'' Put the image with PSET (gives the exact contents of the image buffer)
Draw String (110, 50 - 4), "Image put with PSET"
Put (60 - 16, 50 - 16), img, Pset
'' Put the image with TRANS
Draw String (110, 150 - 4), "Image put with TRANS"
Put (60 - 16, 150 - 16), img, trans
'' free the image memory
imagedestroy img
'' wait for a keypress
Sleep |
So to not making the pink show use trans. _________________
|
|
Back to top |
|
|
dbest Milk Maid
Joined: 02 May 2007 Posts: 41
|
Posted: Sun May 20, 2007 7:50 am Post subject: |
[quote] |
|
thanks... will try that....
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Sun May 20, 2007 1:56 pm Post subject: |
[quote] |
|
dbest wrote: |
Well, I have a quick question... DevX... U have used the player sprite on a pink background against the grass. How on earth does the pink not show? When I create a player sprite, it looks more like a tile than an actual player..... |
My code uses the Allegro library, and the draw_sprite function to draw the player sprite. The pink background (called magic-pink RGB(255,0,255)) is ignored by the Allegro draw_sprite function. _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
dbest Milk Maid
Joined: 02 May 2007 Posts: 41
|
Posted: Sun May 20, 2007 3:03 pm Post subject: |
[quote] |
|
hmmm.. now thats interesting...
so shud i still go with a pink background and try to get the engine not to display it?
But my hero tiles look like tiles instead of like actual figures on the screen.... wats with that???
|
|
Back to top |
|
|
BadMrBox Bringer of Apocalypse
Joined: 26 Jun 2002 Posts: 1022 Location: Dark Forest's of Sweden
|
Posted: Sun May 20, 2007 3:38 pm Post subject: |
[quote] |
|
dbest wrote: |
so shud i still go with a pink background and try to get the engine not to display it? |
If you are using the magic pink then the only thing you have to do is to use the draw_sprite command and presto, transparency. Just as easy as using fb's native graphic commands really.
dbest wrote: | But my hero tiles look like tiles instead of like actual figures on the screen.... wats with that??? | What do you mean by that anyway? _________________
|
|
Back to top |
|
|
dbest Milk Maid
Joined: 02 May 2007 Posts: 41
|
Posted: Sun May 20, 2007 3:55 pm Post subject: |
[quote] |
|
well, the hero look like a flat stick... i guess thats the way the sprite is drawn and i suppose i wud have to make him the sprite look more 3dish... then just a flat tile...
makes sense?
|
|
Back to top |
|
|
js71 Wandering DJ
Joined: 22 Nov 2002 Posts: 815
|
Posted: Sun May 20, 2007 4:59 pm Post subject: |
[quote] |
|
Maybe post a screenshot?
|
|
Back to top |
|
|
dbest Milk Maid
Joined: 02 May 2007 Posts: 41
|
|
Back to top |
|
|
js71 Wandering DJ
Joined: 22 Nov 2002 Posts: 815
|
Posted: Mon May 21, 2007 7:02 am Post subject: |
[quote] |
|
Well first of all, that's the wrong shade of pink-- What you have there is 255, 0, 128. It should be 255, 0, 255 to be the 'magic' pink for transparency. If you mean it looks flat even when transparent, well, it is a rather flat-looking sprite. It doesn't really have any perspective or shading, which are both very important in making a sprite have form and appearing to be a part of the rest of the game world.
|
|
Back to top |
|
|
dbest Milk Maid
Joined: 02 May 2007 Posts: 41
|
Posted: Mon May 21, 2007 2:06 pm Post subject: |
[quote] |
|
thanks for the constructive feedback...
bet u did manage to laff abt it though...
i think its kinda stupid.... :)
|
|
Back to top |
|
|
BadMrBox Bringer of Apocalypse
Joined: 26 Jun 2002 Posts: 1022 Location: Dark Forest's of Sweden
|
|
Back to top |
|
|
js71 Wandering DJ
Joined: 22 Nov 2002 Posts: 815
|
Posted: Mon May 21, 2007 4:07 pm Post subject: |
[quote] |
|
dbest wrote: | thanks for the constructive feedback...
bet u did manage to laff abt it though...
i think its kinda stupid.... :) |
No, I didn't laugh. I think it's rather unrealistic to assume that anyone would start out capable of cranking out sprites and tiles of high-end Square quality. :p
And yes, Pixellation is a great site. I used to go there years ago... I totally forgot it's back up. I ought to drop in there again sometime.
|
|
Back to top |
|
|
BadMrBox Bringer of Apocalypse
Joined: 26 Jun 2002 Posts: 1022 Location: Dark Forest's of Sweden
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|