RIP to BT Garner of MindRec.com... He passed away early 2023 from health problems. BT was one of the top PCE homebrew developers and founder of the OG Turbo List, then PCECP.com. Condolences to family and friends.
IMG
IMG
Main Menu

Palettes and such - Assistance please

Started by wyndcrosser, 12/31/2013, 10:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wyndcrosser

So, I've gotten a basic main menu and sound, pressing 'Run' gets you into the game itself. Now I'm trying to figure out a few things.

Update: Grafx2 fixes my saving issues, however if I try to add any "new" color to the original .PCX file, I'm getting "Invalid Color Index Found" while compiling in HuC.

Update 2: Duh... you're only allowed 16 palettes, and 0 is one of those 16 (0-15). I'm dumb.

I'm using Photoshop to do the 32x32 character, so I'm assuming I've messed it up with how the PCX file is saved.

#incpal(bonkpal, "warrior.pcx");    /This command should be pulling the palette from the .pcx to make it work, but the character is all black.

When modifying an already created .PCX, it seems to stick me with the original pcx's colors. I even tried to use the same color palette that the original .PCX used, but it's still black (so I think saving the file in Photoshop is messing it up)

What are my palette limitations exactly and what sprite programs do you guys use ?

Some sprites I'm working with now. The pieces of "up for use", so I'm going to see what I can do with them in a 32x32 pixel area etc.

/k030.png
/dnpj.png

Thanks

seieienbu

Those are some pretty good looking sprites, can't wait to see what they're used for.

I don't know enough to really warrant having an opinion, but on the second page of this thread, https://www.pcengine-fx.com/forums/index.php?topic=15765.0 there's a good discussion about what tools people use/are good for artistic assets in PCE development before an awful lot of internet happens.
Current want list:  Bomberman 93

wyndcrosser

Quote from: seieienbu on 12/31/2013, 11:09 AMThose are some pretty good looking sprites, can't wait to see what they're used for.

I don't know enough to really warrant having an opinion, but on the second page of this thread, https://www.pcengine-fx.com/forums/index.php?topic=15765.0 there's a good discussion about what tools people use/are good for artistic assets in PCE development before an awful lot of internet happens.
Thanks, I'll look into it. I'm actually thinking once I get this stuff down, I want to make a platformer where you have a World War II Marine, who gets shot back in time, or to another dimension. So you get the run and gun mechanics, but you'll have to do ammo pickups (rocks, etc.) after your ammo from the "future" runs out.

OldRover

Paint Shop Pro 7 and previous versions work the best for PCE graphics, in terms of major apps. PSP8 and later versions try to be Photoshop, complete with bloat. Photoshop and 4-bit graphics don't get along very well; Paint Shop Pro has a 4-bit mode which makes it impossible to use too many color indexes. It's the old tool phrase... use the right tool for the job. PSP is more suited to low-color pixel work, PS is more suited to high-color photo work.
Turbo Badass Rank: Janne (6 of 12 clears)
Conquered so far: Sinistron, Violent Soldier, Tatsujin, Super Raiden, Shape Shifter, Rayxanber II

FraGMarE

I get what Rover is saying, but I still use Photoshart for everything.  It's a one stop graphical shop.

If you want to make 4-bit pixels using a 9-bit global palette, simply manipulate each RGB color value manually in the color changer thingy.  Pretend the only colors you can make are in RGB value increments of *36*.  So where you normally input the RGB values ranging from 0-255, pretend the only values you can use are 0, 36, 72, 108, 144, 180, 216, and 252.  You can also "force" any image you've already made into a 9-bit color space by going to Image > Posterize > Levels = 8

I will say to ALWAYS use 'Save As' in photoshop when working with PCX files.  For some reason, the 'Save' function will sometimes corrupt the image.

TurboXray

#5
Like Frag, I use Photoshop. I have a bunch of support utilities that go along with it. I'm able to embedded subpalette reference directly into PCE colors on Photoshop. Since you use stepping of base 36 for R/G/B, I have a util that creates slight differences between the steps. I have a utility as well as a lookup chart (for manually editing stuffs). Each embedded color corresponds to a 0 to 15 number (aka subpalette). The other method, is just to create a palette map to overlap top of the pic/map/etc that you're working on. I use 8x8 grid blocking on the palette layer, a total of 16 colors and each color is a subpalette. Where ever the 8x8 color from the palette layer overlaps a 8x8 area of the pic underneath, that means that 'tile' or cell underneath belongs to that subpalette. I export both layers as BMPs and have util that creates, the tiles, supalettes, tilemap, etc. It also creates a few other files increase I want to bring it into a different program (like a tile editor). Etc
 I do this for sprites as well, when they are made up of smaller sprites with different subpalettes.

 It sounds complicated, but it's fairly easy to use. I've also used photoshop to make game maps. You can use PS as a pseudo tile map editor. Far credit due; I learned a ~lot~ of my Photoshop kung-fu from Fragmare.

 Can't really help you out on the HuC pcx stuff. I don't use those functions of PCEAS (which HuC just passes along). I usually need a lot more flexibility than what it can give you. I don't even use PCEAS anymore (HuC generates ASM code and passes it along to PCEAS). I'm created a new fork (PCEAS2) with some new directives and such. One of these days, I'll add BMP support to it - with embedded color  subpalette decoding option, as well as a few other options (like remove redundant tiles, etc). Not that I need it, but sometimes you just want some quick and dirty support to test things out.

 Btw, is that your stuff (original)?

OldMan

Quote#incpal(bonkpal, "warrior.pcx");    /This command should be pulling the palette from the .pcx to make it work, but the character is all black.
Yep. Photoshop tends to flip the palette slots in .pcx files. Use gimp to flip them back. That's one of the reasons people use other tools for graphics.

wyndcrosser

Bonknuts,

It's not, the individual said I could use some of his concepts, so I've been playing around with them. I've done about 15 various "Amazon" characters, with different hair styles, armor, weapons etc. I just got done with about 10 different "levels", Very interesting stuff. After I do the artwork, that's when I'll start getting into the coding portion. I've seen A LOT of people who start coding and leave art til the end and it shows. A simple game with simple graphics might be okay, but giving it a facelift is great (see the Mega Man 1-6 remastered hacks, the graphics are great).

I've had to recreate everything, as to fix it in 32x32 pixels. Anything bigger, makes me think "Art of Fighting" and isn't good for a platformer.

The guy who does the artwork is SUPER talented, but has no interest in gaming. The attached pictures are just for reference.

Arkhan Asylum

What code are you using to load the palette?

#incpal only includes the palettes for use.  If you don't load them, you'll get nothing.

you should have something like set_spr_pal(bonkPal, 16);  < loads 16 palettes
or load_palette(16, bonkPal, 16); < loads 16 palettes starting at the 16th index, which is where sprite palettes begin.

all #incpal(bonkPal, "warrior.pcx") does is extract as many palettes as possible from your source image, and creates that many palette entries.  bonkPal becomes a pointer to the very first one it created, and they will all run sequentially in memory after that.


edit: oh, and you need to remember to set the palette to the sprite, also.  so:

spr_set(*insert sprite number here*);
spr_pal(*insert palette number here*);
This "max-level forum psycho" (:lol:) destroyed TWO PC Engine groups in rage: one by Aaron Lambert on Facebook "Because Chris 'Shadowland' Runyon!," then the other by Aaron Nanto "Because Le NightWolve!" Him and PCE Aarons don't have a good track record together... Both times he blamed the Aarons in a "Look-what-you-made-us-do?!" manner, never himself nor his deranged, destructive, toxic turbo troll gang!

wyndcrosser

Hey Arkhan, your right I just wrote that one part as I was making sure that code did what I thought it did. Thanks.

Are there more tutorials or command lists for HuC? I enjoy getting my feet wet.

Arkhan Asylum

Quote from: wyndcrosser on 01/01/2014, 01:21 AMHey Arkhan, your right I just wrote that one part as I was making sure that code did what I thought it did. Thanks.

Are there more tutorials or command lists for HuC? I enjoy getting my feet wet.
Obeybrew.com has stuff, but it's not done, so expect 404s.

http://archaicpixels.com/index.php/Main_Page  << has a reference. 

This "max-level forum psycho" (:lol:) destroyed TWO PC Engine groups in rage: one by Aaron Lambert on Facebook "Because Chris 'Shadowland' Runyon!," then the other by Aaron Nanto "Because Le NightWolve!" Him and PCE Aarons don't have a good track record together... Both times he blamed the Aarons in a "Look-what-you-made-us-do?!" manner, never himself nor his deranged, destructive, toxic turbo troll gang!