This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Battleship

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
User avatar
Stefanoo
Voice
Posts: 16
Joined: Fri Mar 30, 2007 11:37 am
Location: irc.beirut.com
Contact:

Battleship

Post by Stefanoo »

Hello guys,
iv designed a battleship game on irc, the game must be a service or in our case here, a bot (tcl) and make it exempt from flood control in the ircd conf

the way i see it, this game could become one of greatest multiplayer irc games.

if there is anyone interested in taking part in the project, plz do let me know. (iv made a sample of it. i could show to those interested. poke me on irc)
cheers,
stef
Image
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

I would suggest posting a few information about how this script should be developed (or your design). Its seems like a fairly *not little* request, perhaps it can be developed step by step (like module by module). IMO, not too many (if any) people will bother contacting you to help you with your request, so if you want help from the forum's scripters I suggest you start giving more info.
User avatar
Stefanoo
Voice
Posts: 16
Joined: Fri Mar 30, 2007 11:37 am
Location: irc.beirut.com
Contact:

Post by Stefanoo »

Ok let me try to explain how it works..

first the game has to be played in two channels
lets say #battleship vs #battleship2 or if u wish u can make it work via pvt.

why two channels? so the player1 dont see player2's ships location. logic.

now open ur mIRC client and past these so u get an idea of how it looks

1,1.................................
1,1AA0,1 A1,1.0,1B C D E F1,1..1,1AA0,1 A1,1.0,1B C D E F1,1...
0,1 1 8,1#2,1 # 8,1# # 2,1# 8,1#1,1. 0,1 1 2,1#2,1 # # # # #1,1. .
0,1 2 8,1#2,1 # # # # #1,1. 0,1 2 2,1#2,1 # 4,1X 10,1*2,1 # #1,1. .
0,1 3 8,1#2,1 # # # 8,1# 2,1#1,1. 0,1 3 2,1#2,1 10,1* 4,1X 10,1*2,1 # #1,1. .
0,1 4 2,1#2,1 # 8,1# 2,1# 4,1X 2,1#1,1. 0,1 4 2,1#2,1 # # # 4,1X2,1 #1,1. .
0,1 5 2,1#2,1 # 10,1*2,1 # # #1,1. 0,1 5 2,1#2,1 # # # # #1,1. .
0,1 6 8,1#2,1 # # # # #1,1. 0,1 6 2,1#2,1 10,1*2,1 # # # #1,1. .
1,1.... 8,1Stefano 1,1..1,1.... 4,1Player 21,1 0000
1,1.............0,1 Fire! 1,1.............

now it says fire, its my turn.. so lets say i want to hit b5
!fire B5



1,1.................................
1,1AA0,1 A1,1.0,1B C D E F1,1..1,1AA0,1 A1,1.0,1B C D E F1,1...
0,1 1 8,1#2,1 # 8,1# # 2,1# 8,1#1,1. 0,1 1 2,1#2,1 # # # # #1,1. .
0,1 2 8,1#2,1 # # # # #1,1. 0,1 2 2,1#2,1 # 4,1X 10,1*2,1 # #1,1. .
0,1 3 8,1#2,1 # # # 8,1# 2,1#1,1. 0,1 3 2,1#2,1 10,1* 4,1X 10,1*2,1 # #1,1. .
0,1 4 2,1#2,1 # 8,1# 2,1# 4,1X 2,1#1,1. 0,1 4 2,1#2,1 # # # 4,1X2,1 #1,1. .
0,1 5 2,1#2,1 # 10,1*2,1 # # #1,1. 0,1 5 2,1#10,1 * 2,1# # # #1,1. .
0,1 6 8,1#2,1 # # # # #1,1. 0,1 6 2,1#2,1 10,1*2,1 # # # #1,1. .
1,1.... 8,1Stefano 1,1..1,1.... 4,1Player 21,1 0000
1,1.............0,1 Wait! 1,1.............

(now it says wait.. so we are waiting the player two to play..)

once he plays the game screen comes back to me to shoot.

Player2 Plays !C4

1,1.................................
1,1AA0,1 A1,1.0,1B C D E F1,1..1,1AA0,1 A1,1.0,1B C D E F1,1...
0,1 1 8,1#2,1 # 8,1# # 2,1# 8,1#1,1. 0,1 1 2,1#2,1 # # # # #1,1. .
0,1 2 8,1#2,1 # # # # #1,1. 0,1 2 2,1#2,1 # 4,1X 10,1*2,1 # #1,1. .
0,1 3 8,1#2,1 # # # 8,1# 2,1#1,1. 0,1 3 2,1#2,1 10,1* 4,1X 10,1*2,1 # #1,1. .
0,1 4 2,1#2,1 # 4,1X 2,1# 4,1X 2,1#1,1. 0,1 4 2,1#2,1 # # # 4,1X2,1 #1,1. .
0,1 5 2,1#2,1 # 10,1*2,1 # # #1,1. 0,1 5 2,1#10,1 * 2,1# # # #1,1. .
0,1 6 8,1#2,1 # # # # #1,1. 0,1 6 2,1#2,1 10,1*2,1 # # # #1,1. .
1,1.... 8,1Stefano 1,1..1,1.... 4,1Player 21,1 0000
1,1.............0,1 Fire! 1,1.............

