It is currently Mon Oct 23, 2017 3:49 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Tue Oct 21, 2014 5:13 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19122
Location: NE Indiana, USA (NTSC)
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:
File comment: robotfindskitten source and binary
robotfindskitten-day5.zip [39.43 KiB]
Downloaded 190 times
Top
 Profile  
 
PostPosted: Wed Oct 22, 2014 9:51 pm 
Offline
Formerly WhatULive4
User avatar

Joined: Fri Oct 30, 2009 4:43 am
Posts: 336
Nice work! I like the quotes :)


Top
 Profile  
 
PostPosted: Wed Oct 22, 2014 10:42 pm 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6303
Location: Seattle
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)


Top
 Profile  
 
PostPosted: Thu Oct 23, 2014 4:57 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19122
Location: NE Indiana, USA (NTSC)
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.

Quote:
How hard would it be to increase the number of on-screen NKIs further?

I would have to cut colors by using background NKIs.

Quote:
I encountered an invisible NKI in a build with NUM_ITEMS=31

Were there more than 8 things on one line in that run?


Top
 Profile  
 
PostPosted: Thu Oct 23, 2014 11:38 am 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6303
Location: Seattle
tepples wrote:
Were there more than 8 things on one line in that run?
Nope, it was the only item on that line.


Top
 Profile  
 
PostPosted: Thu Oct 23, 2014 3:47 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19122
Location: NE Indiana, USA (NTSC)
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?


Top
 Profile  
 
PostPosted: Thu Oct 23, 2014 4:07 pm 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6303
Location: Seattle
I dunno, 24? 31? Is there a quantity between 16 and 31 at which the amount of effort increases?


Top
 Profile  
 
PostPosted: Thu Oct 23, 2014 7:30 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19122
Location: NE Indiana, USA (NTSC)
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 151 times
Top
 Profile  
 
PostPosted: Mon Nov 03, 2014 7:59 pm 
Offline
Formerly 43110
User avatar

Joined: Wed Feb 05, 2014 7:01 am
Posts: 311
Location: us-east
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 106 times
Top
 Profile  
 
PostPosted: Mon Nov 03, 2014 8:39 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19122
Location: NE Indiana, USA (NTSC)
Thanks for the NKIs. One was too long:
Code:
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.


Top
 Profile  
 
PostPosted: Mon Nov 03, 2014 9:13 pm 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6303
Location: Seattle
Our of curiosity, why not include some NKIs from upstream?


Top
 Profile  
 
PostPosted: Mon Nov 03, 2014 10:15 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19122
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
PostPosted: Sat Nov 08, 2014 10:06 pm 
Online
User avatar

Joined: Sun May 27, 2012 8:43 pm
Posts: 1308
tepples wrote:
Quote:
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.


Top
 Profile  
 
PostPosted: Sat Nov 08, 2014 10:30 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19122
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
PostPosted: Sun Nov 09, 2014 7:34 pm 
Offline
Formerly 43110
User avatar

Joined: Wed Feb 05, 2014 7:01 am
Posts: 311
Location: us-east
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group