Soccer Cards type of game (is it feasible?)

0 favourites
  • 14 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • 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!

  • 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

    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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • > 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

    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 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 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.

  • Anyone? :/

  • 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?

  • To do that use push or insert actions on the array-object..

  • 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...

  • Ok, so it should be sometthing like this?

    set array at x,y to Array.CurValue+(whatever you want to add)

  • 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...

  • 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..

  • It doesn't restart the layout; persist? never heard of it so far; using global variables would be too much, because eventually the number of teams will be increased, and that would make A LOT of global variables...although i don't know about instance variables...every team has stats in those variables which are then updated in the array, or vice versa...but how would I connect them? Also, I've never worked with webstorage, so... looks like I'm more than useless ATM

    OK, so ANYONE with experience in working with arrays, webstorages, etc., please take a quick look at this capx (~20 events), and try to tell me where I'm wrong and what could/should be fixed (currently the match scores are Set to XY in the array)...

    Open it up in debug, left click the team to select it as Home team, and right click for Away, and watch the ''teams'' array and then simulate the match...it's a bit confusing at first, but it goes in this order - team index, team name, matches played, wins, draws, losses, goals for, goals against, goal difference, points, unused slot

    As I said, I need some way to store the data to the array when the match is simulated, so that when I click simulate again, it just adds the new data onto the existing one...

  • Why are you using r170? Use the latest would be my best advice now.

    To be honest, there's a lot of learning you have to do here for arrays, the way you did it is not practical at all. Furthermore using array column-wise is a bad practice for a lot of reason, simply because expression like IndexOf can no longer been use because of that (this is important). I'm afraid, you have to restart everything to make the upcoming complexity to be possible...

    A jumpstart for you, arrange the team row-by-row like picture below:

    [attachment=0:hr9z53nt][/attachment:hr9z53nt]

    Let the computer do the array build for you instead of manual labour like you did.

    Actually nobody can help you here unless you get yourself familiar with the manual first. Then, tryout some tutorial.

    Ps: I think I went to much ahead by mentioning array.at(array.indexof(""),#) combo.

  • OK, I did it, but can I go anywhere from here? Can I make a way that any values are added and somehow saved in the array, so the next time I add a value, it just adds up onto the existing one?

  • OK, I did it, but can I go anywhere from here? Can I make a way that any values are added and somehow saved in the array, so the next time I add a value, it just adds up onto the existing one?

    Yes, by using the "combo" I mentioned before.

    Well then again this is very depended how much you understand the array functionality, which I myself did not develop it overnight, it's like a month really. Whatever I might explain here for each array functionality will be useless since the manual already had it explained.

    What can I say now is not how to go from there, its more like start to be experimental with all array function. Try not restrict yourself with just one expression, its not practical. Its always better to have specific question rather than a broad one. Cheers

    Edit: I probably have a soft spot for people working with something similar mine, here goes nothing

    What kind of event you should be expecting, should be pretty close to this

    [attachment=0:oc9lq2xg][/attachment:oc9lq2xg]

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)