Help with Board Game Programming

Get help using Construct 2

Post » Sat Oct 26, 2013 11:18 pm

So I am attempting to create a checkers game for the iPad as well as another "platform". I got all the graphics drawn and objects placed on the layer. I only placed one checkers piece on the board so far so that I can test movement with it before adding others. I need some help with the movement events. I used the drag and drop behavior to allow the player to move the checkers piece around the board. I only found a few people trying to work on a similar game, with this one being the most advanced http://www.scirra.com/forum/simple-checkers-game_topic71842.html. However there are a few actions missing from his work such as:


  • When user attempts to place piece on red square instead of a black square, the piece should return to it's previous position.

  • Should not allow a piece to jump over a piece of the same color, only those with blank black squares around them should be allowed to moved.

  • ...I'm sure there is more, but I'll start with that.



Tried to search for a tutorial on such a game but haven't been able to find one. Any help would be fantastic.

In the meantime I'll email the OP of the previous thread to see if he is willing to share the project file for tips on getting the pieces to stick to the black squares when placed.

-Mike
Image
MIKE ASCHENBRENNER | RCMADIAX
Twitter/Instagram/Vine: @RCMADIAX
B
35
S
7
G
4
Posts: 186
Reputation: 4,579

Post » Sun Oct 27, 2013 1:49 am

Forgot to post link to sample project file for reference.

https://www.dropbox.com/s/tdqjhrazvkrxmoe/checkers_sample_1.capx
Image
MIKE ASCHENBRENNER | RCMADIAX
Twitter/Instagram/Vine: @RCMADIAX
B
35
S
7
G
4
Posts: 186
Reputation: 4,579

Post » Sun Oct 27, 2013 7:33 am

Have a look at this BoardGame

This covers so much of the basics.
Highlight spaces to move. Look at trigger when to touch each other and apply it to your game when black touches red.
You are going to use instance variables to store current location, so if piece has to go back, it can.
you don't need an image for each square, you can copy/clone/etc (drag it onto canvas so it is one image to multiple squares see manual / see example above.

Loads to learn from that little tutorial.

I started a board game and am still busy 5 months later. What I found best is to break it apart into components.
Movement
Interaction
Score
UI
Options
etc etc etc etc (long list)

And work on each component. Then put it together.
I use a primary event sheet and include the individual component event sheets. This way I can toggle them on / off and easly edit/manage/fix etc etc.

There is also a plugin made specifically for boardgames (I don't like using 3rd party plugins - for fear they don't get updated and months down the toilet) But it is an option.

Enjoy the ride, there are more people making boardgames in creations section, watch their progress.

Bottom line - variables and lots of checks.
Suggest you browse manual about functions - write the code once and add it all over using a single function (saves you time cuts your events down drastically)
Also, you will use if overlapping do this type stuff.
Check the link I gave, that little boardgame has tons of basics.


EDIT: Lol, don't use mouse object. Always Use touch. Touch works with mouse and screen touch. Especially if you going ipad, mobile etc. They don't have a mouse. So touch is multi platform.DUTOIT2013-10-27 07:58:36
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,728

Post » Wed Dec 23, 2015 4:58 pm

@Nutzaboutpoker do you still have your checkers example?
B
113
S
29
G
48
Posts: 1,882
Reputation: 36,578

Post » Wed Dec 23, 2015 6:55 pm

delgado wrote:@Nutzaboutpoker do you still have your checkers example?


No I do not - Sorry.
Image
MIKE ASCHENBRENNER | RCMADIAX
Twitter/Instagram/Vine: @RCMADIAX
B
35
S
7
G
4
Posts: 186
Reputation: 4,579

Post » Wed Dec 23, 2015 7:40 pm

delgado wrote:@Nutzaboutpoker do you still have your checkers example?


You can use rex board and squareTx to make a reliable board in C2.
plugin-board-layout2board-behavior-grid-move_t69647
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857


Return to How do I....?

Who is online

Users browsing this forum: Akia410, gameba, littlesaigon2 and 12 guests