robotfindskitten (VWF version)

A place where you can keep others updated about your NES-related projects through screenshots, videos or information in general.

Moderator: Moderators

tepples
Posts: 22816
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

robotfindskitten (VWF version)

Post by tepples »

After reading about Scoth42's implementation of the Zen simulator robotfindskitten, I whipped up my own in a few days. But to avoid stealing his thunder, I delayed releasing it. I have decided that now is the time. Here it is, including 2-player support using a variable-width font all packed in a 4K engine. With this and byte pair encoding, an NROM-256 should be able to hold a large variety of NKIs.

Image
Screenshot

Questions? Comments? NKIs you don't understand? Additional NKI suggestions?
Attachments
robotfindskitten-day5.zip
robotfindskitten source and binary
(39.43 KiB) Downloaded 865 times
User avatar
NESHomebrew
Formerly WhatULive4
Posts: 418
Joined: Fri Oct 30, 2009 4:43 am
Contact:

Re: robotfindskitten (VWF version)

Post by NESHomebrew »

Nice work! I like the quotes :)
lidnariq
Site Admin
Posts: 11593
Joined: Sun Apr 13, 2008 11:12 am

Re: robotfindskitten (VWF version)

Post by lidnariq »

What keeps the number of on-screen NKIs limited to ≤ 31? How hard would it be to increase the number of on-screen NKIs further? (Maybe add a compile-time error if it's too big?)

I encountered an invisible NKI in a build with NUM_ITEMS=31 ... Don't know if I tickled that by increasing NUM_ITEMS or if its something more... (If it helps I have an FCEUX save state for it)
tepples
Posts: 22816
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: robotfindskitten (VWF version)

Post by tepples »

lidnariq wrote:What keeps the number of on-screen NKIs limited to ≤ 31?
Because I made them sprites to allow more colors in a small place. More than that would probably introduce sprite dropout by potentially putting more than eight on a line. So the RAM and VRAM layout does not anticipate more.
How hard would it be to increase the number of on-screen NKIs further?
I would have to cut colors by using background NKIs.
I encountered an invisible NKI in a build with NUM_ITEMS=31
Were there more than 8 things on one line in that run?
lidnariq
Site Admin
Posts: 11593
Joined: Sun Apr 13, 2008 11:12 am

Re: robotfindskitten (VWF version)

Post by lidnariq »

tepples wrote:Were there more than 8 things on one line in that run?
Nope, it was the only item on that line.
tepples
Posts: 22816
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: robotfindskitten (VWF version)

Post by tepples »

I figured out why NKIs after the first 15 would be invisible, and it has to do with how the robot and heart symbols are loaded. This would need me to redesign the VRAM allocation. For this, how high should one expect to push the NKI count?
lidnariq
Site Admin
Posts: 11593
Joined: Sun Apr 13, 2008 11:12 am

Re: robotfindskitten (VWF version)

Post by lidnariq »

I dunno, 24? 31? Is there a quantity between 16 and 31 at which the amount of effort increases?
tepples
Posts: 22816
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: robotfindskitten (VWF version)

Post by tepples »

I figured out what's causing items 16+ to be invisible and 32 to crash it. The line buffer used by the VWF code is 128 bytes (16 tiles) long, at $0100-$017F. Data written past $0180 never gets copied to VRAM, and data written past $01F8 overlaps return addresses. I changed load_item_shapes in bg.s to copy glyphs to VRAM after each line of 16, and it handled 27 NKIs with no sweat. Moving item_typehi and item_shape from zero page to BSS let me push 47.
Attachments
robotfindskitten-day9.zip
(39 KiB) Downloaded 801 times
JRoatch
Formerly 43110
Posts: 426
Joined: Wed Feb 05, 2014 7:01 am
Contact:

Re: robotfindskitten (VWF version)

Post by JRoatch »

tepples wrote:Additional NKI suggestions?
here's some I came up with. Also would you accept a image of a robot in the place where "titleguy" used to be?
Attachments
more-nki.txt
(1.98 KiB) Downloaded 738 times
tepples
Posts: 22816
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: robotfindskitten (VWF version)

Post by tepples »

Thanks for the NKIs. One was too long:

Code: Select all

This non-kitten item was present in a previous version, but has been removed.
Yep, you got me: the title screen code is cribbed from RHDE's help screens. I need to explore possibilities for what robot might look like: probably based on one of those 1-wheel robot designs. But adding robot would cause the engine to exceed 4096 bytes, something I had been trying to avoid.
lidnariq
Site Admin
Posts: 11593
Joined: Sun Apr 13, 2008 11:12 am

Re: robotfindskitten (VWF version)

Post by lidnariq »

Our of curiosity, why not include some NKIs from upstream?
tepples
Posts: 22816
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: robotfindskitten (VWF version)

Post by tepples »

A lot of items in default.nki are based on vanilla.nki, with a twist that ties them to the NES homebrew scene, to other popular culture, to my fetishes, or even just to a thread of plausibility. Each item is sort of a riddle, letting you play on two levels: finding kitten or figuring out what each NKI means. (If someone doesn't get one of these, I can explain if you find me in #nesdev.) Perhaps it's my way of opening up to the world. Here are hints:
  • There are lines taken from vanilla.nki but with allusions to other things added, like panda dogs, Xenu.net, cannabis, brain-computer interface, Futurama, South Park, The Care Bears Movie, Animal Crossing, Who Moved My Cheese?, Portal, Super NeSnake 2, Pokémon, Lagrange Point, Cookie Clicker, Blue's Clues, The Time Machine, and most of the games on the first two volumes of Action 53.
  • Instead of "It's Mary Poppins!" I have an artifact she might have left behind, which doubles as a Wii Play Motion allusion.
  • To "A flask of hydrochloric acid is here" I add what the HCl might be used for.
  • Instead of "It's a cat. Are you too late?" I have other animals whose young are called "kittens".
  • To "It's a Linux install CD" I add allusions to a couple distros.
  • Plenty of stuff derived from the world-building in the wiki on my web site.
  • Even the description for the other robot hints at why robot seeks kitten.
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: robotfindskitten (VWF version)

Post by mikejmoffitt »

tepples wrote:
How hard would it be to increase the number of on-screen NKIs further?
I would have to cut colors by using background NKIs.
Would anything stop you from placing NKIs using both background tiles and sprites? It seems like that could broaden available colors as well.
tepples
Posts: 22816
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: robotfindskitten (VWF version)

Post by tepples »

mikejmoffitt wrote:Would anything stop you from placing NKIs using both background tiles and sprites?
I see a few challenges:
  • I'm already using 128 tiles for the status. I might have to use sprite 0 to change to the other pattern table for background items.
  • I'd have to compensate for the misalignment between the 8-pixel-tall lines of the NES tile grid and the 7-pixel-tall game grid.
  • Adding a routine to draw the first few NKIs to the background would put it over 4K.
  • Going too far beyond 48 items might exceed the 2048-byte RAM budget. Currently I use 1024 bytes of RAM to shuffle up to 512 NKI text pointers, 384 bytes for transfer buffers (128 for VWF and 256 for OAM), 80 bytes for a text decompression buffer, 16 bytes for local variable space, and let's say a couple dozen bytes for miscellaneous game state variables. Each item takes 6 bytes for location, identity, and appearance.
JRoatch
Formerly 43110
Posts: 426
Joined: Wed Feb 05, 2014 7:01 am
Contact:

Re: robotfindskitten (VWF version)

Post by JRoatch »

I personally think 48 items is enough per level. The engine you have now is already quite good.

As for the 4k limit for the engine, I think it's not too far-fetched to consider the intro text as not part of the engine and compress it as non game NKIs.
Also if the master text pointer array grows too big or is too much in the way, there's the ram in the other unused nametable. I think it's only used to generate a new level during a screen blank, so it should work?
Post Reply