Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Uncle Jack's Revenge Game Release! (By LinkChef)

game first release bugs c# .net fun linkchef uncle jacks revenge

  • Please log in to reply
9 replies to this topic

#1 LinkChef

LinkChef

    CC Regular

  • Member
  • PipPipPip
  • 47 posts
  • Location:U.S.A.
  • Programming Language:C#, JavaScript, PL/SQL
  • Learning:Java, C#, JavaScript, PL/SQL, Visual Basic .NET

Posted 21 March 2013 - 07:33 PM

Hello Everyone!  I've been working on this for about a month and a half now, working on it about an hour and a half every other day, and it's finally done!  The game is called Uncle Jack's Revenge and it's a simple, (but not so simple) logic game involving pennies!
 
Rules:

  • Your goal is to NOT take the last penny.
  • There are 3 rows:  The first row with 5 pennies, the second row with 4 pennies, and the third row with 3 pennies.
  • You are allowed to take as many pennies as you want from any COLUMN, but not from multiple rows.

Features:

  • Singleplayer support with intelligent AI
  • Supports multiplayer with a friend
  • Full instructions/Reset game function
  • Fully mouse OR keyboard controlled with tabs and buttons that support the enter key
  • Made with C# and .NET 3.5 Framework
  • Full application install with Desktop shortcut
  • Windows application color scheme:  No gaudy looking UI

As you can see, I'm really excited!

 

READ ME!

This is actually my first fully featured Windows Form program.  Although I'm really excited, I know that there are probably bugs, there are some parts that could be better design wise, and there are probably smarter programming techniques than the ones I used, even though I very much tried not to brute-force any of my code, and I really do like and feel good about my code.  I've added the source code and all the resources, (pictures) that I used to code the program, and I mean ALL of them, from the Program.cs, to the Designer.cs.  If you find a bug, or something else to help fix the program, PLEASE TELL ME, or if you feel like helping me out a bit, look through the code and see if you can find it yourself.  I would GREATLY appreciate it. :thumbup1:

 

Lastly:

If you want to spread this all over the interwebz, specifically, the games section of the CodeCall forums, *hint* *hint*, I don't mind except for 2 conditions:

  1. Keep the source code out when you share it.  I only want the code to be here on the CodeCall forums, because I really like you guys, and you've been really supportive of all of my questions, and I love the feel of the community here.  Therefore, I've given you a small bit of trust to the code I release.  So, if you send it to any other sites out there, keep the code out.  If they want to tinker with it, I want them to come here, and see the cool forums too.
  2. Please give credit to me.  I have been working on this for a very long time, and I feel that the AI in this program is some of the best coding work I've ever done.  So tell them who made it, and don't rip me off please.  :rolleyes:

I think that's it!  If I missed something, I'll edit it in the future.  I might add a screenshot if you ask for it as well, although, it's not mind-blowing or anything.  Oh, and believe me, there's no virus if you get it from here anyway, I uploaded it myself, and if it does, the internet apocalypse happened, and demons are now flowing out from your computer.  Anyway, as always, thank you for reading, and I hope you enjoy!

 

Changelog:

 

3/21/2013 - 1.0.0.0 - First Full Release

3/27/2013 - 1.0.0.5 - Bug Fixes, and a better looking penny-removal animation and a better AI loading indicator, (the mouse-cursor shows the traditional loading circle).  Also, if you hit "Enter" when your tab function is on anything besides instructions, it will automatically send in your next move.

Attached Files


Edited by LinkChef, 27 March 2013 - 07:34 PM.

  • 1

I'm Batman!  ~Batman


#2 BenW

BenW

    CC Devotee

  • Community Manager
  • 976 posts
  • Programming Language:ActionScript
  • Learning:ActionScript

Posted 24 March 2013 - 03:56 PM

I won! After a few tries to get the hang of it :)

 

Are you going to keep working on it based on feedback?

 

