Jump to content
IGNORED

Stickman! (INTY Basic)


Recommended Posts

Long story short, no, you can use all 16 colors in a GRAM-defined MOB. Take a look at the register description. Your value of (256+53)*8+9 gets placed into the A register for a MOB. Let's look at it in detail:

 

256 is simply a trick to specify the GRAM bit (bit 11, we'll get to how it does this in a second). 53 is the GRAM card number. When you add those 2 together, and then multiply by 8, this shifts all of those bits over by 3 - in other words, to their correct positions (bit 11 for GRAM flag, and bits 10-3 for the card #). +9 sets the FG color for the mob - except there's a problem. The FG color bits are spread out, with bit 3 of the color being at bit 12, and bits 2-0 being where you'd expect them to be given that +color syntax.

 

Now, the consequences of this are as follows:

 

1. *16 will shift everything over one bit too many. So not only are you no longer selecting from GRAM - which means you're getting a GROM card - AND the card number is twice what you specified. Basically it's a crapshoot as to what happens - especially if you overflow into other bits. Don't do this :)

 

2. +9 to set a color will not work. To use the first 8 colors (black through white), you can just add the color. +1, +2, etc all the way to +7. HOWEVER - if you want to use the higher colors, you need to account for bit 12. Which means "ugly" values. If you're trying to use color "9" (cyan), you want to +$1001. This makes sure all 4 color bits are set properly.

 

Tarzilla has a nice layout of CONSTs that he uses specifically because of this issue. No more magic numbers in the code. I'm gonna shamelessly copy them here and he can yell at me for copyright infringement later :) You'll notice that the first 8 colors are just 0, 1, 2 etc. He put then in hex for consistency but there's no actual need to. 0-9 are the same in decimal or hex.

 

CONST X_BLK  = $0              ' Black
	CONST X_BLU  = $1              ' Blue
	CONST X_RED  = $2              ' Red
	CONST X_TAN  = $3              ' Tan
	CONST X_DGR  = $4              ' Dark Green
	CONST X_GRN  = $5              ' Green
	CONST X_YEL  = $6              ' Yellow
	CONST X_WHT  = $7              ' White
	CONST X_GRY  = $1000           ' Grey
	CONST X_CYN  = $1001           ' Cyan
	CONST X_ORG  = $1002           ' Orange
	CONST X_BRN  = $1003           ' Brown
	CONST X_PNK  = $1004           ' Pink
	CONST X_LBL  = $1005           ' Light Blue
	CONST X_YGR  = $1006           ' Yellow-Green
	CONST X_PUR  = $1007           ' Purple
At least, that's my guess from what you've described. I haven't looked at your code at all.
I can't take credit for the constants, they come from one of the samples provided in the early days of Intybasic, they are damn handy
Link to comment
Share on other sites

stickman can move slightly over the hole and still not fail.

I don't really know how to solve that one. It's that way because Stickman could have his leg out depending on what frame of animation he stops at like that. I worked on this for a few hours and I changed a few things. There's now a cloud that goes by to give you another sense of how fast you're going.

platform4.bin

Link to comment
Share on other sites

OK, I understand now. I changed everything to work good and added a title screen. It is clear I am going to need more than just 16k for this one. Looking at the INTV Basic manual, it says I can add "ASM ORG $D000" for more room. Would I put this at the beginning of my code? And would that make my game 32k?

 

Here's how this works. By default, you're starting at the address $5000. Which will give you 8B words, or 16KB. Inserting ASM ORG $xxxx in your code means that everything AFTER that code will be placed at whatever address you specify. So - yes, you could put that at the beginning - although I wouldn't use $0000. If you use $C100 instead, you'll get *almost* 16K words, or 32KB. Here, again blatantly stolen, is my "cheat sheet" for this stuff, which is the simple version that maxes out at 49K words, or 98KB (this time thanks to intvnut):

 

$2100 - $2FFF ; 4K words, minus 256 words

$4800 - $4FFF ; 2K words

$5000 - $6FFF ; 8K words

$7100 - $7FFF ; 4K words, minus 256 words

$8100 - $BFFF ; 16K words, minus 256 words

$C100 - $FFFF ; 16K words, minus 256 words

 

The first value is the address you'd use in an ASM ORG statement.

 

Now - these statements can be placed "anywhere" within your code, as needed. The only caveat that I'm aware of is that you can't place one within a PROCEDURE (a routine cannot span 2 address ranges). Beyond that it's entirely up to you. Figuring out *where* to place them can be tricky - I just stick my thumb in the air usually. You can look at the stickman.cfg file and try to suss out how big the code is, you can generate assembler lst files which will tell you exactly which addresses go where... or you can just play the safe route. Put all of your code up top, and DATA/BITMAP/SCREEN/MUSIC/VOICE lines at the bottom (these tend to take up the most space). Put ASM ORG $C100 in between them. That will give you just under 24K words, or 48KB. Which is a pretty beefy game.

 

Oh, and you'll know when you're "run out of space" - the program will compile and assemble with no errors, but when you try to run it, black screen on the emulator. It's a dead giveaway that it's time to insert and/or move an ASM ORG statement :)

Link to comment
Share on other sites

I can't take credit for the constants, they come from one of the samples provided in the early days of Intybasic, they are damn handy

 

Take credit for sharing them, then :) Because while I don't use many of them (I'm oldschool and like seeing the bits being set as a reminder), the actual layout is one hell of a handy cheat sheet.

 

Link to comment
Share on other sites

jzintv keypad is mapped to controller 2, vs. controller 1 on mac. intvnut is this by design?

 

Can you change game to accept keypad input on either controller or allow fire to start game?

 

If you press F6 it maps all the inputs to the left controller. I'm not sure why the default would be flipped between PC and Mac, though.

 

The default map is a little goofy to allow me to use my left hand on the left shift/alt/ctrl keys to fire, and right hand on the arrow keys to navigate with all the inputs going to the same controller. (Run handdemo / MTE-201 to see.)

 

 

what is the "A" key with jzintv on mac?

 

"A" isn't mapped to anything unless you've switched on the ECS keyboard mapping. Here's a link to the default input maps. F5 through F8 switch through the four maps.

 

http://spatula-city.org/~im14u2c/intv/jzintv-1.0-beta4/src/cfg/mapping.c

 

Scroll down to "cfg_key_bind" in that file.

 

 

I can't take credit for the constants, they come from one of the samples provided in the early days of Intybasic, they are damn handy

 

I believe they come from Catsfolly, who got the names from gimini.asm that comes with SDK-1600. :) Originally, these appeared here... :D

Link to comment
Share on other sites

I don't really know how to solve that one. It's that way because Stickman could have his leg out depending on what frame of animation he stops at like that. I worked on this for a few hours and I changed a few things. There's now a cloud that goes by to give you another sense of how fast you're going.

 

The cloud looks nice and gives a sense of motion I suppose the red blobs flying at me are the erasers? :lol: I'll wait until you have more elements before providing more feedback. It's a bit crude still and there's not much gameplay.

 

 

 

-dZ.

Link to comment
Share on other sites

I changed a couple things, including the hole logic, so it should be better now.
I also changed the look of the erasers. I was trying to get a diagonal eraser, but now it's a straight eraser. All there is so far is just jumping to avoid holes and erasers flying at you. Since there's not much gameplay, I'll probably add some coins to get as well, like in Super Giuseppe for the Odyssey 2. That's what I'm aiming at here for the Intellivision, only instead of Giuseppe, it's Stickman.

platform4a.bin

Link to comment
Share on other sites

It's up to you, but I say that this game has potential to be fun and engaging. Why not give it a bit more thought and enhance it even more into a full-fledge game? Sort of like what you did for GoSub.

 

Also, what about giving it a bit more flare with a fancier animation than the two frames it has now?

 

-dZ.

Edited by DZ-Jay
Link to comment
Share on other sites

I changed a couple things, including the hole logic, so it should be better now.

I also changed the look of the erasers. I was trying to get a diagonal eraser, but now it's a straight eraser. All there is so far is just jumping to avoid holes and erasers flying at you. Since there's not much gameplay, I'll probably add some coins to get as well, like in Super Giuseppe for the Odyssey 2. That's what I'm aiming at here for the Intellivision, only instead of Giuseppe, it's Stickman.

 

I liked the red diagonal erasers more too.

 

I wish stickman could duck and erasers came at different vertical levels, and speed. The one cloud looks good, but I bet a few more would look even better.

 

There is no longer sound when jumping or being hit by eraser / falling into hole.

 

It is possible to hold down jump and keep jumping on top of the hole. When you stop holding jump stickman falls into hole.

 

Its a great start to a fun game.

 

edit: made it to the end/title screen.

Link to comment
Share on other sites

GoSub just sort of happened. I start work on these things, not knowing whether it is a good idea or not. What should I add to it? I added a few more frames of animation and fixed the problem of jumping on the holes. By the way, this is still in its early stages. I have yet to add level 2, in which Stickman would be swimming around dodging erasers.

 

platform5.bin

  • Like 1
Link to comment
Share on other sites

