Jump to content
Jet Set Willy & Manic Miner Community

How Fast Can Willy Play


Norman Sword

Recommended Posts

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. 

 





 

 

Link to comment
Share on other sites

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.











 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.




 

post-125-0-20719700-1547474194_thumb.png

post-125-0-22750200-1547474203_thumb.png

post-125-0-79828500-1547474220_thumb.png

post-125-0-74295500-1547474237_thumb.png

post-125-0-06306000-1547476138_thumb.png

post-125-0-31069500-1547476145_thumb.png

post-125-0-68901000-1547476169_thumb.png

post-125-0-02617600-1547476184_thumb.png

Edited by Norman Sword
Link to comment
Share on other sites

  • 2 weeks later...

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...

Important Information

By using this site, you agree to our Terms of Use.