my turn again.. and so on..

looks neat yeah?
Image
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Is this an mirc only thing? If it is, forget it..

If you look at the UNO script, for one example, you'd see you can easily play a game in a channel without revealing other players cards to each other (using privmsg to show the player their own cards.)

And yeah this is far from a small script you're looking to create. Start posting some code if you want help with things. If you're really just requesting someone to write the entire thing from scratch, good luck.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

No it's not an mIRC thing, it's an IRC thing (the client doesn't matter). Stefanoo it would help if you can show us example snapshots so we could get a better idea on how the script works.
Last edited by Sir_Fz on Sat Apr 07, 2007 9:50 pm, edited 1 time in total.
User avatar
Stefanoo
Voice
Posts: 16
Joined: Fri Mar 30, 2007 11:37 am
Location: irc.beirut.com
Contact:

Post by Stefanoo »

Image
m
minted
Halfop
Posts: 64
Joined: Wed Jul 20, 2005 9:58 am

Post by minted »

i love battleships.
would probably get addicted to playing it on irc if it was done right.
but i agree with above posts, best played in 1 channel, with ship locations/grid sent by privmsg/notice. 2 seperate channels is ugly/inconvenient/unnecessary.

just make whatever is sent to the seperate channels, get sent by privmsg to the different players. anyway, good luck!
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Take a look at the tic-tac-toe script I re-wrote for an idea of how to handle grids.

http://members.dandy.net/~fbn/tictactoe.tcl.txt

You could also add in the ability to play against the bot (just to add even more complexity to the script ;)
User avatar
Stefanoo
Voice
Posts: 16
Joined: Fri Mar 30, 2007 11:37 am
Location: irc.beirut.com
Contact:

Post by Stefanoo »

Im glad you guys liked it so far.

rosc2112, nice! and hey if you like tictactoe then i must show you one connect4. just amazing! u'll find it on my server. poke me when online.

now quoting to minted, true we can play it by notice or by pvt.. which is most probably better, but i thought of it being played on main so others could enjoy watching the fight. (now thats just a little opinion)

In fact we can do a system that when its my turn and the bot is displaying my map.. it ignores my ennemy. so he cant see my map. and when it comes to his turn, it ignores me so i dont see his map.. users in the room will see both..

now the question is:
Will we ever play this game? :P
Image
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Feel free to send or post a link to the connect4 script, and I'll look at it, if it's a tcl script.

Ignoring a user won't prevent them from seeing the bot's output, it would just prevent the bot from listening to that person.

As far as displaying things on channel, just show hits/miss msgs, instead of the entire game grid (reasons below).

As far as people playing a battleship game, yeah they probably would if it's not horribly slow, which I suspect might be a problem with such a large grid.

Keep in mind that showing such a large grid is going to be pretty slow, even if you use putquick. Or it'll flood the bot off the net if you use putserv. It'd probably be better to only show the grid to the players when they issue a command to redraw the grid for them. Then when the game is over, show the entire grid to the channel.

A better option would be to use dcc, that would be very fast for display, and would also make it possible to show each player their own grid after each turn. You'd have to give them dcc access of course, which might not be ideal, and then there wouldn't be any observers (if you allowed observers, who's to say that one of them isn't a cheater helping one of the players, or even IS one of the players under a different nick?)

Another consideration would be making the script capable of running multiple games between teams of 2 players. Sitting waiting for a game to finish so I could play against someone would be a drag. And then, how to manage queueing up games for people who are waiting to play? And, speaking of drag, if the game is in progress, or multiple games in progress, they're going to lag the bot.. Multiple bots on multiple channels maybe?

All just food for thought :)
User avatar
Stefanoo
Voice
Posts: 16
Joined: Fri Mar 30, 2007 11:37 am
Location: irc.beirut.com
Contact:

Post by Stefanoo »

i cant send the connect4 its a service not a tcl.

the battleship wont be slow because we will exampt it from the ircd. it will become just like the connect4. playable in x channels, by x number of players at the same time, and doesnt lag a sec. it may display 100 lines it wont lag.
Image
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Then it won't be available for other people to use the script? meh..
User avatar
Stefanoo
Voice
Posts: 16
Joined: Fri Mar 30, 2007 11:37 am
Location: irc.beirut.com
Contact:

Post by Stefanoo »

of course it can.
there are 4000 networks indexed in searchirc.com i am sure half of them if not more would be interested in such a game.

All these networks could then provide that service to the public.

Now regarding Undernet DALnet EFnet QuakeNet those few big ones.. well i doubte they would exempt it in the ircd. so the channel owner could run it, but maybe it will be slow there.. but playable still..
Image
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

I'm confused, is this going to be a publically available tcl script for eggdrop? Or something specific for irc servers?
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

As far as I understand, it's going to be a publicly available Eggdrop Tcl script which will be used on different IRC networks (i.e. any IRC network). Besides, it's going to be developed here so of course it's a public script.
Post Reply