I agree that if obstacles came in at a level that required ducking, that would be good.

 

Several times I'd jump over a hole and not come all the way back down. The game would continue, but when an eraser came along, I couldn't jump out of the way.

 

post-39531-0-53453800-1428422753_thumb.pngpost-39531-0-24418900-1428422754_thumb.png

Link to comment
Share on other sites

  • 1 month later...

Last update for a little while. I tried jumping at various stages on a real INTV and could not for the life of me recreate the jumping bug. Anyway, a new enemy: Pencils! Pencils zoom at you. I just thought it would be interesting to add a new enemy and see a variation instead of just erasers. It's still level 1. Here's what I want to have happen: Level 1 can be 8k, that's fine. Just so long as I don't go over 16k. I know, I could add a tiny bit of code, but I'm not ready to try to do that quite yet. So, level 2 should begin as soon as level 1 is done here in future builds.

platform6.bin

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

This game is pretty cool so far, maybe once you start to develop it into a official game and not just prototype you can make it so when stick man gets hit by the eraser it will show an animation of him getting erased and when hit by the pencil show him getting scribbled or crossed out.

Link to comment
Share on other sites

Is thare any chance you can number your builds. It would make it easier for me as i have archived every rom ever released on the web including all 73 versions of GoSub!. If not, biggie, i will just have to try to keep track. :)

73 versions of Gosub? Does anything on the screen look different or does anything in the program do anything noticeably different when the program is run?

Link to comment
Share on other sites

73 versions of Gosub? Does anything on the screen look different or does anything in the program do anything noticeably different when the program is run?

Its pretty common when developing software to have a ton of ever advancing versions. Typically you archive something if you've reached a milestone/end of free time/bedtime :lol: or you want to experiment with something new (that you aren't sure about) or even to optimise code. In the latter two cases if it doesn't work out you can always go back to something that works.

  • Like 1
Link to comment
Share on other sites

Its pretty common when developing software to have a ton of ever advancing versions. Typically you archive something if you've reached a milestone/end of free time/bedtime :lol: or you want to experiment with something new (that you aren't sure about) or even to optimise code. In the latter two cases if it doesn't work out you can always go back to something that works.

 

This is totally the way to go for amateur homebrewers. For instance in my current project "Code Eliminator" the file named ce0039.bas has one change: the blue fish head enemies only appear after a set amount of time. ce0039b.bas has that same feature but implemented in a different way. If that build barfs I can always go back to ce0038.bas which was before that feature.

Link to comment
Share on other sites

Its pretty common when developing software to have a ton of ever advancing versions. Typically you archive something if you've reached a milestone/end of free time/bedtime :lol: or you want to experiment with something new (that you aren't sure about) or even to optimise code. In the latter two cases if it doesn't work out you can always go back to something that works.

 

No kidding. If I ever thought I'd make something that would become of great interest and much beloved by millions, I'd spend the effort archiving intermediate versions of my games. But yeah, right. :P I only archive a reference version when I make an absolutely massive change that I may wish to backtrack to. Re-writing collision detection entirely. Whole new suite of graphics. That kind of thing.

 

And 73 versions is only what's been published on the forum. Hell, there are games I've done work on every single day for 100+ days. Each night's final product could arguably be called a "version". There's usually a substantial and noticeable difference every day (otherwise what the hell have I been doing with my time).

 

Every once in a while I find some stray early version of a ROM that I've put somewhere else for whatever reason. It's amusing to see the progress. But I don't think anyone wants to see 350 versions of GoatNom.

Link to comment
Share on other sites

 

No kidding. If I ever thought I'd make something that would become of great interest and much beloved by millions, I'd spend the effort archiving intermediate versions of my games. But yeah, right. :P I only archive a reference version when I make an absolutely massive change that I may wish to backtrack to. Re-writing collision detection entirely. Whole new suite of graphics. That kind of thing.

 

And 73 versions is only what's been published on the forum. Hell, there are games I've done work on every single day for 100+ days. Each night's final product could arguably be called a "version". There's usually a substantial and noticeable difference every day (otherwise what the hell have I been doing with my time).

 

Every once in a while I find some stray early version of a ROM that I've put somewhere else for whatever reason. It's amusing to see the progress. But I don't think anyone wants to see 350 versions of GoatNom.

 

Christmas Carol went through a rather protracted beta-testing phase. I used a private mailing list to communicate with testers, and each test version released represented a milestone that was recorded in version control, accompanied by a "change log." The final tally of releases is 44, including 33 "betas," two release candidates, seven official releases (with ROM and Cart editions counted separately), and the special editions awarded to the CvW winners.

 

-dZ.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...