TobyeRyan's Recent Forum Activity

  • Sorry mate, I hadn't actually fixed the bug yet when I replied, I'm a bit all over the place. But I did find you were looking in the wrong spot:

    The problem was actually that several of the card bases were switching back and forth between the layers at the part in the image (event 17). So I added a "isSelected" variable when clicked to indicate they are the only one to switch layers and it fixed the issue. Very crude fix as it still gets some glitchy overlap when you spam select cards overlapping each other, but that can easily be overcome.

    Here's the version with the variable added

  • WackyToaster - Ah good eyes! I didn't notice how they did it.

    von Perkele - That's amazing! It works just like I wanted! It'll take me some time to configure it into my game but really thanks a lot :) I'll be sure to update you when things have progressed a little more (I just started online playtesting with my old IRL card gaming friends this week which is very exciting!)

  • Yes, exactly like that! That method is slightly more workable than what I was doing, but it's still a bit clunky to make work well with many cards moving around and changing sizes next to each other. But I'll try it out a bit and see if I can get it going smoothly :)

  • Hey all, I have spent my time during lockdown to make an online-multiplayer card game - incredibly difficult work, but functionally it works now and can play full games!. Now that it's playable, the next step is getting it to look pretty, which bring me to my question: how can I resize or reshape an image to fit within a card border, but without stretching it?

    I'll use Runeterra as an example:

    As you can see, in the first image is a close up of the character, but when you play the card onto the field, the images expands with the border.

    I know there's a lot of work-arounds I could use (such as putting card images on a layer beneath, then the card border images uses blends etc.) but they all get pretty convoluted. Is there a simple way to handle this in C3 that anyone knows of?

  • Due to the covid-19 lockdown I had enough time to prototype a lot of games. I've finally decided on which one to progress with though - a sort of remake of my favourite physical card game (Dragonball Z).

    It was easy to build the initial local version, but making it work online with multiplayer took considerable work to make sure the structure was stable and expandable. There's a ton of complexities to card games when it comes to how effects are created, resolved and interact with other - often conflicting - effects.

    Anyway it's done and functioning from game start to game end without any gameplay glitches. It doesn't look pretty now at all, but happily my next step is hiring an artist! Hopefully I can present something more eye pleasing soon.

    Subscribe to Construct videos now
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I couldn't open your project, but have you made sure you're regenerating obstacles? Sometimes I forget that and have similar issues

  • Can you walk through what the Spawn enemy function is doing and how it works? I see, for example, goon - On created, set skinID to self. UID then calls a function spawn enemy.

    The function looks like it chooses the enemyskin and sets a hit box to the size of the enemy? Is that correct? I'm sorry I'm still learning and instances and UIDs are confusing to me.

    Yup this is all correct :) The reason why I set the skinID to UID instead of just using UID is because in the past with other games I would always run into some sort of issue (like creating holograms of an original unit that all share one health pool), so now from habit I always have some sort of ID variable so I can set as many objects as I like to one ID.

    The reason I create hitboxes separate to the enemy even though they are the same size is again out of habit: in this game it doesn't change much as all, but even if I had another few hours I was going to start adding headshots and trimming back hitboxes, so there would be more hitboxes per enemy and all of different sizes.

    But doing the system as it is allows you to very easily alter the game in the future by creating and pinning different hitboxes to different image points and tagging them with things such as 'head', 'leg', 'weapon', privates', etc. so that you can assign different damage/experience values for each part.

    Also you might notice the timers are being created in an unusual way - this is because using the 'Timer' behaviour doesn't pick objects, so if multiple objects trigger their timer at the same time, it can cause some serious problems (this was one thing that set me back hours trying to debug!). And the reason the time is tracked on a sprite instead of something global like an array is simply because I made it into a module that I can cut and paste into new projects and you can't cntrl+A an array.

    The reason bullets are 'created' instead of 'spawned' is that if you spawn an object, you can't change its angle immediately, you need to wait at least 1 tick, which causes all sort of problems. It's fine for a turret that is rotating 360 degrees, but for weapons that are being mirrored etc. it's much better to use the 'create' action. Lastly you might note some 'wait 0 seconds' actions in the bullet creation - this is because without it some things got wacky, like bullet sprites being pinned to the wrong dmgbox etc. I don't know why it works, just a solution someone shared waaaay back in the C2 days. The reason why setting the team ID before the 'wait' action though is that if a dmgbox spawned over an enemy and the ID was set after wait 0, it would not have changed teams on creation and therefore hit the wrong team.

    That's most of the weird stuff about the enemy spawns, but if you have more questions ask away :)

  • I used to make tons of MP systems in C2 years ago, and after reading your post decided to give it a go in C3 and see if I can help. But everything works perfectly for me on PC, laptop and phone with hosting on different devices.

    Perhaps for you the issue is ports?

  • I feel ya buddy, I'd much rather work on making tools for a more talented level designer to use. I guess this is why the big companies have it as a completely separate job!

  • I don't, but I often use ^ or ~

    Okay thanks a lot buddy!

  • Backslash is an escape character in Javascript. For example "\n" is a line break. So I would suggest picking a different character to separate tokens.

    Okay thanks mate, will do! Do you know of any other special characters I should be wary of?

  • Can you compile it to a HTML site?, that EXE makes me nervous.

    No problem dude, added a link to play it in browser (remember to scroll to the bottom-right of the screen to click the full-screen mode) and a link to the capx if you want to look at the nuts and bolts (but bewarned - it's a hellish landscape in there!)

TobyeRyan's avatar

TobyeRyan

Member since 30 Jan, 2012

None one is following TobyeRyan yet!

Trophy Case

  • 12-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies