Soccer Cards type of game (is it feasible?)

Get help using Construct 2

Post » Mon Sep 01, 2014 6:18 pm

First of all, if you have the time and you're by any chance a football/soccer fan, I would like that you give this game a try:

(since I don't have 300 rep points, I cannot post an URL, so please google Soccer Cards PC, on manwithnomouth.com - latest version 1.42)

It's a pretty fun game, mostly involving luck but sometimes even skill.

Now my question is - can it be made with C2?
At first sight, the game doesn't look that complex, the graphics are primitive and would be easily made with C2, but my main concern is generating the match outcome, and generating the schedule of the matches.

Let's say that I have 4 teams to pick from, and I pick 2 that will play against each other. I've made 2 so far, and it works (both teams have inst. variables for matches played, wins, goals scored, points etc. which are at the end transferred to their respective cells in the array). But what if I want, let's say Team 2 vs. Team 4? How will I tell C2 that these teams are playing, and apply the post-match data to their variables? I'm thinking of a solution all day long, and just can't put my mind to anything. I was thinking of 2 slots, like ''opponent 1'' and ''opponent 2'', and then pick teams that will fill those slots, but how will the variables be handled still baffles me. I don't need any complex brainstorming, just a push in the right direction from someone who is more skilled with this tool.

(Also, if you have already tested the game a bit, please take a look at some of the aspects of the game, most notably the Schedule, and possibly give me a slight hint or opinion how things should/could be made).

Thanks in forward!
B
4
S
1
Posts: 16
Reputation: 432

Post » Mon Sep 01, 2014 7:07 pm

kroftek wrote:First of all, if you have the time and you're by any chance a football/soccer fan, I would like that you give this game a try:

(since I don't have 300 rep points, I cannot post an URL, so please google Soccer Cards PC, on manwithnomouth.com - latest version 1.42)

It's a pretty fun game, mostly involving luck but sometimes even skill.

Now my question is - can it be made with C2?
At first sight, the game doesn't look that complex, the graphics are primitive and would be easily made with C2, but my main concern is generating the match outcome, and generating the schedule of the matches.

Let's say that I have 4 teams to pick from, and I pick 2 that will play against each other. I've made 2 so far, and it works (both teams have inst. variables for matches played, wins, goals scored, points etc. which are at the end transferred to their respective cells in the array). But what if I want, let's say Team 2 vs. Team 4? How will I tell C2 that these teams are playing, and apply the post-match data to their variables? I'm thinking of a solution all day long, and just can't put my mind to anything. I was thinking of 2 slots, like ''opponent 1'' and ''opponent 2'', and then pick teams that will fill those slots, but how will the variables be handled still baffles me. I don't need any complex brainstorming, just a push in the right direction from someone who is more skilled with this tool.

(Also, if you have already tested the game a bit, please take a look at some of the aspects of the game, most notably the Schedule, and possibly give me a slight hint or opinion how things should/could be made).

Thanks in forward!

From what I read, it seems you are already in the right path :D
Your idea on 2 slots will work, handle the instance variables like you've done before, you should be ok!
Look at Array.IndexOf expression, you'll be using this quite a lot to update post-match data. I can relate this to my CCG project, the combo of Array.At(Array.IndexOf("variablesXXX"),variablesYYY) is pretty darn useful in cases like this.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Mon Sep 01, 2014 9:38 pm

DuckfaceNinja wrote:
kroftek wrote:First of all, if you have the time and you're by any chance a football/soccer fan, I would like that you give this game a try:

(since I don't have 300 rep points, I cannot post an URL, so please google Soccer Cards PC, on manwithnomouth.com - latest version 1.42)

It's a pretty fun game, mostly involving luck but sometimes even skill.

Now my question is - can it be made with C2?
At first sight, the game doesn't look that complex, the graphics are primitive and would be easily made with C2, but my main concern is generating the match outcome, and generating the schedule of the matches.

Let's say that I have 4 teams to pick from, and I pick 2 that will play against each other. I've made 2 so far, and it works (both teams have inst. variables for matches played, wins, goals scored, points etc. which are at the end transferred to their respective cells in the array). But what if I want, let's say Team 2 vs. Team 4? How will I tell C2 that these teams are playing, and apply the post-match data to their variables? I'm thinking of a solution all day long, and just can't put my mind to anything. I was thinking of 2 slots, like ''opponent 1'' and ''opponent 2'', and then pick teams that will fill those slots, but how will the variables be handled still baffles me. I don't need any complex brainstorming, just a push in the right direction from someone who is more skilled with this tool.

(Also, if you have already tested the game a bit, please take a look at some of the aspects of the game, most notably the Schedule, and possibly give me a slight hint or opinion how things should/could be made).

Thanks in forward!

From what I read, it seems you are already in the right path :D
Your idea on 2 slots will work, handle the instance variables like you've done before, you should be ok!
Look at Array.IndexOf expression, you'll be using this quite a lot to update post-match data. I can relate this to my CCG project, the combo of Array.At(Array.IndexOf("variablesXXX"),variablesYYY) is pretty darn useful in cases like this.


Jeez, my brain is still useless :D I don't get it, and I don't know if the right path is the appropriate expression currently...

OK, I'll try to explain this as best as I can.

So far I've made 2 teams, both of them have instance variables for the matches played, wins, draws, goals scored etc. and are registered in the array, each team updates its stats when the match is simulated because it's set to run every tick. It's just Team 1 vs Team 2, and 2 global variables which represent the score. Based on that variable, the stats are applied to the teams in question.

So now (you've guessed it), I would like to take a step forward, and introduce a selection list of let's say 4 teams. Then I'd pick Team 2 and Team 3. But I just can't figure out clearly how will the game know who's playing, and to whom should it apply the post-match data at the end. What is the most less-painful way to code this? I mentioned the opponent 1 and 2 slots, but how would I apply the chosen teams (teams 2 and 3 in this case) to these slots, and how should I handle the score variables, so that at the end of the match, the data is applied to the teams that played?

I must mention that I'm very new at arrays, I just recently started working with them, so don't be too harsh on me :D I really like this game, and would like not just to remake it, but to improve it in many ways possible, but this is one of the major problems for me that needs to be solved.
B
4
S
1
Posts: 16
Reputation: 432

Post » Tue Sep 02, 2014 9:22 pm

Anyone? :/
B
4
S
1
Posts: 16
Reputation: 432

Post » Wed Sep 03, 2014 12:49 pm

OK, I might be on a trail to something. I have an array filled with 4 teams and their stats. Whenever a certain team is picked, it sets the global variable to either ''globalhome'' or ''globalaway'' which is then easy to apply the post-match data (for instance, wins are written to (x, ''globalhome''), etc. BUT, I would like to know - how can I ADD the data to the array, instead of setting it? For instance, I've simulated a match, and it sets the data to their respective cells in the array. But, when I simulate it again, it erases the old data and writes down new data (I suppose it's because of the Set at XY action)...

I want that any data that gets written to it is actually added to it. Is there any way?
B
4
S
1
Posts: 16
Reputation: 432

Post » Wed Sep 03, 2014 2:14 pm

To do that use push or insert actions on the array-object..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Sep 03, 2014 3:33 pm

Push or insert? I don't see how can that work...

If I didn't make myself clear, here's the most basic rundown possible:

Team A is playing against Team B.

In the array, Team A's points stat is set at X 9, Y 0, while Team B's is at X 9, Y 1.

I've made a system where it is known who plays against who, and when a match is simulated, it applies, for instance, 3 points to the tem that won.

But, I want those 3 points to stay in the table, and when I simulate the match again, I want (in case that team wins again) those points to be ADDED to those 3 already, so it of course totals 6, and so on, and on, and on...

Get it? Points are just added to the tally every time I simulate a match...
B
4
S
1
Posts: 16
Reputation: 432

Post » Wed Sep 03, 2014 4:18 pm

Ok, so it should be sometthing like this?

set array at x,y to Array.CurValue+(whatever you want to add)
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Sep 03, 2014 4:28 pm

I'm currently doing it like that (I suppose Self.CurValue + whatever is the same), but I need a way to tell the game that it doesn't reset the scores everytime I press Simulate match, I want it to keep them and then just add on anything onto it...

I don't know, if you want, I can provide you with a capx (it's not too complex) so you can have a better look into it and possibly figure out the solution...
B
4
S
1
Posts: 16
Reputation: 432

Post » Wed Sep 03, 2014 4:40 pm

If simulate match restarts the layout, you need a way to store the values in the array before doing so..
Maybe the persist behaviour could help, or using global variables instead of array values, or webstorage..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 47 guests