You are not logged in or registered. Please login or register to use the full functionality of this board...
SIGN IN Join Our Community For FREE


Shogun Board Game in QB64
09-02-2017, 10:48 PM
Post: #1
 (Print Post)
Shogun Board Game in QB64

.bas  Shogun.bas (Size: 16.45 KB / Downloads: 6)                         Hello all,

Shogun is a 2 player board game. Each player has 7 pawns and 1 king piece. The object of the game is to either (1) capture your opponent's king or (2) capture 6 of your opponent's pawns. Pieces are captured by landing on them, like in chess. The pieces has a rotating disc inside with numbers from 1 to 4 on it. A window at the top of the piece reveals 1 of the digits on the disc. This number represents how many spaces that piece moves on that turn. There is a magnet located on the disc inside the piece and each positions on the board has a magnet in different locations. As the pieces move to different locations, the disc rotates an reveals a new number for that location. A piece can make 1 turn during it's move. There is a button at the bottom of the right hand side that allows the players to display the possible moves. This can be toggled on and off. When a player selects a piece, a white cursor surrounds that piece. If the player wishes to choose a different piece, they can select the same and the piece will be deselected. When the show moves is selected, gold cursors surround all then locations a piece can move to

I have included a photo which has a copy of the rules on it.

Hope you enjoy playing.

Donald
Find all posts by this user
Like Post
The following 1 user Likes Donald Foster's post:
johnno56
09-03-2017, 12:35 AM
Post: #2
 (Print Post)
RE: Shogun Board Game in QB64
saturates the cpu.
got to put a sleep 1 or qb64 equivalent in the loop.
Find all posts by this user
Like Post
09-03-2017, 01:22 AM
Post: #3
 (Print Post)
RE: Shogun Board Game in QB64
Very interesting! Board has nice look. Game... I wonder what an AI would be like because I can't think what would work as strategy, course at moment I can barely keep my eyes open...

Thank you Donald!

B += _
Find all posts by this user
Like Post
09-03-2017, 10:21 AM
Post: #4
 (Print Post)
RE: Shogun Board Game in QB64
Hello,

Thanks both of for trying out the game. I added a SLEEP 1 inside the loop and it locks the game up, you can't select any pieces. I don't know what will help the problem, but thanks for the input.

Donald
Find all posts by this user
Like Post
09-03-2017, 12:02 PM (This post was last modified: 09-03-2017 12:13 PM by bplus.)
Post: #5
 (Print Post)
RE: Shogun Board Game in QB64
Hi Donald,

Yeah, I tried _Limit 10 in all the mouse loops, 3 places, and that also stopped responding to mouse clicks.
I am not sure those loops are "real" or just a psuedo loop to get mouse events.

I confess with all the gosub's it's hard to tell where the main loop is.

While it's true a program should not hog the CPU, it's not so bad if a person is supposed to be only focused on the game and not multi-tasking which it just so happens Windows has been optimized for doing. I wonder about all these people who wince whenever the CPU gets used. Seems to me a proper OS would not allow a CPU to burn out as part of it's job.

B += _
Find all posts by this user
Like Post
09-03-2017, 06:24 PM
Post: #6
 (Print Post)
RE: Shogun Board Game in QB64
Not having played this game before, I had to rely on the 'instructions', which were - for me anyway - easy to follow... lol

The game played very well. No problems with the mouse or delay issues. I wondered if the 'numbers' on each piece were fixed or not. After a few moves it became obvious. Very clever game. But the game was too easy. I had no problem winning... mind you, I knew 'every' move my opponent planned to make, so a winning strategy was relatively easy to formulate... Perhaps it would not be so easy if the player was to compete against an AI... and NOT oneself... lol

Nicely done...

J

May your journey be free of incident.

Live long and prosper.
Find all posts by this user
Like Post
09-03-2017, 08:05 PM (This post was last modified: 09-03-2017 08:10 PM by Donald Foster.)
Post: #7
 (Print Post)
RE: Shogun Board Game in QB64
johnno56,

The main loop starts at label StartGame: and runs to just after comment ' Check for Winner. The 2 DO loops do check for mouse events. The game is intended to be played by 2 players sharing the same computer and alternating taking turns. 

The interesting thing about this game is that after you move your piece, the value on the piece may change, which gives that piece a different set locations to attack. It's almost like playing knight in chess and once the piece lands on it's new location, it becomes a bishop or a pawn.

The numbers that appear on the numbers are no random. The board can be rotated to any of the 4 sides when playing the game in real life. So I have the game choose a random board rotation. Next I have the computer choose a random location for the kings based on actual choices in the real game where to set up the kings. Each pawn and their patterns are numbered and randomly setup on each back row. I already have the position on each magnet in each location on the board for all 4 rotations. You'll find that info at the beginning of the code stored in strings as well as all the positions of the magnets in all of the pieces. So if you were to play the actual game, the numbers on the pieces would be exactly the same as on the computer during game play.

Thanks for trying my game and for the response.

By the way, to all readers: I have made some changes to the game like using the extra space on the right side to store the captured pieces. That version is found here.

Donald


Attached File(s)
.bas  Shogun.bas (Size: 16.69 KB / Downloads: 3)
Find all posts by this user
Like Post



Forum Jump:


User(s) browsing this thread: 1 Guest(s)




QB64 Member Project - Dakapo
QB64 Member Project - Input
QB64 Member Project - STxAxTIC 3D World
QB64 Member Project - Othello
QB64 Member Project - Score 4
QB64 Member Project - 9 Board
QB64 Member Project - Swirl
QB64 Member Project - Connect Four
QB64 Member Project - Amazon
QB64 Member Project - Sabotage
QB64 Member Project - RGB Color Wheel
QB64 Member Project - MAPTRIANGLE
QB64 Member Project - Splatter
QB64 Member Project - Exit
QB64 Member Project - Inside Moves
QB64 Member Project - Pivet version one
QB64 Member Project - Line Thickness
QB64 Member Project - Basic Dithering
QB64 Member Project - Qubic
QB64 Member Project - Rubix's Magic
QB64 Member Project - Dreamy Clock
QB64 Member Project - Kings Court
QB64 Member Project - Quarto
QB64 Member Project - Blokus
QB64 Member Project - Color Rotating Text
QB64 Member Project - Domain
QB64 Member Project - Bowditch curve
QB64 Member Project - Red Scrolling LED Sign
QB64 Member Project - Kobolts Monopoly
QB64 Member Project - Point Blank
QB64 Member Project - ARB Checkers
QB64 Member Project - Touche
QB64 Member Project - Color Triangles
QB64 Member Project - Rotating Background
QB64 Member Project - Isolation
QB64 Member Project - Kings Vallery version two
QB64 Member Project - Spinning Color Wheel
QB64 Member Project - Full Color LED Sign
QB64 Member Project - Martin Fractals version two
QB64 Member Project - Martin Fractals version one
QB64 Member Project - OpenGL Triangles
QB64 Member Project - Martin Fractals version four
QB64 Member Project - Foursight
QB64 Member Project - Spiro Roses
QB64 Member Project - Martin Fractals version three
QB64 Member Project - Algeria Weather
QB64 Member Project - Pivot version two
QB64 Member Project - Kings Valley verion one
QB64 Member Project - Overboard