Wednesday, May 9, 2007

Choices

I spent a lot of yesterday and this morning thinking about how to have disappearing foodstuffs, and as I sit down to write this, I actually came up with how to do it! This is what blogging is all about!

I was planning on having palette cycling for the conveyor belts (DMEnduro's idea, as mentioned in my first post) as well as for appliance steam and possibly for the sous-chefs' animations. So why not have poofs of smoke (palette cycled) as each food item disappears? This will certainly add an aura of mysticism to the proceedings, which is highly appropriate given that the Sphynx from Wonderboy in Monsterland is Chairman Kaga's analog in this game. (I was thinking - who is weird and has a kick-ass outfit?)

The other idea I had involves heavy compromises and lots of work, and might not solve the problem of excess VRAM updates. It involves keeping the code for animating player 1 untouched (the six tiles appropriate to the character's direction and animation frame are loaded into VRAM) , while for the other player, all possible tiles are loaded into VRAM. The latter case is how I had initially coded the animation, but with 6 tiles per player, 8 possible directions and 3 animation frames, for two players that added up to 288 spots in VRAM taken up. Oops. But I already have this code. This would limit the number of foods to 26.

The more I think of this other option, the less I like it. I want a fairly broad palette of foodstuffs so it'll be hard to make the same dish twice. Plus, as I mentioned, I like the smoke.

Tuesday, May 8, 2007

That will bring us back to d'oh.

I hardware-tested a version of my rom with a single food belt, along with player 1, 2, and the belt's VRAM updates all de-synchronized - I'm not even throwing in the second belt here. And whenever one player does tight little circles, the food graphics get garbled. I haven't even tested player 2 moving.

This forces me to come up with another mechanism for food availability. I was thinking of having a magic pantry, where food disappears after some time. Foods could be tiles until they were picked up. I could decrease the length of that interval as the game progresses to increase difficulty.

Anyone out there have any Wonderboy in Monsterland game saves? I need to do some research...

Saturday, May 5, 2007

Video Killed the Lazy Coder

What a week! I hardly had any time at work for lunch, which is when I do most of my productive coding (I don't eat lunch, so food doesn't slow me down - ironic for what I am actually coding). Then I had long rehearsals (I sing) on three nights. Not my best coding week.

But I did get the video up. Thanks, anonymous! In case you're interested, eSMS 1.04 works great for recording videos. I just wish I remembered the codec that worked.

The bizarre bug with diagonally-moving players is not an issue on real hardware, since I checked using my Tototek cartridge on my Master Gear/Game Gear. By the way, I get a Software Error on my SMS when I use the Tototek cartridge - I think it might be problem with the physical dimensions of the cart's PCB. But I can try running this on my Power Base Converter, since I have used the Tototek cart on that successfully.

I did begin trying to get the second conveyor belt up and running, but I always have trouble remembering how it works. I have all of the coordinates for belt 1 in the rom (belt 2 uses the same coordinates, of course, except the x coordinates are shifted to the right), and the program just cycles through them. When it reaches the end, it shifts all of the food identities down one and adds another after accessing the random number generator. But my code is getting a tad unwieldy, and it is getting really hard for me to throw stuff in. Did I mention the only formal computer training I have is:
  1. A computation biology course I took in grad school where I learned how to use BLAST and Expasy and a couple of DNA and protein sequence analysis programs (that other people wrote) and
  2. A LOGO course in high school?
So it might take a while, but I'll get it.

You'll notice in the video that I have no code that checks whether a food type is already present on screen. That function is definitely on my to-do list.

I hope you enjoy the video. You might notice some 1's and 0's on the top of the screen; those are just for debugging purposes. Pay no attention to the man behind the curtains.

Monday, April 30, 2007

Crying Wolf

Imagine me trying to capture a screenshot to prove this weird bug I mentioned in my first post. Then picture me realizing that emuKon wasn't going to have anything to do with screen captures, and instead loading up Meka. Finally, picture me trying to have both characters assert a diagonal direction while my wife had her fingers primed to press SHIFT and PRTSC, while I tried combination after combination of diagonal directions, until I realized that there was no problem if I used Meka. I think I am going to have to plug my SMS into a TV and try this out on real hardware.
By the way, I can't seem to get emuKon to capture videos, though this might be solved by reading the manual. In the meantime, enjoy the screen capture. There are two more characters already done (gold stars if you guess correctly!) and a total of 41 foods completed.

Sunday, April 29, 2007

Welcome and Master Chef overview

Welcome to my blog! I'll warn you that the purpose of this blog is self-indulgent: it's really mostly for airing thoughts (mostly half-baked) out into the ether in the hopes that this process will aid in their development. Secondly, the presence of an audience (likely imaginary) is a way to trick myself into feeling some sort of accountability for my SMS projects.

That's okay. As far as I can tell, most blogs are self-indulgent anyway. I would hate to pollute the development forum at SMSpower with my dribble, so here I am. Incidentally, if you really are interested in developing for the SMS, you should check out smspower.org/forums/development, as well as the whole smspower.org website.

Right. You've cleared those first two paragraphs, yet miraculously, your interest is unabated. I might as well talk about the main project I am working on: Master Chef.

In the autumn of 2002, after my evil grad school (rhymes with Wail) was so evil I could take no more and quit, I spent, oh, six hours a day playing Puyo Puyo 2 on my Game Gear. I started thinking, why are all puzzle games pretty much a variant of Tetris? No disrespect towards PP2, which obviously I love, but can't there be more variations? This was five years before I discovered Twinkle Star Sprites, so forgive my ignorance.

Anyway, at the same time I became obsessed with Iron Chef. So I thought, why not a Master System game with the same idea: a cooking competition? Thus, Master Chef was born.

Two players enter (I may someday add AI for solo playing); two players leave with steaming hot plates of food. Two conveyor belts convey pseudo-randomly selected raw food items (though nothing will stop one player from taking the other player's foods). Additionally, a table with a limited number of the "secret ingredient" will be available - every dish requires this ingredient. Players take raw food items to appliances or a sous-chef for frying, baking, roasting, chopping, etc. Every raw food has stats - sweetness, sourness, savoriness, texture, etc. - and the various cooking processes alter these stats. Mixing food items will also alter the stats. This should result in an infinite variety of final dish possibilities.

So, where am I right now? Well, I have two fully animated characters controlled by two players. I have one procession of foodstuffs (the conveyor belt will be palette cycled background tiles - an idea contributed by my brilliant graphic artist collaborator, DMEnduro).

What I am working on right now is decreasing the number of writes to VRAM to avoid graphical glitches. As you probably know, the SMS VDP is pretty sensitive to VRAM writes - I learned this in a really brutal manner when I spent six months working on a game that updates the entire screen every frame before I realized the VDP is not up to the task. Anyway, I have eliminated all glitches except when one player makes tight little turns (and probably a second as well - I've been testing on a Game Gear).

I decreased the number of foods per conveyor belt and am now including a check for whether y coordinates need updating and a separate one for x coordinates. This should help.

But a bug came to light - basically, there are some diagonal directions that are impossible with both players. It's all very complicated, and I am going to have to sit down and tabulate which ones don't work. I'll get that in my next post. I will also try to grab a video using emuKon (which I think can make videos) and try to post it using youtube, which seems to be what all the kids are using these days.