Log In  

Cart #stix-0 | 2019-07-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Stix: A Qix demake

Actually more of a remake of Stix for the C64 hence the "varied" colour palette.

My second pico 8 project and, although its a fair bit less ambitious than Boulder Run, I'm pretty happy with the result.

Had my 14 year old Blitz Max code for reference but have enjoyed making everything from scratch. No scanning the web for sound effects and music files this time, just some trig tutorials!

Everything was done in a most enjoyable "sick" week off work!

P#66179 2019-07-29 08:36

:: dw817

It's a pretty hard challenge to play with the seekers. Those usually don't show up so aggressively until higher levels.

P#67954 2019-09-20 20:45 ( Edited 2019-09-22 16:24)

Haha, yes it is. I based it more on the C64 game but my remake is definitely faster.

Wanted to go for smoothness which meant seekers travelling the same speed as the player othersise it didn't look quite right due to the low resolution.

It certainly makes for a fast, challenging game!

P#68012 2019-09-23 01:11
:: dw817

When presenting a tribute sometimes it's best to check with the master copy. Usually anything found in an actual arcade is excellent.

Or it wouldn't earn all those quarters. :)


P#68013 2019-09-23 01:29

I did, the master copy was Stix on the C64 ;)

P#68014 2019-09-23 02:23
:: dw817

Few direct-to-home games live up to the arcade promise though. A very rare few exceed the arcade unit itself. I can't think of any right now.

I - thought you might be encouraged to model your game after the arcade classic feel and design. That's the one I played and am familiar with. If not that's fine ... It's still a worthy QIX and that's not easy to program.

P#68015 2019-09-23 02:57 ( Edited 2019-09-23 02:58)

No problem and I know exactly what you mean. In this particular case I was going more for the programming experience and seeing what I could do with the low-res pico-8 experience. To tell the truth, outside of a game or two on MAME, I never played the original Qix much and apart from playing a bit of Stix on a C64 emulator as a reminder of how it played, most of this was done from memory and with a reference to some Blitz Max code I wrote years ago.

Love the whole pico-8 experience of doing the whole programming/ graphics/ music thing solo.

P#68054 2019-09-23 20:14
:: dw817

Nice to find a fellow BlitzMAX programmer. Ah - and what do we do with all of our abandoned BlitzMAX code and image tables ?? ;)

I am curious. Is there a way you can explain how you do the fills for an odd-enclosed shape ?

I mean, I can do this:

Cart #hamobijewi-0 | 2019-09-23 | Code ▽ | Embed ▽ | No License

But how do you fill in a region that is drawn and not a perfect rectangle ? Where do you know the "inside" of it is ?

P#68057 2019-09-23 20:31

I remember having to Google this back in the day but if you look in the code you'll see a function:

function arena:fill(x,y,c)

Although it uses recursion, it works in such a way that isn't likely to overflow the call stack.

Baiscally sets all horizontal pixels on a given row and then checks (in separate loops), the pixels in the row above and the row below to see if they need filling and recurses.

This then fills in uneven areas.

Pretty sure this is not what some versions do since you can see them fill as they go along and they don't appear to use this algorithm. Works for me though!

P#68065 2019-09-23 23:18 ( Edited 2019-09-23 23:18)
:: dw817

How do you know which part to fill in ? Even if you made the player's line acceptable as being filled in, where does it know the edges of it are - inside - or out ? That's the tricky question.

The shape for instance I have above, suppose I drew that just with the mouse. How then would the program know where to start the fill point ?

It could get it wrong and it would be outside the region that needs to be filled.

P#68066 2019-09-23 23:51

Haha, that's where I do a bit of a cheat (that also allows for the "split" function when you have multiple stix on screen).

I baiscally fill both sides of the path line with a special colour (that I can then clear again) just before it joins back on to the main filled area.

If the main points of the stix (I iterate the entire line) have this special colour, I know that that area contains a stix.

If the area doesn't contain a stix then that's the one to fill.

If both areas contain a stix then its a spit.

See the function:

function player:getfillpos()

This returns the x and y position to fill. If the returned x position is -1 then it means no position was found and therefore it was a split.

P#68068 2019-09-24 00:01 ( Edited 2019-09-24 00:02)
:: dw817

I figured you did something awfully clever. :)

Let me see if I can do something like this. QIX is definitely one of my fascinations on how it could fill in a region like that just by the player drawing it in any old way.

I suspect strongly the original game uses something much more complex to determine their area.
. . .

Wow, that is really complex ! It's hard enough to write code to keep track of the line the player draws and can erase it by backtracking let alone fill in that region. Think I'm gonna leave it in your capable hands and just give you my star.

You know if ZEP ever gets around to writing a command where you can fill in polygons via POLYGON(), this code might be that much easier.

P#68070 2019-09-24 00:26 ( Edited 2019-09-24 01:19)

Very solid and fun remake!

I was playing the C64 version not that long ago. Personally I think the fluidity makes up for the difficulty. I still feel in control even if it's more challenging, which is a good balance.

P#68073 2019-09-24 01:24

You don't need to backtrack to erase the "test" region or the incomplete path that the player is drawing. Just nominate special colours you're not already using (I use an array rather than plotting pixels directly), e.g., 99 and then, after testing (or the player being killed in the case of the incomplete path), just do a sweep of the array and switch all entries with a value of 99 back to zero. I like simple solutions best. Easier on the brain :)

P#68074 2019-09-24 01:34 ( Edited 2019-09-24 03:45)
:: gate88

Very slick; your games are always so polished @pahammond!

I find it to be a very interesting challenge; haven't played too much of it yet, but I'm sitting at 2239 for my highscore.

P#72650 2020-02-03 04:34

Just found this, nice work!

P#75577 2020-04-28 23:13

Thanks. Nice short project. Wasn't sure if the lines would be too chunky in pico-8 but pleased how it turned out.

P#75578 2020-04-28 23:32

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2022-07-01 08:25:08 | 0.022s | Q:36