[stella] Healthbars Demo

Subject: [stella] Healthbars Demo
From: "Christopher Rydberg" <solitaire0@xxxxxxxxxxx>
Date: Wed, 03 Oct 2001 11:56:54 +0000
Hey all,

This is my first go at a health bar routine based on everyone's suggestions to my post (Generating a health bar without ruining your health...). I made use of the Roger Williams/Glenn Saunders asymetrical playfield post (DD_0003, I think) and made some minor alterations. I added a few NOPs to the drawing routine to make up for lost cycles from my different addressing mode and put in two more during the second PF2 write area to fix an overlapping problem. I also wrote up some code to build the PF variables from two easily adjustable variables called HealthP0 and HealthP1. In the real game I will adjust these based on collision, but since this is a demo to show off health bars and I needed to know that they worked OK. That in mind I moved the alteration of the HealthPX variables to the joystick area of the code. If you push right, the left health bar will decrease. If you press left, the right health bar will decrease.
My next question is, is this code effecient? I have almost no programming experience in this arena and this is my first real bit of completed original (sort of) code. If anyone out there would take the time to critique the code a bit I would really appreciate it. I will of course do so myself, but I thought this would make a nice little demo for future generations to enjoy so I went ahead and posted as soon as it was complete. My future alterations will be mostly stylistic and have to do with fitting it into DoDaT (Duel of Dragon and Tiger) so it seemed better to post it now while it was clean and readable. Thanks for any reply and also thanks to everybody for the suggestions. After reading through them the code just flowed out of me. It took me only a few minutes to write before I headed off to work and then a few more to debug after I got home. The attached zip has the source in a .txt file and the .bin. Later all.

Christopher Rydberg solitaire0@xxxxxxxxxxx afterlife.0catch.com

Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/

Current Thread