I have a few suggestions for improvements if you'd like them, but if not, it's great work anyway! :)

 

Also, I moved this to the Community Member Projects board since it's a finished project.


  • 1

fss_overall.png

 


#3 KodeKool

KodeKool

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 276 posts
  • Location:Ontario Canada
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Transact-SQL, ActionScript, Others
  • Learning:Python, Perl, Ruby, Lua

Posted 24 March 2013 - 04:07 PM

wow. nice game. Unfortunately it didnt last very long for me. i used to play this game all the time in elementary school :P good one though. I like the layout


  • 0

~A program will always do what you tell it to do, and seldom what you want it to do~

Check out my latest PHP tutorial


#4 LinkChef

LinkChef

    CC Regular

  • Member
  • PipPipPip
  • 47 posts
  • Location:U.S.A.
  • Programming Language:C#, JavaScript, PL/SQL
  • Learning:Java, C#, JavaScript, PL/SQL, Visual Basic .NET

Posted 24 March 2013 - 04:14 PM

I won! After a few tries to get the hang of it :)

 

Are you going to keep working on it based on feedback?

 

I have a few suggestions for improvements if you'd like them, but if not, it's great work anyway! :)

 

Also, I moved this to the Community Member Projects board since it's a finished project.

 

Honestly, I had a few of my friends play it, and they found a few AI bugs that need to be fixed.  As well, I think my try and catch doesn't work as well as it should either, because occasionally my message box doesn't pop up like it should.  So basically, yeah, I'm going to keep working on it, so of course I'll take the advice.  However I'm probably not going back to this until I finish my password generator, still trying to figure out how to convert a string to a multi-dimensional array, so yeah.

 

And hey, thank you very much, didn't know that board was there!  I'll post my finished programs there from now on!  



wow. nice game. Unfortunately it didnt last very long for me. i used to play this game all the time in elementary school :P good one though. I like the layout

 

It's alright.  It's almost like one of the games packaged with Windows.  Something you barely use, but it's fun for a few minutes.  Except for the 3D Space Pinball.  I played that game for hours...


  • 0

I'm Batman!  ~Batman


#5 KodeKool

KodeKool

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 276 posts
  • Location:Ontario Canada
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Transact-SQL, ActionScript, Others
  • Learning:Python, Perl, Ruby, Lua

Posted 24 March 2013 - 04:45 PM

Just found a bug (found it in the source code, but was confirmed while playing) because you're using arrays, and arrays have to have a fixed amount of index's. you're code suggests a user can select a number of coind from a row. still within the rows limit. even if there aren't that many coins there.

 

Example:

Jack goes first.

 

Row:1 Coins:3

Coins left in row 1: 2

 

My Turn:

Row:1

Coins:4

 

This will result in the game crashing because of an arrayIndexOutOfBounds exception. 

 

Potential Solution:

 

I'm not too familiar with C#, however I've come across a time programming in java where I had to use a "flexible array" where if needed the program could adjust the index's on the fly.

 

However regular arrays don't have this capability. so I had to use an ArrayList. Which was basically an array on steroids.

 

ArrayLists Provided the flexibility I required. however the issue (for me) was that ArrayLists don't have to hold just one type of data like arrays. so I had to use type casting to specify only one specific datatype,

 

Anyways, ya. I figured I'd let you know :P im currently tinkering around in the source code. adjusting necessary arrays to ArrayLists.

 

It's not really a bug. seeing as how the only way you'd run into it is by trying to brake the program. which is exactly what I was trying to do (good job on catching the 0 btw. I had to laugh at how simple it would have been to win had you not :P )

 

I figured it was worth mentioning though :laugh:



also. uncle jack randomly selects rows or numbers of pennies that extend the limit as well. his values are shown as game ending moves. 

 

Examples I've seen:

 

Row:0

Pennies:1

 

Row:2

Pennies:8

 

Row:5

Pennies:1


