Jump to content


Photo
- - - - -

How Fast Can Willy Play

jet set will vl5 demo 48k 128 rooms

  • Please log in to reply
25 replies to this topic

#11 Norman Sword

Norman Sword

    Advanced Member

  • Member
  • PipPipPip
  • 237 posts

Posted 12 January 2019 - 12:47 PM

One of the differences between JSW and JSW2 is the method of screen updates. JSW2 uses XOR for all sprite updates. This does introduce a visual change to the game. One that is easy to spot.


To implement XOR you basically run the game drawing routines twice in every loop. So movement and drawing are completely separated. 

 





 

 



#12 jetsetdanny

jetsetdanny

    Advanced Member

  • Contributor
  • 2,132 posts

Posted 12 January 2019 - 05:44 PM

Thanks a lot for creating and sharing these files and explaining what you've done with them, Norman Sword! :) They are extremely impressive in the sense of what you've been able to do with the code!  :thumbsup:



#13 Norman Sword

Norman Sword

    Advanced Member

  • Member
  • PipPipPip
  • 237 posts

Posted 14 January 2019 - 01:00 PM

Using XOR in the game JSW

The present layout of JSW would need a lot of changes in its code. The separation of  movement and drawing brings up two immediate problems.

1) The arrow routine draws and moves in one routine. This would need to be split into move and draw. Since the original arrow code is small, I would think that splitting the arrow code into two parts would not expand the routine a great deal.

2) The rope has embedded in its drawing routine the ability to move willies position. This would need heavily modifying.

The game engine would need tweaking to rearrange the flow

Move willy
move sprites
draw sprites+willy (xor on)
copy screens
draw sprites+willy (xor off)
loop

Possible to do, yet I have shown that it is not needed.

---------------------------------------------------------------------

JSW2 uses XOR for its drawing.  


JSW uses a pixel based collision detection, which makes all sprite drawing check each pixel for collision. The arrows only check the main shaft for collision and not the line above or below (Sidetrack here: I do not think it would be possible to be in a square with the arrow parts above and below the shaft, because of the method of drawing the arrow. It assumes the arrow parts are within a character block. If they are drawn either above or below a character then other design flaws come into play)


JSW2 does not do any collision detection on sprite movement, and this includes the arrows. Yet it will detect collision from anything on the screen that moves into its path.


The above may seem to be a contradiction, when looking at the game engine for JSW. This is busy checking sprites and Matthew wrote into his sprite routine a switch that permits the collision part to be turned off. Needed for simple things like the boot crushing willy on the game over plinth. If that switch to turn off collision and change the drawing mode was not present, then the boot would be flagging willies death on collision with the boot. 


JSW2 has no collision detection in its normal sprite drawing routines. This is why it is possible for the sprites to go wherever they want. The Birds in JSW2+ are permitted to fly over the background in the secret lab. In JSW2 the eggs in eggoids collide with each other and no collision is detected. These collisions would prove to be a major problem in JSW. 


**** NOTE ****
The Amstrad version does not use this method- This method is used only on the spectrum.


So how can it detect a collision?

MAGIC - Monitored Active Graphic Image Collision

Every time Willy is drawn on the screen the local area behind Willy is modified. The game looks up the graphics that are defined behind willy and erases them. It then draws Willy to the screen. The drawing of willy is the only sprite draw that checks for collision. Since the graphics have been erased, the only graphics left in the area behind willy must be the other sprites drawn on the screen. So a pixel collision here indicates a sprite collision with willy. (or a rope- I am not widening the scope to include the ropes here) After willy is drawn the graphics are replaced in the area behind willy. This means that only one of a possible 16 sprites (jsw2+) needs to check for collision. The other sprites are drawn using a very simple drawing loop.  

The above is the idealised image of collision detection in jsw2 which uses XOR for drawing.











 



#14 IRF

IRF

    Advanced Member

  • Contributor
  • 4,274 posts

Posted 14 January 2019 - 01:42 PM

Thanks for the explanation, Norman.

 

 


One of the differences between JSW and JSW2 is the method of screen updates. JSW2 uses XOR for all sprite updates. This does introduce a visual change to the game. One that is easy to spot.

 

 

