Saturday, May 12, 2007

Let's do it, let's Burning Rangers

I just finished removing most of my conveyor belt code, except for the random number generator and associated morsels which will be necessary for the magic food table. Yes, I know that took longer than it should have; I was busy again at work. Plus, I needed to give some thought to how exactly I wanted to set the new code up.

There will be a table for each player. Foods will be selected randomly, again, and each will disappear independently- I will use my trusty 3-bit counter so every 8 IRQ counts the random number generator will determine whether each food remains or is replaced. I will tweak the random number generator to prevent every food from disappearing - I suspect something much less than a 50% chance of the food vanishing would be appropriate, though the rate could increase as the game progresses to increase difficulty. Then the raptured foods will be replaced with the smoke tile. Every spot with smoke will have to be synchronized, which is a shame, but otherwise I would be using up too many colors on the palette.

Okay, so the other thing that kept me busy this week was playing some games. But that's totally research for a game developer. And I will tell you what I learned, to prove the point.

I've been playing Phantasy Star Universe, mostly because nearly all the family I have in this hemisphere and some friends are all on it, and because it is a good game, for an MMORPG. But, being an old games connoisseur, a spot in my heart had always ached for the days of Phantasy Star Online (which I used to play with the same crew). So I booted up my Dreamcast and logged on to Schthack's server (http://www.schtserv.com/). I was just playing on my own, which was boring enough - the game is really not optimized for offline play. But the other thing I noticed is some serious frustration with the controls. Though a very complex game with a formidable learning curve, PSU has quite intuitive controls. PSO version 2, on the other hand, really shows a great lack of control optimization, even though it was a huge step up from the original version 1!

So, lesson 1: spend the time to make controls intuitive. I did have a visceral dislike for the learning curve of PSU, but it is a complex game, so I can forgive it. But the controls are pretty decent. My plan for Master Chef is to have one button do everything. I like simple games - Crazy Taxi is one of my favorites. But it plagiarizes, in a way, a Saturn game called Courier Crisis. You go around on a bicycle, picking up packages and dropping them off. The difference between this game and Crazy Taxi is, whereas in the latter you brake, accelerate, go forwards and backwards, and steer, in the former, every single button on the Saturn pad is used. Eight buttons and the D-pad!! So two games, similar themes, but one is a favorite and the other a total mess.

Another thing I learned: I downloaded a quest because this was something I had never gotten around to doing in my PSO heyday, and I happened to have a nearly empty VMU sitting around. I ended up serendipitously downloading the Burning Rangers quest. I always liked Burning Rangers until I read someone call it very ugly. Then I remembered - it is probably Sonic Team's most hideous game. Just awful. But pretty soon after reading that statement, I booted it up and started playing again. Yes, it is a terrible-looking game, but it has so much going for it that that doesn't matter! Novel gameplay, including the vocal guides, set it apart as a worthwhile game. So, while I don't think that novelty alone is going to make a graphically unimpressive game (like nearly anything I could cook up on the SMS), I think that the game industry has always had a tendency to beat the same gameplay ideas into the ground, leaving a lot of possibilities unexplored. Nintendo DS developers are really venturing into this unchartered territory with their lovely, original games, but I think there's still a lot of room out there for SMS developers to come out with new ideas.

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.