Jump to content
IGNORED

XB256 Musings & experiments


Retrospect

Recommended Posts

Hello fellow 9900 obsessive people.

 

Right - straight to the point - what have I done wrong here ? ..... I can't think why this doesn't work, and as far as I know, the XB256 manual isn't telling my why I'm wrong either - but i AM wrong ... somehow!

 

My boat won't CHAR properly, it keeps wanting to be a group of letters.

 

! GET INTO SCREEN 2 MODE
10 CALL LINK("SCRN2")::CALL MAGNIFY(3)
! ASSIGN SOME CHARS
20 CALL LINK("CHAR2",104,"00000FFFFFFFFFFF")
30 CALL LINK("CHAR2",105,"000000C1FFFFFFFF")
40 CALL LINK("CHAR2",106,"00000081C7FFFFFF")
45 CALL LINK("CHAR2",107,"FFFFFFFFFFFFFFFF")
46 CALL LINK("CHAR2",112,"0000000606043F7FFFFF7F0000000000000000406030FFFFFCF8E00000000000")
! SET THE SCREEN AND CHAR COLOURS
50 CALL LINK("COLOR2",10,5,1)::CALL LINK("SCREEN",15)
! PLACE THE MAIN WATER CHARS AT THE BOTTOM OF THE SCREEN
70 CALL HCHAR(21,1,107,96)
! PLACE RANDOM WAVE CHARS AT POSITION 20
80 FOR L=1 TO 32::x=INT(3*RND)+1::x=X+103::CALL HCHAR(20,L,X)::NEXT L
! SET MY SPRITE (THIS IS WHERE IT GOES WRONG)
81 CALL SPRITE(#1,112,16,140,20)
! ASSIGN LINES 20 TO 24 AS A WINDOW
90 CALL LINK("WINDOW",20,1,24,32)
! SCROLL THE ASSIGNED WINDOW
100 CALL LINK("SCRLLF",1)
! KEEP SCROLLING THE ASSIGNED WINDOW
110 GOTO 100
Link to comment
Share on other sites

Sprites are defined using the normal characters in XB. i.e. the SCREEN1 characters. So to define your sprite you should CALL CHAR(112,""0000000606043F7FF......") and then it should work as expected.

Excellent ... thankyou Senior_Falcon, I will do that. Assign as I would standard XB for sprites. I'll have that boat sailing in no time. I will keep posting to this thread with more experiments, playing around, and bits n bats .... it's a fantastic program, XB256.

Link to comment
Share on other sites

Hello ....

 

Horse racing project using XB256 and the 256 compiler. Honestly, I've done this type of thing (scrolling a screen) both ways now - the way I did it in standard XB, and the way it's done in XB256 .... .and I can tell ya , 256 makes it soooo much easier. Thankyou Harry.

 

https://www.youtube.com/watch?v=cywakqUaNwQ&feature=youtu.be

  • Like 5
Link to comment
Share on other sites

I've had a spare hour to work on the project .... I've moved the horses up 20 pixels, rewritten the graphics for the grass to make it appear less 'in form' and more random, and now there is a display of the leading horse's name , which I think may be slowing the scrolling down by a fraction. Still, it's fun to have. More updates on this later. :)

 

Thanks everyone for the feedback. It encourages me to go further. For some reason my old video ended up on the end of the new one.

 

Try the program on Classic99 here ... its not as fuzzy as the video ... >>> PROTOTYPE.zip

 

https://www.youtube.com/watch?v=chXzRXS2MDU&feature=youtu.be

Edited by Retrospect
  • Like 3
Link to comment
Share on other sites

That is a nice addition to the program. One thing that could be improved is to only print "In the lead" one time and then just print the name of the horse. It is a little distracting to see "In the lead" flashing. If you pad the horse's name with trailing spaces so they are all the same length then you don't have to clear the line when you print the name.

  • Like 1
Link to comment
Share on other sites

Ridiculous. :) love it... I want that as ny PC screensaver... Drive ny wife insane. LOL!!!

 

hehe .... here ya go dude. I think as a windows movie file it should be do-able ;)

 

screenscroll.zip

 

and here's the classic99 file if you wanna play with that too

 

COLORBARS.zip

Edited by Retrospect
Link to comment
Share on other sites

The racing game is having a good re-write right now. I did the old trick of putting bits of code at random spots ... I only knew what everything did for about 48 hours and after a break of more than 16 hours I was suddenly confused looking at the mess of spaghetti everywhere..... There's going to be six horses racing on screen .... sprites at magnify 3 because I want a little shadow under each horse, the test I did before I screwed up the code looked good enough to show, but I don't want to stack the thread with showboating videos every time I triumph.... The "leading horse" thing will be more advanced, and will show (hopefully) all the horses in order of position during the race.... I'm being very optimistic there..... Right ... so ... on with it, from scratch .... I'll have a title screen with attract mode to begin with. With an attempt to take advantage of the fact that we have 28 sets of chars (?!) which is going to be fun to play with.

Link to comment
Share on other sites

There are 32 sets of characters (256 total characters) to play with! Not to mention there are another 112 characters to use for sprites.

Excellent, better than I thought! .... I've got an attract mode title screen just about ready to show. No sound yet, but I will do all that last. :)

 

https://www.youtube.com/watch?v=PvGC9pNh1EU&feature=youtu.be

 

The youtube clip looks HORRID !!! .... So I provided the FIAD file for Classic99 / CF7 users, use Extended Basic to load it (it doesnt need 256 to run)

 

Also to note: the finished product will draw the racing track faster ..... I got impatient and botched it in somewhat hapazardly. Basically it has a RND of 4 numbers, and adds the character number for graphics to it, for example GR=GR+159 or whatever, is why it's sloooow. The character set is too high up for me to PRINT as a CALL LINK("DISPLY", xxxx)

 

ATTRACT2.zip

Edited by Retrospect
  • Like 1
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...