Based on your most recent post, which tells us that Willy is drawn after the guardians, I believe that the visual change you refer to in the quote above is that:

 

- Whereas in JSW, Willy's which INK can be partially overshadowed by a guardian's INK colour, when they come into close proximity with each other;

- In JSW2, a (non-white) guardian will be partially overshadowed by Willy's white INK, when they come into close proximity with each other?


Edited by IRF, 14 January 2019 - 01:43 PM.


#15 Norman Sword

Norman Sword

    Advanced Member

  • Member
  • PipPipPip
  • 237 posts

Posted 14 January 2019 - 02:06 PM

The colouring is just another product of the game design.

Four pictures . 1 and 3 use "OR" for sprite draw. pictures 2 and 4 use "XOR"

We are looking at the pixels and not the colours. In picture 1 ("OR") Willies head is merged into the background, and the pixel pattern of the background is lost beneath his head. In picture 2("XOR") Willies head now exhibits the pixels of the background beneath the outline of his head.


The differences in picture 3 and 4 have been lost due to the collouring changes. But the black shape of Willies lower body in picture 4("XOR")  is a classic look due to "XOR" on the screen.  The area of note here is the conveyor as it passes through the body of willy. The conveyor "Xor"s his body. In the "OR" version we can not see the conveyor beneath his body outline.

I will find some better examples

ADDED pictures. again in groups of two. Pictures 5 and 7 use "OR" and pictures 6 and 8 use "XOR"

Notice the difference in First Landing (pictures 7 and 8) using "OR" the stair merges into the form of Willy. In the usage of "XOR" the stair can be clearly seen

Again the differences in pixels in "Ballroom West" (pictures 5 and 6) the rabbit platform merges into the outline of Willy with "OR" picture 5. In picture 6 "XOR" the outline and Willies shape are now undetermined.




 

Attached Thumbnails

  • or1.png
  • xor1.png
  • or.png
  • xor.png
  • OR 4.PNG
  • xor 4.png
  • OR 3.PNG
  • XOR 3.PNG

Edited by Norman Sword, 14 January 2019 - 02:42 PM.


#16 IRF

IRF

    Advanced Member

  • Contributor
  • 4,274 posts

Posted 16 January 2019 - 03:25 PM

I've just noticed the screenshots of the new rooms (and several title screens) which have been added to the first post in this thread.

 

Is there one missing?  By my count, there are 67 new rooms shown, which when added to the original 60 gives 127.



#17 Norman Sword

Norman Sword

    Advanced Member

  • Member
  • PipPipPip
  • 237 posts

Posted 16 January 2019 - 05:43 PM

The missing room was room 47. ( was that the original "]" room ? )

The file has again been updated with the whole 128 rooms. I suppose I should delete the game file and update that as well (not done) 


Edited by Norman Sword, 16 January 2019 - 05:46 PM.


#18 IRF

IRF

    Advanced Member

  • Contributor
  • 4,274 posts

Posted 16 January 2019 - 05:53 PM

The missing room was room 47. ( was that the original "]" room ? )

 

Yes, it's the next room numerically after Tree Root.  Actually, it was called "[".  ("]" appears in JSW2!)


Edited by IRF, 16 January 2019 - 05:53 PM.


#19 Spider

Spider

    DEC (HL)

  • Administrator
  • 3,961 posts

Posted 16 January 2019 - 07:51 PM

Thank you for the update, appreciated. :)

 

Regarding updates you should not have any issue 'editing' your existing download submission here if you wished to place it there instead of into this thread.


Changing order to chaos since 1984

#20 jetsetdanny

jetsetdanny

    Advanced Member

  • Contributor
  • 2,132 posts

Posted 25 January 2019 - 02:26 AM

The missing room was room 47. ( was that the original "]" room ? )

The file has again been updated with the whole 128 rooms. I suppose I should delete the game file and update that as well (not done) 

 

Which file is it exactly? The JSW VL5 DEMO revision3b.tap file on page 1 of this thread, or something else?







Also tagged with one or more of these keywords: jet set will, vl5 demo, 48k, 128 rooms

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users