How to Create Ranger X Style Lighting Effects for Sega Genesis & MD - Beginner Game Dev Tutorials

Поделиться
HTML-код
  • Опубликовано: 3 окт 2024

Комментарии • 64

  • @GimblyGFR
    @GimblyGFR 6 месяцев назад +2

    Thank you very much for this video. I was not aware of the 15th color bug on the S/H mode. This episodes dedicated to transparencies are my favorite so far. Excellent job, Pigsy. Also, thanks for helping me discover 16Tile!

  • @marcianzero_yt
    @marcianzero_yt 6 месяцев назад +10

    It is beyond me, that YT hasnt promoted this channel a lot more. Super-interesting information well prepared and presented.

    • @PigsysRetroGameDevTutorials
      @PigsysRetroGameDevTutorials  6 месяцев назад

      Thanks for the kind words. Developing games for a 30+ year old console is a pretty niche topic, so I'm not expecting Mr Beast numbers, haha

    • @turboemerald9228
      @turboemerald9228 2 дня назад

      makes me wish for more tutorial series like this for other consoles

  • @malloid
    @malloid 6 месяцев назад +12

    It's a pity many devs back in the day didn't bother to use these effects in their games. Many just used stippling, as you know. The same on the Sega Saturn. I've been playing a few Saturn games recently, and many use stippling instead of transparencies.

    • @videogamemusicrenditionsby7625
      @videogamemusicrenditionsby7625 6 месяцев назад

      I aske myself the same, why did they never use such techniques back in the day...

    • @PigsysRetroGameDevTutorials
      @PigsysRetroGameDevTutorials  6 месяцев назад +9

      There are quite a few examples. Later this year I plan to release a video showcasing what I think are the best uses of the mode in 80/90s commercial games

    • @jc_dogen
      @jc_dogen 6 месяцев назад +6

      because it looked fine over composite or rf and doesn't restrict your colors.
      Saturn has a whole different problem in that sprites will erase other sprites if they're transparent and there's a flag to turn on the mesh mode so it's extremely simple to use. It being a flag also makes it easy for emulators to turn into real transparency.

    • @GreyMatterShades
      @GreyMatterShades 6 месяцев назад +1

      @@jc_dogen As I understand it, the Genesis/MD also has that problem of sprites with shadow or highlight transparencies erasing other sprites when they overlap.

    • @shukterhousejive
      @shukterhousejive 6 месяцев назад +1

      @@GreyMatterShades It's a common thing with most sprites on consoles, every sprite is painted over the previous one so unless you find a way to do things in software it won't work. The Saturn has that cool trick where you render out a mask layer in sprites and DMA that over to a tile layer but that still has limitations

  • @KingGameReview
    @KingGameReview 6 месяцев назад +4

    Ranger X is one of my favorite Genesis games. Super underrated.

  • @lancelnce
    @lancelnce 6 месяцев назад

    Amazing! I didn't knew the Mega Drive could do that

  • @PhoticSneezeOne
    @PhoticSneezeOne 6 месяцев назад +6

    Maybe highlight-/shadowmodes could be used for a more convincing waterfall effect by alternating highlighted and shadowed structures. Would that be possible?

    • @PigsysRetroGameDevTutorials
      @PigsysRetroGameDevTutorials  6 месяцев назад +2

      Maybe, but remember that with the background based version you are limited to 8*8 tiles, you can't do it on a pixel by pixel basis. Because of that it may end up looking a little blocky (if I'm correctly understanding what you are suggesting)

    • @PhoticSneezeOne
      @PhoticSneezeOne 6 месяцев назад

      @@PigsysRetroGameDevTutorials Ah, i forgot about the 8x8 tiles limitation! So there´s only the option to ad additional structures via normal intransparent/fully transparent graphics on top of the shadowed/highlighted area.

  • @videogamesandfilm6821
    @videogamesandfilm6821 6 месяцев назад +1

    great tutorial again mate, thanks for the info.

  • @GreyMatterShades
    @GreyMatterShades 6 месяцев назад +3

    Nice! Seems like Background S&H mode is less limited than I'd originally thought. I heard people say you can't use BGS&H with both background layers, and I interpreted that as you would literally only be able to use one background layer (which was reinforced by the fact that many genesis games that use BGS&H seem to use one layer for only the S&H effect). It's good to know that you can still use background tiles on that layer, they can just can't really be affected by S&H.
    Shame they didn't implement some sort of command where you could set high-priority tiles on that layer to pertain to S&H instead of actual priority. Would've made it more versatile. Still, this could be put to good use in the right circumstances.

    • @PigsysRetroGameDevTutorials
      @PigsysRetroGameDevTutorials  6 месяцев назад +2

      I was under the same misapprehension until I played Ranger X and saw that they were using foreground graphics as well as highlights.
      Each tile has a limited number of bits which store info about its colour, priority etc. I guess they simply didn't have the space for a separate flag for s&h and so just used the priority bit instead

    • @GreyMatterShades
      @GreyMatterShades 6 месяцев назад

      @@PigsysRetroGameDevTutorials Each tile having a limited number of bits makes sense, but I still feel like they could've included an optional command that would reinterpret high/low priority to ONLY apply to S/H. Doing so would limit how much you could play with background layers (BG_B tiles would always be behind BG_A), but it would allow opaque tiles to both be highlighted and highlight sprites without being put in front of the sprites, negating the need to use sprites to replace background tiles like you needed to in this video.
      Oh well, just another quirk/limitation to work around; and that's the fun part, right?

  • @inceptional
    @inceptional 6 месяцев назад +3

    This is one of those interesting Genesis features that's a lot more capable than many people think and also a lot less capable than many people think.
    With the bit where you used black sprites to fill in the wall so the player can still be highlighted by the light beam and not look like they are passing behind the wall, you should have made those black tiles gray, just so they too would clearly look like the light is lighting them up. That would have sold the effect properly there imo. But I think most people will understand that would be needed there anyway, so I'm just pointing it out in case anyone thinks it looked a bit strange and assumed it's a limitation of the effect when it's not.
    Also, regarding managing sprites used to fake background layer elements, you have to be careful not to use too many sprites for this not just because of the max sprites on-screen limit but also because of the max sprites per scanline limit, which is probably even more important in avoiding flicker in most use cases. I think you used maybe 40 sprite pixels horizontally there in your example, so that would leave 280 sprite pixels horizontally to play with before flicker would occur. So that's a good use of this sprite-based fix imo.

    • @PigsysRetroGameDevTutorials
      @PigsysRetroGameDevTutorials  6 месяцев назад +4

      Now that the tutorials are out, I'm looking forward to seeing what people manage to achieve using the effect

    • @inceptional
      @inceptional 6 месяцев назад +2

      @@PigsysRetroGameDevTutorials I expect they could do some pretty cool stuff if they get creative, especially if they combine shadow/highlight on both the backgrounds and sprites, being careful around the limitations there. I can certainly think of a few potentially cool uses.
      PS. One simple but cool example for the video you're planning on making showing off the best uses of shadow/highlight would be the torches on some of the enemies on the first level of The Adventures Batman and Robin.

    • @inceptional
      @inceptional 6 месяцев назад +4

      @@PigsysRetroGameDevTutorials By the way, someone needs to make a series of videos like this for SNES too that show off examples of how to use all its modes and effects for both backgrounds and sprites with a modern understanding and deep knowledge like you are doing for Genesis.
      Retro Game Mechanics Explained has a truly great series that demonstrates how all the SNES' features work technically, but he doesn't have any new examples to show really creative ways to use these tricks beyond the mostly obvious/typical stuff, and certainly not in cool modern ways that most people aren't aware of.
      Loads of potential there for a really good series of videos for someone who can do such things me thinks. I mean, I've actually done plenty of that myself on my own channel, but most people just deny my stuff is possible because I'm not running it directly on SNES, despite it basically all being entirely possible. Someone like you doing it directly on SNES though, that would make it totally legit. And that I would love to see.

    • @GreyMatterShades
      @GreyMatterShades 6 месяцев назад +1

      @@inceptional I'd love to watch a comparable series on the SNES. I think the big reason why it hasn't happened is that (afaik) it doesn't have an SGDK equivalent and most people don't want to code in Assembly.
      Also, I just discovered Retro Game Mechanics Explained a few days ago, and I'm loving that channel so far. Wish he did more Genesis stuff, but it's been cool watching some of the SNES videos too.

    • @inceptional
      @inceptional 6 месяцев назад +2

      @@GreyMatterShades "I think the big reason why it hasn't happened is that (afaik) it doesn't have an SGDK equivalent and most people don't want to code in Assembly."
      Yeah, that seems pretty much spot on to me.

  • @flaviatatiana1953
    @flaviatatiana1953 6 месяцев назад +4

    Ristar do the raylight trick before the first boss fight.

  • @panzerdragonlegend6664
    @panzerdragonlegend6664 6 месяцев назад +1

    Pigsy's in the dark of the night a light does not guide and your lighting is perfect

  • @guillaumenunes9319
    @guillaumenunes9319 6 месяцев назад +1

    You are an example for all of us.

  • @brazilmugenteam
    @brazilmugenteam 6 месяцев назад +2

    Really thanks for such cool video

  • @GreyMatterShades
    @GreyMatterShades 6 месяцев назад +3

    Quick question, could you make BG_B your S&H background layer?
    It might limit what you can do in some ways, but it could also open up some benefits. In your example rom, the section where there's a light in front of the foreground building could be a transparent section of BG_B (showing the background colour, which could be set appropriately), which would allow the sprite to appear highlighted in that area rather than being blocked by high priority background tiles (and without having to resort to using sprites). Of course, you'd have to completely reorder how you made the background if you were using BG_B for S&H, but it might be cool to have the option, and work better for some environments/situations.

    • @PigsysRetroGameDevTutorials
      @PigsysRetroGameDevTutorials  6 месяцев назад +1

      With the way the priority works I don't think that would be possible, but it might be worth giving it a try to find out for sure

    • @zabustifu
      @zabustifu 6 месяцев назад +1

      I'm not sure I see what you mean, but to clarify, there's no such thing as an S/H background layer. S/H mode is either enabled or disabled for the whole scene. Then you can only play with tile and sprite priorities.

    • @GreyMatterShades
      @GreyMatterShades 6 месяцев назад

      @@zabustifu Ah, I think I understand, thanks!
      So if I'm understanding correctly, if I set tiles in BG_B to high priority, they would highlight any BG_A tiles with low priority that they overlapped, correct?
      Also out of curiosity, can S/H be enabled or disabled during a horizontal interrupt, making it apply to, say, the bottom half of the screen only? If so, would I have to do that by setting a variable in the S/H enabling code which I could define as TRUE or FALSE, or could I alter the code directly (or just include that line to enable or disable the S/H mode in the code that's executed during the interrupt)?

    • @GreyMatterShades
      @GreyMatterShades 6 месяцев назад

      @@PigsysRetroGameDevTutorials Thanks, I appreciate the response. I'll try playing around with it, but I'm waaaaaay behind in the tutorials, so I should really catch up first 😅

    • @zabustifu
      @zabustifu 6 месяцев назад +1

      @@GreyMatterShades Yes, a BG_B tile with high priority will highlight any BG_A tiles with low priority, ie: it will show the BG_A tiles with regular colors instead of darkened colors. About S/H mode, yes, you can toggle it on horizontal interrupts (this is done in the mirror room of Castlevania Bloodlines, for example). I'm not sure what you mean with "alter the code directly", but with the SGDK, you'd call VDP_setHilightShadow(bool);

  • @j.c.denton5967
    @j.c.denton5967 6 месяцев назад

    Would it be possible to sacrifice a background layer and use it as a glorified sprite so the transparency effect works on sprites? For example, the skull enemy from Symphony of the Night. Instead of him being a sprite, have him be a background layer so the transparency effect properly overlaps sprites like Alucard. Similar to how the SNES would use the single mode 7 background layer as a sprite for it's scaling effects.

  • @mechazone
    @mechazone 6 месяцев назад +1

    You mentioned that you can get some strange display issues with sprites on a background larger than 512. My test BG is much wider and I get a weird thing with sprites where the sprite appears multiple times horizontally. Is this the issue you are referring to? I am SUPER curious how to fix that. It's driving me crazy.

  • @denraimei32
    @denraimei32 6 месяцев назад +1

    Whatever happened to the asset links you provided?

    • @PigsysRetroGameDevTutorials
      @PigsysRetroGameDevTutorials  6 месяцев назад

      I thought that people were just using their own game assets at this point, but I can include if they are still useful

  • @EddieCervantesFilms
    @EddieCervantesFilms 6 месяцев назад

    Nothing to do with lighting effects, but I do wonder why S&H was never used for the character selection screens in games like Mortal Kombat to improve color.

    • @litjellyfish
      @litjellyfish 6 месяцев назад +1

      Cart memory I guess.

  • @peacefulscrimp5183
    @peacefulscrimp5183 6 месяцев назад

    🤷 if you're just trying to get more clicks and pump up your channel's watch time numbers, mentioning ranger x is going to get my attention every time 👍

  • @WiLLiW_oficial
    @WiLLiW_oficial 6 месяцев назад +3

    first!