Author Topic: Xonix  (Read 4220 times)

0 Members and 1 Guest are viewing this topic.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Xonix
« 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.

_player1537

  • Guest
Re: Xonix
« Reply #1 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>
« Last Edit: August 10, 2010, 01:04:18 am by _player1537 »

Offline Art_of_camelot

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6111
  • Rating: +191/-9
  • YouTube channel has my solo work and collaboration
    • View Profile
    • My YouTube page!
Re: Xonix
« Reply #2 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.

_player1537

  • Guest
Re: Xonix
« Reply #3 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.

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Xonix
« Reply #4 on: August 10, 2010, 04:16:57 am »
Nice! I hope this gets finished.

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Xonix
« Reply #5 on: August 10, 2010, 09:47:45 am »
I loved playing that game on the computer. This'll turn out great.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Xonix
« Reply #6 on: August 10, 2010, 01:32:42 pm »
That is very cool. Great job on it :)




For the 51st time, that is not my card! (Magic Joke)

Offline xlibman

  • Now active at https://codewalr.us
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55807
  • Rating: +3148/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • CodeWalrus
Re: Xonix
« Reply #7 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
In case you are wondering where I went, I am still active in the TI community, but I left Omni back in 2015 for various  reasons. I might come back one day, depending of certain circumstances, but my new online home (despite me being Omnimaga founder in 2001) is now CodeWalrus ( https://codewalr.us ). Sorry for the inconveniences.

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Xonix
« Reply #8 on: August 10, 2010, 04:19:12 pm »
Do I see grayscale in the game? o.o

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Xonix
« Reply #9 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

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Xonix
« Reply #10 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.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Xonix
« Reply #11 on: August 10, 2010, 06:35:33 pm »
Just wondering, what happens if you trap a ball in a spot that gets filled in?

Offline shmibs

  • android & human bean
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • ohithur
    • View Profile
    • shmibbles.me
Re: Xonix
« Reply #12 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!

Offline tloz128

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 324
  • Rating: +58/-6
  • I feel asleep.
    • View Profile
Re: Xonix
« Reply #13 on: August 10, 2010, 08:47:26 pm »
I remember playing a version of this somewhere. It was really fun!  :D
Naaa... Na Nah Na Nana Na Nah... Hey Jude!

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Xonix
« Reply #14 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.