Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Go Back   Code Forums > Site Goodies > Saline's Brain Teasers
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 03-11-2003, 09:16 PM   #1 (permalink)
saline
I am red.
 
saline's Avatar
 
Join Date: Feb 2003
Location: Cleveland, OH
Posts: 139
saline is on a distinguished road
Spring Break Game Fest

Ok, so I'm on spring break. You may be wondering where I am. Acupulco? Daytona Beach? Some tiny secluded tropical island? NO, NO and No dammit! Actually the only place I went was Erie Pennsylvania. Cold, dreary, so totally not tropical, Erie Pennsylvania. None the less I had a good time and was hard pressed for what to do this week for the brain teaser. Finally I came up with a good idea.

More games.

It seemed like people liked the games most as the posts and views have been going down down down. So we'll see if games won't perk them up again.

Games that peoples should try:

Tic Tac Toe

Making a game where two people play against each other is a good challenge for the newbie. You have to keep track of who's turn it is in order to place the right picture in the right space. You need to know where was clicked and when there are three in a row if ever. Bonus, identify games where it should be a tie (this is often).

A harder version is programming the computer to play tic tac toe. It should be possible that the computer can play to a tie almost (if not always) every time. There are a bunch of ways to do this. When I did it I created a weight system for each of the nine spaces and with each move the weights of the varying spaces changed depending on their importance to the current situation, it was largely defensive. Another way is to just make a bunch of if statements but personally I think thats lame as all get out.

Next!!!

The lines and dots to make boxes game, dealy thing...

I don't really know the name of this game its where you have a grid of dots and connect them trying to make boxes. Any box that is closed by a player is claimed by that player and counts as a point for that player...

OK that was a bad explanation but I found an excellent example online.

http://www.well.com/user/argv/java/dots.html

There are a lot of options for this game, all of which can make an implementation easier or harder. It doesn't even have to be a square or rectangle board, I've seen triangles and pentagons and octagons oh my! It can be a challenge even for experienced programmers.

Next!!!

Scorched Earth

When I did this game it was as a team effort between me and a friend at school. He did the physics engine and the animation for the tank and I did the terrain generator and some other littl extra bits. The basic premis is that there are two (or more) tanks on a hilly terrain. They cannot move and can only control the angle they fire at and the force behind the shot. You have to aim at the other tank appropriately. The explosion expands to a fair size circle and eats away the ground that it hits. It's very similar to Worms if you've played that.

Examples:

Scorched Earth:
http://www.scorch2000.com/
http://www.classicgaming.com/scorch/

Ok, so we're all gamed out and I'm now addicted to scorch2000, hope you all enjoy trying these as much as I'm enjoying spring break, see you next week.

Oh by the way, feel free to post on these forums. I'm thinking that maybe people aren't sure whether they're supposed to or not, I'm here to say yes, if you want to ask something or say something please do so.
__________________
saline is offline   Reply With Quote
Old 03-11-2003, 11:27 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
i'm definately in on this one =)

i'll be attempting a php version of tic tac toe

great idea!
__________________
sde is online now   Reply With Quote
Old 03-12-2003, 04:00 AM   #3 (permalink)
Travis Dane
Code Monkey
 
Travis Dane's Avatar
 
Join Date: Feb 2003
Location: Netherlands
Posts: 89
Travis Dane is on a distinguished road
Send a message via ICQ to Travis Dane
I'll give a go for TicTacToe as well.

By The Way,
Quote:
You may post new threads HTML code is OFF
You may post replies vB code is ON
You may not post attachments Smilies are ON
You may edit your posts [IMG] code is OFF
Is this going to change? I've posted about it on the Feedback
but never got an answer, Thanks.
__________________
OpenGL, DirectX
Travis Dane is offline   Reply With Quote
Old 03-12-2003, 09:53 AM   #4 (permalink)
saline
I am red.
 
saline's Avatar
 
Join Date: Feb 2003
Location: Cleveland, OH
Posts: 139
saline is on a distinguished road
attatchments

Thats a good question. I've debated attatchments. It would be cool to put the programs people write up so others could see. Unfortunately that might take a lot of bandwidth and since I don't pay for that it would be unfair to those who do. Thats not the only reason but it's probably the biggest. I would recommend posting the source code or perhaps establishing a website on one of the free servers just to host the things you write.

thanks for asking.
__________________
saline is offline   Reply With Quote
Old 03-13-2003, 11:20 AM   #5 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
i almost have a working version of my php tic tac toe =)

is anyone else working on one?
__________________
sde is online now   Reply With Quote
Old 03-14-2003, 03:48 PM   #6 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
it's a little buggy and not tested a whole lot .. i want to work on it more .. but check this out.

www.codenewbie.com/tic_tac_toe.php

php/mysql based tic tac toe built into the data structure of vbulletin. you must be a member and logged in to challenge another codenewbie user to a game of tic tac toe.

when you challenge a user, they are sent an email informing them of the challenge with a link to the game directly.

on the main page, it will show the last 10 games you that are not finished .. as well as the last 10 games that are complete.

anyone can view any game, .. however only the player whos turn it is can make a move.

the script knows who you are based on your forum cookie and vbulletin authentication.

i'm gonna work on it a bit more to tighten things up. let me know of the bugs you find =)

have fun
__________________
sde is online now   Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help for another program Androto Standard C, C++ 54 10-15-2004 07:21 AM
Please HeLp Wid A game of 3 x 3 tic-tac-toe (noughts and crosses) in C++ Nightmare Standard C, C++ 1 08-11-2004 10:36 AM
My game Dodo Standard C, C++ 2 06-27-2004 10:48 AM
Word association game! Eyelfixit Lounge 53 07-12-2003 11:23 PM
Spring Break w00t Lounge 5 04-16-2003 12:53 PM


All times are GMT -8. The time now is 12:09 AM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle