Turn based and/or card game?

For questions about using Classic.

Post » Thu Dec 06, 2007 5:27 pm

Is it possible to make an online cardgame with this, or a turn-based tactical?

I don't see an obvious way to implement anything that isn't movement-based. Am I dealing with the wrong game creator, or just missing something?
B
1
G
5
Posts: 4
Reputation: 1,233

Post » Thu Dec 06, 2007 6:00 pm

You can do pretty much anything in construct.

When MK makes his online extension you'll be able to make your card game online. Use the event sheets to do anything that cant be done with construct's inbuilt movement stuff.

I almost never use inbuilt stuff. Construct is ALOT more than that.
B
2
S
2
G
5
Posts: 448
Reputation: 2,546

Post » Thu Dec 06, 2007 6:50 pm

Goodie. Now the fun part. Figuring out how to DO that, in the absence of relevant tutorial and rather minimal documentation.
B
1
G
5
Posts: 4
Reputation: 1,233

Post » Thu Dec 06, 2007 7:13 pm

I'd like to be able to click on, say, one object, and then on a space or another object. And have things happen as a result. I can dig the object interactions and private variables, yay. But I don't see how to implement clicking on a card or a miniature.
B
1
G
5
Posts: 4
Reputation: 1,233

Post » Thu Dec 06, 2007 8:11 pm

You have to add the Mouse&Keyboard object to your layout (assuming you haven't already).

Then in your event editor you set up your event with the Mouse&Keyboard object like so:

-> M&K On Left Clicked on cardSprite
+ do stuff

Here's a little test .cap to show you how you might do it:

http://www.mediafire.com/?blzyjuwnzfn

It's very basic, but it works. Click a card, then click a space, and the card moves to that space.

It works by putting the unique ID of whatever card you clicked into the global variable "cardPicked." Then when you click a space, it checks to see if there's a card picked (cardPicked > zero). If so, it looks up the family "Cards" and finds the one with the UID that matches cardPicked, and positions just that one. Then it resets cardPicked to zero.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Dec 06, 2007 8:20 pm

Thank you! That is a help.
B
1
G
5
Posts: 4
Reputation: 1,233

Post » Fri Dec 07, 2007 9:43 am

Out of curiosity, has there been anyone who's done work on this sort of thing? I'm working with DannyboyO1 on this project, and it'd be nice to see someone else's work if its along the turn-based vein (Deadeye's example was a great leap in the right direction, though--Many thanks!)

Also, I see talk about various plugins and such for Construct, but... I can't seem to actually *find* any anywhere. Someone off-site had mentioned an RTS plugin for the program, but if there's a community repository for this sort of thing I can't figure out where it is. This is potentially due to my own stupidity, so I'll gladly accept being called an idiot if it's somewhere obvious that I'm overlooking. ;P
B
1
G
5
Posts: 2
Reputation: 1,229

Post » Fri Dec 07, 2007 10:03 am

The RTS plugin is already in Construct.
Create a sprite, look at the stuff on the left side of Construct, and you will find the RTS plugin under "Movement".

It's quite nice. I'm using it in my game, but not as selectable tanks and soldiers but as a pathfinding AI for my enemies in the RPG-like game I'm making. :)

As far as I know there doesn't exist much 3rd party plugins yet. But Construct is still in Beta and people is probably busy with learning the app first and find the bugs in it. :)
I guess the Wiki will be the place to visit once there is some plugins available.
B
2
S
1
G
5
Posts: 50
Reputation: 1,500

Post » Fri Dec 07, 2007 2:19 pm

Then yes, it did come down to me being an idiot. ;)

I just discovered the program yesterday, and have yet to really sit down and dig through it--Same with Dannyboy. But we're both really excited by the possibilities. With any luck we can fine-tune it to what we're wanting.

Expect many more potentially stupid questions from us in the future. =)
B
1
G
5
Posts: 2
Reputation: 1,229

Post » Fri Dec 07, 2007 8:29 pm

To make something turn-based (like your card game) you just have to limit what actions can be done at certain times. This all depends on how you set up your conditions.

For instance, if it's player 1's turn, obviously player 2 shouldn't be able to move his cards around. So add that to your condition with a variable like:

-> M&K On Left Clicked on Family "playerTwoCards"
-> System Compare "playerTurn" Equal to "1"
+ make an error sound

There's nothing built in to Construct that automatically allows for turn-based play, you'll have to create it. Just as there's nothing that automatically allows for destroying an alien ship and adding points to your score. Those are game rules that you have to define manually.

The best thing to do is plot an outline of how your game will work on paper. What are the steps you need to take during a turn? What defines the end of a turn? What information is it necessary to keep track of? Player health? Number of cards in the deck? Number of cards on the field? Create variables for these things as you need them to keep track.

Even though Construct doesn't use a programming language, it still requires a programming mindset. Does player one click the "End Turn" button? Then set "playerTurn" to 2, and do whatever else is necessary to set up for the next turn.

Good luck.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest