Author Topic: A few quick (stupid?) questions  (Read 1489 times)

soop

  • Hero Member
  • *****
  • Posts: 2828
A few quick (stupid?) questions
« on: May 15, 2012, 01:12:34 AM »
I have a few basic questions I'd appeciate answers to :)

1.  How possible is Sunset Riders on a PC Engine?  And what format is going to be the best balance (like I doubt it would need an arcade card, but a Hucard may be too small)
2.  I guess this is dependant on the format too, but how many distinct tiles could you get away with in a game?  Does it depend on the level?  Can you get away with loading a single level in sections?
3. Wikipedia says the PCE can handle 482 colours on screen out of 512 - is that correct?  And is that in all circumstances?

I'm just reading through Old Rover's excellent HuC guides :D  They're really really good.  I haven't downloaded HuC yet though, I've just been reading through at work.

More questions:

4.  I found this http://pcengine.freeforums.org/pc-engine-colour-palette-for-artists-t60.html - does this mean when I make a 16x16 sprite, I have to use one of these set palettes?
5.  Am I right in thinking a 32 x 32 sprite is made of 4 16 x 16 sprites?
6.  Is there a tool to take a picture and automatically convert it into the PCE's palette?
« Last Edit: May 15, 2012, 01:22:45 AM by soop »

Black Tiger

  • Hero Member
  • *****
  • Posts: 11241
Re: A few quick (stupid?) questions
« Reply #1 on: May 15, 2012, 01:26:18 AM »
The PCE can do any kind of 2D game like Sunset Riders. Arcade Card is best if you aren't going to use the biggest HuCard the game could fill. Even if the Arcade Card's load space isn't completely filled, it's worthwhile if a section exceeds 2mb.

Many PCE CD games load stages in section in ways that feel natural, even when porting arcade games that didn't.

16-bit consoles use 16-color palettes for sprites and tiles, with one color invisible (like a GIF). Each system can use up the following number of palettes at once:

Mega Drive: 2 x sprites + 2 x tiles

Super Famicom 8 x sprites + 8 x tiles

PC Engine 16 x sprites + 16 x tiles


It would be hard to display the max number of colors in a regular style games. The best way to approach it would be having a detailed background with variety and tinted sections (transparent lighting, myst, etc effects) and then a 16 uniquely colored sprites, like maybe 8 enemies in an RPG fight made from two+ sprites each.
http://www.superpcenginegrafx.net/forum

Active and drama free PC Engine forum

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: A few quick (stupid?) questions
« Reply #2 on: May 15, 2012, 02:13:04 AM »
I have a few basic questions I'd appeciate answers to :)

Theres no such thing as a stupid question

Quote
1.  How possible is Sunset Riders on a PC Engine?  And what format is going to be the best balance (like I doubt it would need an arcade card, but a Hucard may be too small)

This has CD game written all over it.  

Quote
2.  I guess this is dependant on the format too, but how many distinct tiles could you get away with in a game?  Does it depend on the level?  Can you get away with loading a single level in sections?

With a CD, infinite, theoretically here.  If you use chip music and save the CD, you could stream tiles to VRAM on the fly.  IIRC, Dynasty Wars does this:

http://pcengine.co.uk/HTML_Games/Dynasty_Wars.htm

If you take the CD out and keep playing, the background starts to disappear as you scroll, lol

Quote
3. Wikipedia says the PCE can handle 482 colours on screen out of 512 - is that correct?  And is that in all circumstances?

You have

Background: (16 palettes * 15 colors) + 1 shared color that every palette uses  = 241
Sprites: (16 palettes * 15 colors because 1 of them is transparent) = 240

So, 481 colors.  

I guess you could say 482, but transparent is not visible, so what the hells the point.  :)

Quote
4.  I found this http://pcengine.freeforums.org/pc-engine-colour-palette-for-artists-t60.html - does this mean when I make a 16x16 sprite, I have to use one of these set palettes?

No, you define your palettes yourself, usually by using a library function that reads the image you are using.  it extracts the palette from it.  This means you could have one palette that is blues (for water maybe?) and another that is green (for grass stuff), and then one that is a mix of some greens and blues, maybe for a robot?  

This is not to say that a sprite can use multiple palettes.  It can't.  You can just duplicate colors within various palettes.  Each sprite can still only use 1 palette... so if you want red and blue on a sprite, you had better put red and blue in the palette you assign to it.


Quote
5.  Am I right in thinking a 32 x 32 sprite is made of 4 16 x 16 sprites?

Not exactly.   a 32x32 sprite is ONE sprite.  It is just loaded in 16x16 chunks.  The hardware treats it as one single sprite.

you can have 16×16, 16×32, 16×64, 32×16, 32×32, and 32×64


Quote
6.  Is there a tool to take a picture and automatically convert it into the PCE's palette?


Just use a paint program that supports PCX.  I prefer NeoPaint, or Grafx2

you then can just include the image in your code and let a library function create a palette for you, easy.

As long as you make sure the colors you use in the paint program are 9bit (RGB values in steps of 36)

Note: Photoshop saves PCX palettes backwards.  You can use GIMP to flip it back to normal.
« Last Edit: May 15, 2012, 02:15:30 AM by Arkhan »
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

Nando

  • Hero Member
  • *****
  • Posts: 3193
Re: A few quick (stupid?) questions
« Reply #3 on: May 15, 2012, 02:30:19 AM »

Note: Photoshop saves PCX palettes backwards.  You can use GIMP to flip it back to normal.

Oh...well that's good to know.


Soop are you going to try and emulate the game or do a conversion?

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: A few quick (stupid?) questions
« Reply #4 on: May 15, 2012, 02:36:49 AM »
Yes, in GIMP just view the color map, and right click and click the reverse button, shazam! no more backwards bullshit!
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

Nando

  • Hero Member
  • *****
  • Posts: 3193
Re: A few quick (stupid?) questions
« Reply #5 on: May 15, 2012, 02:50:39 AM »
Kick ass, thanks for the tip!

soop

  • Hero Member
  • *****
  • Posts: 2828
Re: A few quick (stupid?) questions
« Reply #6 on: May 15, 2012, 03:02:21 AM »

Note: Photoshop saves PCX palettes backwards.  You can use GIMP to flip it back to normal.

Oh...well that's good to know.


Soop are you going to try and emulate the game or do a conversion?

I am on a flight of fancy.  I get those kind of like bipolar people have happy days.
I'm thinking of going back through the tutorial after and following it to the letter, then making a really simple game of another type, maybe try a super sprint clone with just one level and no AI (and come back to it after).

I think it would be very presumptuous for me to start writing Sunset Riders, but it's a lovely pipe dream to have, so maybe if I get good enough I'll attempt it one day (although this could very well all go nowhere).  It's just nice to know that it's possible.  In fact, just by ripping the sprites from (say) the Megadrive version, it would probably be much easier today than it ever would have been then.

Anyway, thanks very much for the answers Arkhan and Black Tiger, that's perfect!

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: A few quick (stupid?) questions
« Reply #7 on: May 15, 2012, 03:04:46 AM »
Write games.

Kill whitey.

It's the law around here.
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

Nando

  • Hero Member
  • *****
  • Posts: 3193
Re: A few quick (stupid?) questions
« Reply #8 on: May 15, 2012, 03:16:46 AM »

Note: Photoshop saves PCX palettes backwards.  You can use GIMP to flip it back to normal.

Oh...well that's good to know.


Soop are you going to try and emulate the game or do a conversion?

I am on a flight of fancy.  I get those kind of like bipolar people have happy days.
I'm thinking of going back through the tutorial after and following it to the letter, then making a really simple game of another type, maybe try a super sprint clone with just one level and no AI (and come back to it after).


Right on man! DO IT; and what Ark said :D



soop

  • Hero Member
  • *****
  • Posts: 2828
Re: A few quick (stupid?) questions
« Reply #9 on: May 15, 2012, 03:59:22 AM »

Note: Photoshop saves PCX palettes backwards.  You can use GIMP to flip it back to normal.

Oh...well that's good to know.


Soop are you going to try and emulate the game or do a conversion?

I am on a flight of fancy.  I get those kind of like bipolar people have happy days.
I'm thinking of going back through the tutorial after and following it to the letter, then making a really simple game of another type, maybe try a super sprint clone with just one level and no AI (and come back to it after).


Right on man! DO IT; and what Ark said :D




Might have to wait for part 8 of that tutorial - it's very, very good, but there's still some important stuff coming!

soop

  • Hero Member
  • *****
  • Posts: 2828
Re: A few quick (stupid?) questions
« Reply #10 on: May 16, 2012, 03:59:37 AM »
At the moment, in my mind, I'm preoccupied considering how possible various parts of Sunset Riders is, and the one I'm having trouble with is the train section (level 2)  The enemies don't really come thick and fast, but thanks to the horses, the amount of sprites is increased significantly.  Also, thankfully, the speed of the bullets going back increases quite significantly, so the chance of slowdown would be decreased from a gun crazy player.

I'm fairly certain 4 player would be off the cards, since we're potentially looking at... 4 extra 32x32 sprites on screen per player (on horseback) and then  let's say an average of 10 bullets each on screen at one time... makes a total of 56 of 64 sprites just for player characters.  

Actually, this is assuming that the 64 onscreen sprite limit is not adjustable depending on the size of the sprites (like you couldn't have 4 times as many 16x16 sprites, so bullet or enemy, it won't make a difference).

ANNNYYway.  The train sequence would require an inordinate number of sprites especially if it was to be closer to the arcade version, which is more detailed somehow .

BUT, what I figured would be possible, is actually have the level scrolling slowly BACKWARDS, with the train and the rails as part of the background, and have the wooden slats on the track, and the earth ridge as sprites flying backwards.  I'm pretty sure this switcharoo would allow more detail, thus making the train possible.  However, 3 full rows of sprites (even if they're only 3 different unique sprites) might actually be too much.  Plus it would be nice to have some sprites left for foreground and background paralax.  And y'know, enemies.

The other thing I don't know about is sprite layers, and whether you could actually mask part of the sprite as the "background" train approaches.

sorry, I'm getting carried away here, it's all getting a bit tl;dr.

Other thoughts; throwing sprites out faster than the vertical blank to try and create some kind of optical illusion with less sprites, and lastly, forgoing the railway slats altogether, with only foreground and background parallax, and the ridge as indicators of motion.  Although it would be a pretty glaring ommission, it would probably allow a near-arcade experience.

Any ideas?

*edit* another strange question; if I decided for one frame to replace everything on the screen with a red background and one masive sprite (I'm thinking of a way to emulate the dynamite explosions, which are HUGE in the arcade) would it absolutely f*ck up the game on a CD (loading times)?  Having to load everything into vram twice, pretty much.
« Last Edit: May 16, 2012, 04:42:44 AM by soop »

nodtveidt

  • Guest
Re: A few quick (stupid?) questions
« Reply #11 on: May 16, 2012, 04:16:31 AM »
I guess you could say 482, but transparent is not visible, so what the hells the point.  :)
You're forgetting about the overscan color, which can be a different color than all 481 other displayable colors. :) Hence, 482. :)

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: A few quick (stupid?) questions
« Reply #12 on: May 16, 2012, 04:30:40 AM »
I guess you could say 482, but transparent is not visible, so what the hells the point.  :)
You're forgetting about the overscan color, which can be a different color than all 481 other displayable colors. :) Hence, 482. :)

Oh. duh.  that's the same color as the transparent sprite palette color of the first sprite palette. 

So, yeah, it shows up.

Kinda.  If you really want to count that as "on screen", lol
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

sunteam_paul

  • Hero Member
  • *****
  • Posts: 4732
Re: A few quick (stupid?) questions
« Reply #13 on: May 16, 2012, 04:54:46 AM »
At the moment, in my mind, I'm preoccupied considering how possible various parts of Sunset Riders is, and the one I'm having trouble with is the train section (level 2)


Here's the only practical way I can think of:


The bars on the left show horizontal parallax. Ignore the separate red and green - both those would scroll at the same speed otherwise it would look daft.
You'd have to do without the slats and have a bit plain colour for the background behind the train. The back rail wouldn't have any exterior slats visible - it would need to be a horizontal gradient only, like the horizon line.
The PC Engine Software Bible
Quote from: Tatsujin
I just felt in a hole!

Nando

  • Hero Member
  • *****
  • Posts: 3193
Re: A few quick (stupid?) questions
« Reply #14 on: May 16, 2012, 04:57:51 AM »
JEEBUS! how big would your character sprites be?