Jump to content
IGNORED

Boulder Dash™ 2 - a new engine in development


Andrew Davie

Recommended Posts

3 hours ago, Andrew Davie said:

New butterfly. 4-pixel-wide animations are tough.

Okay, but both this butterfly and the diamonds are looking really good.

 

Is it possible to orient the butterfly horizontally, like your diamonds? Then you'd have 7 pixels across the wings.

Link to comment
Share on other sites

Complex screens of amoebas, butterflies, explosions, and tumbling diamonds and boulders have to be my absolute favourite thing in Boulder Dash. Here's all of that together in one place. The explosions aren't strictly correct; they should happen immediately when a butterfly and amoeba are in contact. I'll fix that soon. I've refined the butterfly animation (yes, I did try the horizontal butterfly... not as easy as it sounds).

 

 

The thing is; the Interleaved ChronoColour(TM) display is oddball. Although nominally 4 pixels horizontal, and 7 ICC pixels vertical (21 scanlines, for these "tiles" or "characters"), things aren't exactly quite that way in reality - particularly in the vertical dimension.  Consider just one pixel, and assuming for the three colours that are blended, we are using red (R), green (G) and blue (B). Remember, they could be any three colours, so these are just for discussion. Now a "single pixel" might look like this...

 

R

G

B

 

Now that's three scanlines, but to the eye these (tend to) blend. So we'd see an almost-white here. Let's add another pixel, this time a "red" pixel. Now a "red" pixel would have R and then two blank lines.  Like this...

 

R

-

-

 

Sure, that would look red alright. But let's put it underneath the first "white" pixel...

 

R

G
B

R

-

-

 

Do we see a white pixel on top of a red pixel?  Nope. We see a bigger white pixel. The Blending doesn't distinguish on 3 scanline boundaries. It happens with adjacent scanlines lines, not respecting ICC pixel boundaries.  That is, the red pixel at bottom, formed by R/-/- will actually blend with the blue pixel on the scanline above it.  So this introduces big complications when trying to have animations and colours of things. Effectively, things change colour when they're near other things (vertically).  What you thought would be blue is now purple. Or brown. Or White. Depending on what's nearby.  On a whole-screen basis you can get some excellent effects. But on the individual pixel level, it gets... as I said... tricky.

 

So for that reason, animating butterfly wings "vertically" is fraught with colour issues - it's very hard to have a "body" of the butterfly and wings that animate up and down (i.e., vertically).  My point being is there is not as much "leeway" as you would first think, having 7 pixels vertically to play with, compared to 4 horizontally. Another issue with vertical is that the top/bottom pixel (i.e., 3 scanlines on each) will blend vertically with the character above/below (i.e, boulder on top of butterfly --> colour issues on bottom of boulder and top of butterfly). One has to be careful about these interactions. Mostly they don't matter. Sometimes they can.

 

It's all part of the challenge to make nice visuals/animations.  Anyway, as noted I changed the butterfly yet again, and I'm thinking it looks mostly OK now.

 

 

 

 

 

 

 

 

 

 

Edited by Andrew Davie
  • Like 3
  • Thanks 1
Link to comment
Share on other sites

I'm completely out of available time for development work for the next few days at least, but I'm itching to implement the latest idea. I realised just yesterday that the resolution of the standard BD playfield (40 x 24 - or some sources...  40x22) matches beautifully the onscreen PF resolution of the '2600.  That is, 40 x n.  So I got to thinking, how about an "overview" mode where you can see the whole board in one go.  Each "cell" would reduce to just a 1 x 2 ChronoColour(TM) pixel (which would be ever-so-roughly squareish) - that is, 1 PF pixel wide x 6 scanlines high.  The whole board would fit into 40 x (24 x 6) = 40 x 144.  The regular viewable screen is 40 x 168, so it's a reasonable match.

 

So, hopefully fairly soon I'll have a "whole board" view on something like a double-click of the trigger. With any luck I'll be able to have it playable in that view, too.  I expect to have the animation still working, so bubbling slime, flashing diamonds, should be possible even though 1 pixel wide. Will be interesting to see how it looks.

 

But for now, back to my research paper/assignment. Drudgery.

 

  • Like 1
Link to comment
Share on other sites

Well, because "Procrastination" is my middle name, and my paper is due tomorrow... I went ahead and implemented the "whole board" view anyway. Much to my surprise, it worked first time - maybe a half-an-hour all-up to write it.  It's actually pretty useful - and although the display is very very very low-resolution (i.e., 1 pixel, the lowest of the low), you can see where things are and what's happening. I put it on the joystick button, and as noted.... works very well indeed. I like it.

 

  • Like 7
Link to comment
Share on other sites

Worth showing that the "overview" screen is fully functional and drawn on-the-fly.

Here I do a bit of gameplay in overview, collecting diamonds, which are clearly distinguishable. I also let loose the butterfly and firefly and watch from overview as the ameba turns to boulders.  I also added a bit of "bubbly" to the amoeba in overview.

Still some polish to do, but I'm keeping this functionality, I think.

 

 

 

 

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

1 pixel wide butterflies and fireflies are actually a thing. I have a better idea for the fireflies (RHS) - they should be more on/off.

But the butterflies, if you look carefully... seem to be flapping their pixel. They're a maximum of 9 scanlines deep. Just enough to do a bit of animation.

 

 

 

 

  • Like 4
Link to comment
Share on other sites

Much to my delight, I found a bit of legacy code in the scrolling. In my earliest efforts here, I had a triple-screen Interleaved ChronoColour(TM) system -- that is, the colours rolled over 3 frames. To prevent "shearing" during the scroll, I limited the scrolling to only occur on the start of each frame triplet. I neglected to remove that limitation when I went back to the single-frame ICC display. Having just discovered (and removed) that limitation, the scroll is now super-silky-smooth. A wonder to behold, actually. Here it is in action...

 

 

 

Edited by Andrew Davie
Replaced video link with better version
  • Like 8
Link to comment
Share on other sites

Still working on the overview screen. It's become an obsession to make it a playable 1-pixel thing.

 

A few changes. I've gone to this "chequerboard" idea - where object shapes are based on which square they're on as if it were a board. The idea being, pieces side-by-side in 1-pixel-world are impossible to tell apart. Think of a row of boulders, or of butterflies.  Now I choose a different image to display based on if the object is on a "white" or a "black" location on the board. Now for most objects this makes no difference - same shape is used. But for the ground, for example, compare the ground in the video with the image in the post above. I use different shapes in this case, so I get that nice much less dense 1-pixel ground.  Another place I've used this is in the "shape" of the boulder. When there's a huge block of boulders, well it doesn't look like a huge block of boulders, more like a ... splodge.  So I use odd/even parity on the boulder shape just by one scanline. The effect is that each side-by-side boulder is a different colour. But because I use a different shape, every two frames both colours are displayed. So boulders "shimmer" at 30Hz. It's noticeable, I guess, but not nearly as bad as the video shows. That's because the video capture on my machine can't cope with 60Hz, so it's about 38 Hz, and then the video conversion on top of that. Much better IRL. Also I've used alternate animations on the chequerboard for the butterflies, so they also seem distinct when side by side.  The diamonds do it because of their random flashing so I left those alone. And the amoeba, of course, I want to be a gigantic splodge, so I left that one alone.

So there you have it. 1-pixel gaming.
 

  • Like 9
Link to comment
Share on other sites

The checkerboarding of the background looks really, really nice.  I think that's a great touch.

 

One observation: in 1-pixel mode, there seem to be flashes inside of the amoeba (it looks like drawing a boulder or a diamond for a single frame and then back to green).  It gets a bit more intense as the amoeba gets bigger.  I'm guessing it's drawing the location where an amoeba would start to grow?

Link to comment
Share on other sites

5 hours ago, Propane13 said:

The checkerboarding of the background looks really, really nice.  I think that's a great touch.

 

One observation: in 1-pixel mode, there seem to be flashes inside of the amoeba (it looks like drawing a boulder or a diamond for a single frame and then back to green).  It gets a bit more intense as the amoeba gets bigger.  I'm guessing it's drawing the location where an amoeba would start to grow?

