nesdev.comhttp://forums.nesdev.com/ WIP: Wizard of Worhttp://forums.nesdev.com/viewtopic.php?f=22&t=16172 Page 4 of 12

 Author: tschak909 [ Thu Jul 13, 2017 5:09 pm ] Post subject: Re: WIP: Wizard of Wor Thanks, but am using a special format here... One byte = a set of 9 tiles (a box) and any special functions it may have (4 of them) I'll just whip something up. p.s. First dungeon drawn, and placed a few sprites in to double check sizing and proportion!-Thom

 Author: tschak909 [ Thu Jul 13, 2017 10:03 pm ] Post subject: Re: WIP: Wizard of Wor I'm curious, how do you guys writing games in C keep score? WoW has a score max of 7 digits. which can't really be put nicely into a 16-bit quantity, but works well in a 24 or a 32 bit quantity..am curious if taking this pedestrian route is what's best here, or if somebody knows a more space efficient method?-Thom

 Author: rainwarrior [ Thu Jul 13, 2017 10:09 pm ] Post subject: Re: WIP: Wizard of Wor A lot of the time it's sensible to just store a score in decimal, rather than as a binary number that you'd have to convert, i.e. just store the 7 digit score as 7 bytes (each value 0-10) and write a routine that will add points to it (carrying anything that overflows 10 to the next one).

 Author: gauauu [ Fri Jul 14, 2017 8:39 am ] Post subject: Re: WIP: Wizard of Wor Also consider whether the lowest digits of the score are ever used. From a few google searches, it looks like the score increments by 100's. If that's the case, you don't need to store those last two digits.

 Author: Myask [ Sat Jul 15, 2017 4:17 pm ] Post subject: Re: WIP: Wizard of Wor Quote:Code:ULDR TSWX-------------0000 0000Having optimized cellular automata dealing with edges of squares, storing ULDR for every square is redundant; you only need to store DR, really.But your choice will leave you with much easier collision checks, and possibility of one-way passthrough walls.

 Author: tschak909 [ Sat Jul 15, 2017 4:47 pm ] Post subject: Re: WIP: Wizard of Wor I did consider storing only half of the data, but I liked the flexibility of storing everything. Right now, am doing little experiments on sprite updating and vram updating (score etc). Things will slow down for a bit while I get the hang of the hardware.-Thom

 Author: tschak909 [ Sun Jul 16, 2017 12:27 am ] Post subject: Re: WIP: Wizard of Wor I have placed the following disclaimer in my code:Code:/************************************************** * DISCLAIMER: This is not clean C code. It will  * * Never be clean C code. Everything here is done * * So that the result will either work, or fit    * * inside an NES, being that C was never an ideal * * language for the 6502. It is honestly a minor  * * miracle that CC65 exists and that it does as   * * well as it does. It is a testament to the      * * CC65 engineers to want to produce more than    * * a pidgin C compiler. Hats off to them, really. * * -Thom Cherryhomes 07/16/2017                   * **************************************************/-Thom

 Author: tschak909 [ Sun Jul 16, 2017 1:41 pm ] Post subject: Re: WIP: Wizard of Wor Can somebody with an NTSC NES and a CRT monitor/tv please send pics of the three screens in this attached test ROM? am curious. -ThomAttachment: wow_screentest.nes [24.02 KiB] Downloaded 128 times

 Author: rainwarrior [ Sun Jul 16, 2017 4:47 pm ] Post subject: Re: WIP: Wizard of Wor tschak909 wrote:I have placed the following disclaimer in my code:To be honest, it seems unnecessary to apologize for "unclean" code in a game.A source code library should have clean code because the product is the code, and the users/customers are programmers.With a game, though, the product is the game itself, and the customer is only a player. The cleanliness of the code is an internal implementation detail.A clean code base is nice for the person who works with it, but it's normal to make at least a little mess in the process of developing and trying things. Cleanup takes time (and money), so it's pretty reasonable to not do it if the game is ready to ship.Anyhow, I'm not saying you shouldn't strive to write clean code. It's well worth developing good code practices. Just I don't think there's any reason to feel shame for making a compromise in that respect.tschak909 wrote:Can somebody with an NTSC NES and a CRT monitor/tv please send pics of the three screens in this attached test ROM? am curious.Several emulators have good NTSC emulation (often derived from Blargg's implementation), usually it's called a "filter". In FCEUX you can find an NTSC filter option under Config > Video, for example, but most emulators seem to have a similar option somewhere.That emulation will show you pretty well what the NTSC signal does to fuzz up the picture.The ways in which a CRT itself are different can't really be expressed well by taking a picture of a television. Mainly this has effects of overall brightness/gamma and saturation, and the "scanline" thing, but it doesn't really do much to degrade the image in ways that emulation of the NTSC signal alone won't.(I don't currently have a CRT or I'd take a picture myself to show you, but in the meanwhile I'd recommend trying the emulated options.)

 Author: tschak909 [ Sun Jul 16, 2017 7:47 pm ] Post subject: Re: WIP: Wizard of Wor sigh. ... (a) you missed my point on the disclaimer, but that's ok.(b) I'm using blargg's filters in FCEUX. I'm just curious as to how the result frames on a tube.-Thom

 Author: rainwarrior [ Sun Jul 16, 2017 8:14 pm ] Post subject: Re: WIP: Wizard of Wor Ah, well sorry for misinterpreting, in light of how I must now reinterpret it I hope I didn't come across as patronizing.