Simple .NET Strategy Game
Simple .NET Strategy Game
Simple .NET Strategy Game
Simple .NET Strategy Game
Simple .NET Strategy Game
Simple .NET Strategy Game Simple .NET Strategy Game Simple .NET Strategy Game Simple .NET Strategy Game Simple .NET Strategy Game Simple .NET Strategy Game Simple .NET Strategy Game Simple .NET Strategy Game
Simple .NET Strategy Game Simple .NET Strategy Game
Simple .NET Strategy Game
Go Back  Xtreme Visual Basic Talk > > > Simple .NET Strategy Game


Reply
 
Thread Tools Display Modes
  #1  
Old 08-30-2004, 08:23 AM
Iceplug's Avatar
IceplugSimple .NET Strategy Game Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default Simple .NET Strategy Game


Here's a simple little strategy/board game that I wrote last week for .NET 2003. (Hopefully to stir up the .NET Game Programming section a little)

I've included thirty levels in the game and also some tricky computer AI.
Let me know what you think.

Edit: Scroll down to Post #4
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!

Last edited by Iceplug; 08-30-2004 at 02:00 PM.
Reply With Quote
  #2  
Old 08-30-2004, 08:54 AM
Faith's Avatar
Faith Faith is offline
Contributor
 
Join Date: Sep 2003
Location: Finland
Posts: 690
Default

Too addictive *twitch* *twitch*
Looks as if it is based on fuzzy logic.
Cool!
I intend not to check the code anyhow, it'd take me 10 hours to get some reason outta it. How'd you make the different level presets? Did you code them???
Addictive as hell...
__________________
I love deadlines. I like the whooshing sound they make as they fly by. - Douglas Adams
Reply With Quote
  #3  
Old 08-30-2004, 11:06 AM
Faith's Avatar
Faith Faith is offline
Contributor
 
Join Date: Sep 2003
Location: Finland
Posts: 690
Default

Got an error message in Level 23 (Tic tac toe), when moving my green guy one down over the stone block.
The red block AI makes some sort of error:
The function is #InjectTileHere#, in which the error occurs. You probably can get the error by trying to do what I did a couple of times... Move your dude down one block over the stoneblock. (Don't think this is relevant)

(Additonal info)
XTile = -1
YTile = -1
Owner = This apparently can be any of the 3 (Got it with 3&2)

The Error message is like this:
Index was outside the bounds of the array.

Looks like a very aggravating thing to debug...
VERY ADDICTIVE A GAME, ****!!!
__________________
I love deadlines. I like the whooshing sound they make as they fly by. - Douglas Adams
Reply With Quote
  #4  
Old 08-30-2004, 01:57 PM
Iceplug's Avatar
IceplugSimple .NET Strategy Game Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

The levels are all hardcoded within the
Private Sub At_LevelClick()
event handler, which is like the third to last subroutine.

You might have a bit easier time following the subroutines if you do Ctrl+M, Ctrl+O to collapse all of the subroutines to one-line headers. Then, the comments above each subroutine lie just over each subroutine.

The error message is a very classic one that I'm used to... what it is is a move that has clearly been invalidated making it through the MoveSelection process.

Try this version and see if you get the same error.
Attached Files
File Type: zip JumpCross.zip (111.0 KB, 194 views)
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #5  
Old 08-30-2004, 03:28 PM
Faith's Avatar
Faith Faith is offline
Contributor
 
Join Date: Sep 2003
Location: Finland
Posts: 690
Default

Can't get the same error anymore
The game is too catchy *click click*
I'll sew you or something


*click*
*click*

*click*
*click*


*click
ARR!!
__________________
I love deadlines. I like the whooshing sound they make as they fly by. - Douglas Adams
Reply With Quote
  #6  
Old 08-31-2004, 10:06 PM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

Hmmm... I can't seem to get the *click* of it.

Looks great, I just feel clueless as usual. What are the rules? I guess the objective is to get across or form a link across?? But I don't really understand how to move.

Any tips?
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
  #7  
Old 08-31-2004, 11:57 PM
BlackStone's Avatar
BlackStone BlackStone is offline
Regular
 
Join Date: Jun 2004
Posts: 81
Default

I think the point of the game is to reproduce and "assimilate" all of the opposing thingees. You move or reproduce by clicking on the thingee you want to move and the circle(button?) you want to move to. When you come in contact with another color, you assimilate them to your color.

It is a little addictive.

PS: Are you supposed to win just by surrounding the opposing team??
Reply With Quote
  #8  
Old 09-01-2004, 07:30 AM
Iceplug's Avatar
IceplugSimple .NET Strategy Game Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

Rules:
Win by claiming 100 pegs first. If no one can reach 100 pegs, the person who has the most pegs when no one can move is the winner.

If you move a peg one square, the original peg retains its position, but if you move two squares, the original peg is lost.
First, click on the peg that you want to move, and then click on the space where you want it to move.
If you move to a place with pegs in the adjacent squares, then they will be 'captured' and turned to your color. Use this to increase your peg count and to lower the other teams peg count.

The gameplay itself was based on two or three other games that I've played with similar rules.
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #9  
Old 09-01-2004, 01:10 PM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

Huh, neat... a bit like muli-player Go.

And a pretty sophisticated implementation!
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
  #10  
Old 04-07-2005, 04:13 PM
VB_Alien VB_Alien is offline
Senior Contributor
 
Join Date: Apr 2004
Posts: 854
Default

This is a cool game. The bad news is my mouse finger caught a cramp
and i had to quit.
Reply With Quote
  #11  
Old 04-07-2005, 04:47 PM
noi_max's Avatar
noi_maxSimple .NET Strategy Game noi_max is offline
Still asleep...

Retired Leader
* Expert *
 
