Author Topic: Xonix  (Read 10212 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 TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
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 :)
Spoiler For Spoiler:



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

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
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

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

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • 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.