Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Builderboy on August 10, 2010, 12:59:00 am

Title: Xonix
Post by: Builderboy on August 10, 2010, 12:59:00 am
Damn inspiration strikes again :P This is a small side project i have been working on, i whipped up this code in a few hours, and its already showing some promise!  Its just a small and fun arcade game called Xonix.  There are several balls bouncing around the arena.  You can move your cursor to create walls to lock in the balls into smaller containers.  But if a ball hits a wall while its being constructed, it will start to disintegrate, and if the wall disintegrates all the way to your cursor before you reach the safety of land, you lose a life.

For those interested, i had to write a flood filling algorithm in order to get the filling to work properly.  I use a special scanline filling algorithm which i have to admit is quite shiny :) I think ill post a demo of the filler in the Axe Algorithm thread later...

Also note that this is only a side project and does not take precedence over other Projects like PortalX :P This isnt actually currently being worked on, i just felt like posting what i had.
Title: Re: Xonix
Post by: _player1537 on August 10, 2010, 01:03:50 am
Wow, very nice BuilderBoy, I love the PC version of this game :D

<offtopic>I need to get on the ball for being creative and having inspiration :P</offtopic>
Title: Re: Xonix
Post by: TIfanx1999 on August 10, 2010, 01:13:27 am
Ah, this looks similar to <a href="http://en.wikipedia.org/wiki/Jezzball">Jezzball </a> that was packaged with older versions of windows.  It looks very well implemented so far.
Title: Re: Xonix
Post by: _player1537 on August 10, 2010, 01:14:31 am
http://www.netives.com/Games/Quarantine/index.php

This is the game I was referring to btw.
Title: Re: Xonix
Post by: bwang on August 10, 2010, 04:16:57 am
Nice! I hope this gets finished.
Title: Re: Xonix
Post by: fb39ca4 on August 10, 2010, 09:47:45 am
I loved playing that game on the computer. This'll turn out great.
Title: Re: Xonix
Post by: meishe91 on August 10, 2010, 01:32:42 pm
That is very cool. Great job on it :)
Title: Re: Xonix
Post by: DJ Omnimaga on August 10, 2010, 03:53:11 pm
looks pretty nice, it effectively reminds me of Jezzball, but of course a bit different. Nice job
Title: Re: Xonix
Post by: bwang on August 10, 2010, 04:19:12 pm
Do I see grayscale in the game? o.o
Title: Re: Xonix
Post by: {AP} on August 10, 2010, 04:31:48 pm
The trail is gray, aye.

Amazing work again, BB. Would like to get a hold of this sometime. =P
Title: Re: Xonix
Post by: Quigibo on August 10, 2010, 06:31:22 pm
This looks cool!  I made this game before on the computer, its really addicting.  I'm also curious how you did the fill algorithm since there are 2 or more sides to every line and you have to detect if you've trapped anything in either one.
Title: Re: Xonix
Post by: fb39ca4 on August 10, 2010, 06:35:33 pm
Just wondering, what happens if you trap a ball in a spot that gets filled in?
Title: Re: Xonix
Post by: shmibs on August 10, 2010, 08:04:36 pm
the game looks great(that is totally an improvement over impossible jezzball), but im more excited for that filling algorithm. if you dont post it quickly i might have to try writing a slightly less shiny one just so i have it when it will inevitably be needed in some future prog. nice work!
Title: Re: Xonix
Post by: tloz128 on August 10, 2010, 08:47:26 pm
I remember playing a version of this somewhere. It was really fun!  :D
Title: Re: Xonix
Post by: Builderboy on August 11, 2010, 01:33:15 am
Just wondering, what happens if you trap a ball in a spot that gets filled in?

Thats the beauty, any side that contains a ball wont be filled in :) Unfortunately when i tried to port the filling algorithm from tilemap to screen coordinates, i ran into a problem.  All the things that make this routine fast are not applicable on the graph screen, since you would need to go pixel by pixel anyway.  With this right now, since i have a buffer for the screen, i dont have to do bitmasking for every pixel (via a pixeltest or a pixelOn) But if i transfer it over to the graph screen, its just as slow as every normal filling algorithm :( I'll write a general routine anyway soon and upload it tho, since it can be useful.

As for how the logic works in this game, once a wall is completed, every BALL flood-fills its area, marking it with a number.  Anything that has been marked is kept clean, and anything not marked is set as solid.
Title: Re: Xonix
Post by: Quigibo on August 11, 2010, 03:55:46 am
As for how the logic works in this game, once a wall is completed, every BALL flood-fills its area, marking it with a number.  Anything that has been marked is kept clean, and anything not marked is set as solid.

Ah! That's really smart!  It's quite literally thinking outside the box :)

That reminds me of when I was working on Puyo Puyo.  I couldn't find any algorithms published for how to detect if 4 or more balls on a grid are connected 4-directionally and it took me months before I figured out a way to do it.  You just detect all the balls that form chains of 3 or less, which is easy since there are so few combinations and they're all trivial, and then just destroy everything else.
Title: Re: Xonix
Post by: ztrumpet on August 16, 2010, 01:33:30 pm
Wow!  Builderboy, I need to ship that time machine back to you so you have the time to finish this, Portal (X and 2), and Serenity.  I can't wait for these 4 great games. ;D
Title: Re: Xonix
Post by: DJ Omnimaga on August 17, 2010, 10:00:09 am
Same here, I hopethey all get finished. And nice job on the filling in Xonix.
Title: Re: Xonix
Post by: ztrumpet on May 08, 2011, 09:26:46 pm
*Bump*
I see this isn't in your sig anymore. :(
Can you release what you had?  It looks like fun even in that state. ;D
Title: Re: Xonix
Post by: Builderboy on May 09, 2011, 12:17:11 am
Lols this is my thought process whenever I try to restart this:

Ok this is basically finished, time to wrap it up
Hmm i need to add powerups just like the original
Uhoh I only have 4x4 sprite options
Uhg this is impossible, they all look the same
Maybe 8x8 and have them take up 4 tiles?
Bleh then collision gets even more wacky
8x8 is way too big anyway
Blarg
I'll work on it later
Title: Re: Xonix
Post by: leafy on May 09, 2011, 12:21:06 am
Hehe my feelings exactly ^^
Title: Re: Xonix
Post by: ztrumpet on May 09, 2011, 12:38:48 am
Builerboy, I loled. ;D
Title: Re: Xonix
Post by: Munchor on May 09, 2011, 07:26:32 am
(http://www.omnimaga.org/index.php?action=dlattach;topic=4026.0;attach=2726;image)

Builderboy, really nice job, that looks really cool. How would highscores work on this kind of game, though?
Title: Re: Xonix
Post by: aeTIos on May 09, 2011, 02:32:21 pm
This is an awesome game! hope you finish it!
Title: Re: Xonix
Post by: squidgetx on May 09, 2011, 05:53:22 pm
4x4 is that hard to work with? I could try and get you some sprites if you want
Title: Re: Xonix
Post by: DJ Omnimaga on June 06, 2011, 06:01:18 pm
I hope you release this at one point Bboy :D