Join Date: Nov 2003
Location: IronForge
Posts: 2,694
Default

Hey cool!
Cool Spot? (hehe.)

I think my mouse is broken. (click click click)

I ran this on the .NET 2005 express beta so I could check it out. (Don't have .NET yet)
Found the computer easy to beat.. until I cranked the AI up of course.

Edit: Ooops! Sorry to dig up this old thread. I don't know how I miss these cool game posts. Found out about it from your sig.
__________________
~ Jason

Use [vb][/vb] tags when posting code :) || Search the forum and MSDN|| Check out the Posting Guidelines

Last edited by noi_max; 04-07-2005 at 04:53 PM.
Reply With Quote
  #12  
Old 04-08-2005, 10:37 AM
elnerdo's Avatar
elnerdo elnerdo is offline
Contributor
 
Join Date: Jul 2004
Location: Northern New Jersey
Posts: 490
Default

I had a problem in level 23. I still had a move that I could do but it was continuously skipping my turn until I lost. ( the tic tac toe level ) I had all my pegs in the top middle part and the top left corner was open but my turn was being skipped.

Other than that, this is one of the most fun games I've ever played in vb.net


edit: i got an index is outside of the bounds of the array error when i lost and red won. and when i had 0.

edit again: oo another one, I exited in the middle of the computer's turn and i got a generic error in gdi+ (I'm not pointing these out to be annoying, just to be helpful )
__________________
nerds unite!

Last edited by elnerdo; 04-08-2005 at 10:57 AM.
Reply With Quote
  #13  
Old 04-08-2005, 07:29 PM
by_m's Avatar
by_m by_m is offline
Contributor
 
Join Date: Jul 2004
Location: Texas
Posts: 661
Default

Yeah, I got some 'Index Out of Range' Errors as well, it seems the variables passed have a value of -1. I'll probably look into that and see. Other than that, I just spent my entire day passing all the levels (which I did), along with trying different combinations of opponents and beat them all (including 6 people on hardest), but I'm having a pretty rough time beating 1 on 1 with the opponent on hardest, haven't done it yet. It's way too addicting... Iceplug, this game will be outlawed.
__________________
170 10101010 410 J31^170
Reply With Quote
  #14  
Old 04-12-2005, 03:48 PM
by_m's Avatar
by_m by_m is offline
Contributor
 
Join Date: Jul 2004
Location: Texas
Posts: 661
Default

I found what was making the error I had...
To get the error go to level 1 (it doesn't actually have to be that level), make a move, and before the others can finish moving, click on level 1 again from the menu.
From what I saw the move gets invalidated (set to point -1,-1) so that you can't move while the others are moving. Then when you restart the level, it's still invalidated, and when you pass it that data it draws an error.
__________________
170 10101010 410 J31^170
Reply With Quote
  #15  
Old 04-16-2005, 07:03 AM
Iceplug's Avatar
IceplugSimple .NET Strategy Game Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

Thanks. Now it should be fixed.
Attached Files
File Type: zip JumpCross.zip (89.7 KB, 46 views)
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #16  
Old 04-19-2005, 04:39 PM
by_m's Avatar
by_m by_m is offline
Contributor
 
Join Date: Jul 2004
Location: Texas
Posts: 661
Default

Cool, it works.
On another note, I have been trying to find .Net games for a while now, this has been very cool. Are you planning on a Quadrill 4, possibly in VB.net? I saw the threads for the first 3 and it sounded pretty cool, sadly I can't run VB6 code.
__________________
170 10101010 410 J31^170
Reply With Quote
  #17  
Old 04-19-2005, 06:00 PM
elnerdo's Avatar
elnerdo elnerdo is offline
Contributor
 
Join Date: Jul 2004
Location: Northern New Jersey
Posts: 490
Default

I agree with by_m. I'm very happy that you're making games in .net. Not many people are (yet)

Also, This game is one of the most fun games I've ever played.
__________________
nerds unite!
Reply With Quote
  #18  
Old 04-20-2005, 05:41 AM
herilane's Avatar
herilaneSimple .NET Strategy Game herilane is offline
Unashamed geek

Retired Moderator
* Expert *
 
Join Date: Jul 2003
Location: London, England
Posts: 8,988
Default

I'd missed the original post... thanks for resurrecting this thread, I loved the game!

My favourites were the "landscaped" levels with various sorts of walls, where capturing certain areas early gave you an advantage. I liked them better than the levels with special balls (the black and white and other ones). They took away some of the cleanness and simplicity of the basic idea.

Now can we get more levels please?
Reply With Quote
  #19  
Old 04-20-2005, 05:50 AM
italkid's Avatar
italkid italkid is offline
Down...

Retired Moderator
* Expert *
 
Join Date: Dec 2002
Location: Belgium.
Posts: 6,731
Default

I really should install my .Net once (in May I'll have it a full year without ever been installed... )

Downloaded the game though...that's a good start...
Reply With Quote
  #20  
Old 04-20-2005, 01:42 PM
elnerdo's Avatar
elnerdo elnerdo is offline
Contributor
 
Join Date: Jul 2004
Location: Northern New Jersey
Posts: 490
Default

Iceplug, I think adding a map editor ( that the user can use ) would be awesome for this game.
__________________
nerds unite!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Simple .NET Strategy Game
Simple .NET Strategy Game
Simple .NET Strategy Game Simple .NET Strategy Game
Simple .NET Strategy Game
Simple .NET Strategy Game
Simple .NET Strategy Game Simple .NET Strategy Game Simple .NET Strategy Game Simple .NET Strategy Game Simple .NET Strategy Game Simple .NET Strategy Game Simple .NET Strategy Game
Simple .NET Strategy Game
Simple .NET Strategy Game
 
Simple .NET Strategy Game
Simple .NET Strategy Game
 
-->