Edited by KodeKool, 24 March 2013 - 04:45 PM.

  • 0

~A program will always do what you tell it to do, and seldom what you want it to do~

Check out my latest PHP tutorial


#6 LinkChef

LinkChef

    CC Regular

  • Member
  • PipPipPip
  • 47 posts
  • Location:U.S.A.
  • Programming Language:C#, JavaScript, PL/SQL
  • Learning:Java, C#, JavaScript, PL/SQL, Visual Basic .NET

Posted 27 March 2013 - 07:35 PM

Hey, I updated the game!  I looked at some of the bugs, and took out a nice chunk of them hopefully.  As always, feel free to try to break it, we'll see if I need to fix anything else!  Thank you!


  • 0

I'm Batman!  ~Batman


#7 KodeKool

KodeKool

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 276 posts
  • Location:Ontario Canada
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Transact-SQL, ActionScript, Others
  • Learning:Python, Perl, Ruby, Lua

Posted 28 March 2013 - 07:09 AM

great job. lol. It's unbreakable! :P lol, this is going to waste so many hours being played while waiting for my videos to render :)


  • 0

~A program will always do what you tell it to do, and seldom what you want it to do~

Check out my latest PHP tutorial


#8 BenW

BenW

    CC Devotee

  • Community Manager
  • 976 posts
  • Programming Language:ActionScript
  • Learning:ActionScript

Posted 28 March 2013 - 10:55 AM

Next up you should add the option to start with a random number of rows and coins per row! Unless that's there already and I missed it :laugh:


  • 0

fss_overall.png

 


#9 RhetoricalRuvim

RhetoricalRuvim

    JavaScript Programmer

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1311 posts
  • Location:C:\Countries\US
  • Programming Language:C, Java, C++, PHP, Python, JavaScript

Posted 28 March 2013 - 01:26 PM

Okay, I just looked at it, and I have a couple of comments.

First, maybe there could be a way to automatically fill in the 'row' textbox when the user clicks on a row?

The other thing, when there's only one row left with pennies, could the program perhaps infer that it's the row the user is trying to get pennies from? I mean, there was only row number 3 left for me (the other rows were empty), and I tried leaving the row textbox blank, but the program still said to enter the row number.


Other than that, I'd say your AI system is pretty smart :) . I tried a few times, and I couldn't win.


EDIT: Okay, I finally got to win this time...

EDIT: So my idea of the strategy for this would be to first get rid of the third row by taking out all three pennies. Then the idea would be to try to get one row be with one penny and another row with one or more pennies. At that point, winning is just a matter of clearing the row that does not have only one left.

Edited by RhetoricalRuvim, 28 March 2013 - 01:37 PM.

  • 0
Regards,
RR

#10 LinkChef

LinkChef

    CC Regular

  • Member
  • PipPipPip
  • 47 posts
  • Location:U.S.A.
  • Programming Language:C#, JavaScript, PL/SQL
  • Learning:Java, C#, JavaScript, PL/SQL, Visual Basic .NET

Posted 28 March 2013 - 08:42 PM

Yeah, I did make the AI beatable.  No one likes losing everytime.  However, if you go first, there is a secret move that's been debated for a while now, that if you do this move during the first time in the game, if you play smart, the other person cannot win at all.  I don't have a move for the AI to do this, as I've tried a lot of times, and there's always a chance for me to beat him anyway, but supposedly, it's possible.

 

Second, ok, I'll add a clickable row thing to do that.  Wouldn't be too hard whatsoever.

 

Third, I actually left the one penny thing in on purpose.  I call it "The Penny of SHAME".  I know you realize you've lost, but it's always fun to see someone's reaction when they see the last penny and HAVE to take it.  I know it's an annoyance for some, but it's fun for me  :P


  • 1

I'm Batman!  ~Batman






Also tagged with one or more of these keywords: game, first, release, bugs, c#, .net, fun, linkchef, uncle jacks revenge

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download