Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #12732 |

    Hello again! I just recently dove into the code for Arkanoid and found it amazing. Incidentally Arkanoid is my favorite game type (in its many generations) so it’s nice to see one as clean as this. I find myself playing when no one is looking.

    Anyway I had some ideas to expand on it. It’s nice to get away from the code sometimes and ‘play’. I’ve been trying to come up with different block types, normal and unbreakable have overstayed their welcome. I’ve also tried to be creative while ensuring no major physics need to be added.

    One idea I had was the StickyBlock. A block set to it can randomly slow down the ball, even have the option of stopping it all together and shoot it off in a random direction again.

    Another is the PhantomBlock. A block that can only be hit on any set side to count as a hit. For example: A block where “top” is the only valid hit, so if the ball comes up from below, it would travel right through the block and only striked it on the way down. Granted some error checking would have to be included to make sure no one added blocks in invalid locations. Like a Top-only block located at the very top of the grid.

    The ConfusedBlock would defy physics in that the angle which the ball is bounced off has nothing to do in which it was hit.

    The RubberBlock would either temporarily or permanently speed up the ball.

    I was looking through the code and I wouldn’t know WHERE to begin with any of this. Please give me some feedback. I would appreciate it! And if any of you genius’ at Xceed want to hel tackle this, I would be forever grateful!

    Thanks,
    Nick

    Imported from legacy forums. Posted by Buggi (had 2968 views)

    Xceed Support
    Member
    Post count: 5658

    Hi Nick!

    I’m glad to see that you enjoyed the game! I was actually the one who did the coding in Arkanoid so I will be able to give you a starting point if you want to change the sample code to includes your ideas.

    First of all, you will need to add values in the BlockTypeEnum (you can find it in the ArkanoidEnumerations.cs file) for each type of block you want to add. The class that interests you is the BlockCell class. It is derived from the DataCell class of the grid. It is in charge of painting the block, checking to see if a block is destroyed, and so on. You can change the appearance of a block, depending on your new block types, in the PaintForeground event. As for changing the ball’s behavior, you will do that in the Hit method. This method is called by the Ball class. (which is in charge of painting the ball, make it move) You will probably need to add some parameters to the method to inform the ball what to do. You already have the direction and other parameters but you are missing one if you want to change the ball speed. (this method is actually implemented by the IHit interface so you will have to update every class that implement it)

    I hope this will help you achieve your goal!

    Imported from legacy forums. Posted by Jacques [Xceed] (had 283 views)

    User (Old forums)
    Member
    Post count: 23064

    Thanks for the tips to start! Sounds like a fun project. Pity I can’t work on it at home. :-/

    I have to thank you for a wonderful game. It’s simple, but entertaining and addictive. I love the little detail of a block shining if it requires more than one hit. Nice touch 😉

    The code is clean and well polished.

    I wish I had the opportunity to work on this at home, I might actually accomplish something! LOL.

    -Nick

    Imported from legacy forums. Posted by Buggi (had 3947 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.