Making NES Kung-Fu

Topics related to the API, programming discussions & questions, coding tips, bugs, etc. should go here.
User avatar
D3thAdd3r
Posts: 3221
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Tutorial: How to make a game!

Post by D3thAdd3r »

Took me a while to figure out what you meant, played to the 4th level still didn't get what would be the problem...then I'm like oh yeah.. not used to thinking of the main character as tiles :lol: It would be nice to have a graceful way of doing sprite priority, otherwise we could easily do a hack too. A post vsync callback that runs through ram_tiles_restore searching for a ram tile that was blit over something besides that blue background tile. If so simply blit that tile(which must be of Thomas or stairs) back over the ram tile using the blue color as a color key. It essentially makes those objects a foreground. Maybe it would be scary looking to a newbie, but its really simple http://uzebox.org/wiki/index.php?title=Rtl_Foreground
User avatar
D3thAdd3r
Posts: 3221
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Tutorial: How to make a game!

Post by D3thAdd3r »

uze6666 wrote: So about 10 lines or 320 bytes or 5 ramtiles.
That would probably solve a lot of problems right there, mode 3 scrolling is way above my head at this point. I think we can use a vram of 24 in this game without sacrificing much and then the wasted vram on 256 byte alignment is not really an issue. Or did LDFLAGS += -Wl,--section-start,.noinit=0x800100 -Wl,--section-start,.data=0x800500 already accomplish this?
Attachments
kungfushortbg.png
kungfushortbg.png (2.89 KiB) Viewed 5345 times
CunningFellow
Posts: 1445
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Tutorial: How to make a game!

Post by CunningFellow »

A, Isn't a 16 colour mode just going to double your sprites straight away. Maybe its a thing to think about some more as well.

B, Hasn't this thread derailed very very badly and be likely to scare any newbies off. Maybe drag this thread to the programming section and restart a "how to make flappy bird" thread in the UCC section again.
User avatar
D3thAdd3r
Posts: 3221
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Tutorial: How to make a game!

Post by D3thAdd3r »

A-I can't figure out how to make that work, I have wanted and hailed it as theoretically awesome for a couple years now. I was counting on you ;)
B-Yes this is likely scary as hell to new guys and bugs could come from the ceiling just as well(though foregrounds are very simple to do)
C-I like scary stuff and always find a way to steer threads that direction, even when the point of the thread is to avoid it :oops:
User avatar
schepers_cp
Posts: 125
Joined: Tue Feb 04, 2014 9:48 pm
Location: netherlands
Contact:

Re: Tutorial: How to make a game!

Post by schepers_cp »

i totally agree with that this thread is scaring newbies off..
maybe we even need some subforums at a point:

in tutorials a new subsection:
-example tuts
(which contains more subsections for each tutorial of uzebox, where questions are asked and the source is a pinned topic)

example:

tutorials:
- example tutorials
- - flappy bird (All sources for the flappie bird tutorial and questions about it can be posted here)
- - - pinned topic: sources
- - - pinned topic: faq
- - <another game tutorial> (another tutorial topic description)
- - - pinned topic: sources
- - - pinned topic: faq

and so on~?

also, a link in the ucc challenge sub-forum to the tutorials section can be usefull at that point ;)
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Tutorial: How to make a game!

Post by uze6666 »

CunningFellow wrote:A, Isn't a 16 colour mode just going to double your sprites straight away. Maybe its a thing to think about some more as well.
For sure, but you know as me it's not trivial and has some tradeoffs. By using the DDRC trick of masking out all bits expect the MSBits of RGB and shifting we can make a 8 colors mode like mentionned earlier. But 8 colors is a tad low for me, but on positive side it would keep the same resolution. But the blitting function would also become much more complex and CPU intensive.
B, Hasn't this thread derailed very very badly and be likely to scare any newbies off. Maybe drag this thread to the programming section and restart a "how to make flappy bird" thread in the UCC section again.
Yeah, indeed. I though it would show what's going on when trying to start a new game. It's things one has to consider, but not for a newbie project, totally agree! :lol: But okay, I'm moving this to the programmings forums and change the title.
CunningFellow
Posts: 1445
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Making NES Kung-Fu

Post by CunningFellow »

Are we happy with 5 clocks per pixel 256 pixel wide with black borders?

Remember we now have timer interrupt ended scanlines so that saves time. Also 16 colour (4bpp) means half as many of those nasty lpm instructions.
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Making NES Kung-Fu

Post by uze6666 »

That would probably solve a lot of problems right there, mode 3 scrolling is way above my head at this point. I think we can use a vram of 24 in this game without sacrificing much and then the wasted vram on 256 byte alignment is not really an issue. Or did LDFLAGS += -Wl,--section-start,.noinit=0x800100 -Wl,--section-start,.data=0x800500 already accomplish this?
Yes, the LDFLAGS insures we don't waste a single byte due to alignment.
Are we happy with 5 clocks per pixel 256 pixel wide with black borders?
Remember we now have timer interrupt ended scanlines so that saves time. Also 16 colour (4bpp) means half as many of those nasty lpm instructions.
Even 6 cycles per pixels is plenty for me. The big problem I see with a 256 pixels screen is how are you going to do scrolling if you have no more memory left offscreen? Also, I'm curious to know the approach you plan because I've been banging my head for years on doing a palletized mode with flash+ram tiles and scrolling @ 6 cycles/pixels. For one, I can't see anything but a fixed 16 color global palette for sprites and background.
CunningFellow
Posts: 1445
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Making NES Kung-Fu

Post by CunningFellow »

I was assuming a global 16 colours.

I will get out my spreadsheet today and shuffle some numbers around.
User avatar
D3thAdd3r
Posts: 3221
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Making NES Kung-Fu

Post by D3thAdd3r »

It would be nice to have a compile time option to eliminate ram_tiles_restore, obviously trivial to implement. A lot of games can easily redraw the entire screen making it unnecessary and it gets us 1.5-2 ram tiles back. We should easily be able to redraw that blue background, the only place sprites ever go and we have to draw over Thomas' old tiles from last frame anyhow.
Post Reply