That's just my poor choice of "bubbling" animation character. It will be better next version I post - look for it :)

 

  • Like 1
Link to comment
Share on other sites

Here's a better bubbling. Subtle, but that's good, right?

I'm working to a new metric. Instead of hours/day on this project, it's hours per pixel.

Edit: oh, I abandoned the shimmering boulder thing. They're just solid now, no flickeryness.

 

Edited by Andrew Davie
  • Like 5
Link to comment
Share on other sites

And now... it's a game!  I put all the tables in for object to object interaction, and now boulders and diamonds fall and kill stuff (butterflies, fireflies, YOU!). Also, butterflies and fireflies have correct proximity detection to amoeba and YOU! and they blow up properly.  Basically the whole fundamentals of the gameplay are now in, and it's actually quite fun.  I did a bit of a longplay video to show it off.  I put in a "cave select" so you see me cycle through a few of the caves now and then, as I select which one to play.  At the end of the video I waited in vain for the amoeba to get trapped, but forgot I had a bug in the "turn into diamonds" code, so that didn't happen, so I went to the bottom, let the amoeba grow super big and it did correctly turn into boulders at the end.  Also, I've worked very hard at getting that "overview" screen as close to the main screen in visuals as I can. 1-pixel-wide animation/graphics are a hoot. It's all coming together. Sprites next>?

 


 

  • Like 14
Link to comment
Share on other sites

Note how the overview completely changes gameplay. On watching the above, it's clear I use it frequently to get an idea of what's happening elsewhere and time things properly. I even do some of the gameplay in the overview screen... so it's a big success IMHO.

 

  • Like 2
Link to comment
Share on other sites

3 hours ago, Andrew Davie said:

And now... it's a game!  I put all the tables in for object to object interaction, and now boulders and diamonds fall and kill stuff (butterflies, fireflies, YOU!). Also, butterflies and fireflies have correct proximity detection to amoeba and YOU! and they blow up properly.  Basically the whole fundamentals of the gameplay are now in, and it's actually quite fun.  I did a bit of a longplay video to show it off.  I put in a "cave select" so you see me cycle through a few of the caves now and then, as I select which one to play.  At the end of the video I waited in vain for the amoeba to get trapped, but forgot I had a bug in the "turn into diamonds" code, so that didn't happen, so I went to the bottom, let the amoeba grow super big and it did correctly turn into boulders at the end.  Also, I've worked very hard at getting that "overview" screen as close to the main screen in visuals as I can. 1-pixel-wide animation/graphics are a hoot. It's all coming together. Sprites next>?

 


 

Wow the new overview screen and smooth scrolling changes everything and the better graphics like diamonds do the rest - very impressive!

Link to comment
Share on other sites

Well, the amoeba-to-diamonds is working. Once again?  Here's a rather piss-poor effort at playing one of the BD4 screens, and showing how "entrapment" is done. When the amoeba can't grow, it turns into diamonds. Much fun.  This is an excellent example of how the overview screen gives you great context as to what's going on elsewhere.

 

 

  • Like 3
Link to comment
Share on other sites

On 4/13/2021 at 9:53 AM, Andrew Davie said:

Much to my delight, I found a bit of legacy code in the scrolling. In my earliest efforts here, I had a triple-screen Interleaved ChronoColour(TM) system -- that is, the colours rolled over 3 frames. To prevent "shearing" during the scroll, I limited the scrolling to only occur on the start of each frame triplet. I neglected to remove that limitation when I went back to the single-frame ICC display. Having just discovered (and removed) that limitation, the scroll is now super-silky-smooth. A wonder to behold, actually. Here it is in action...

I actually prefer the faster acceleration/deceleration of the legacy scrolling, which is more easy to process for my brain when the "R" is moving around on the screen. 

When watching the latest video, I feel the scrolling is accelerating and decelerating at the time while "R" moves across longer distances, which causes a slight disorientation.

 

The overview screen is really good, btw.

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