AllanR's Recent Forum Activity

  • That's a great question, and can apply to all kinds of situations, characters with different outfits or weapons and many other things.

    in your case, with just 3 colours, your total number and size of sprites will still be relatively quite small. So, it will come down to trading a slight memory improvement with a little more complicated code.

    Since this is your first game, I would recommend keeping it simple and go with making the full tile set in each colour.

    Although, there is a third option - make one set with the tile background white and black lettering, then use "Set Color to rgbEx(xxx,xxx,xxx)" to make the tile the colour you need. The background will change, but the lettering will stay black.

  • You do not have permission to view this post

  • Very nice!

    Jetpack Joyride is one of my favourite games. You did a fantastic job on getting the performance so nicely tuned.

  • check out this thread from a few months ago, there are some good examples in there that I remember playing with.

    https://www.construct.net/en/forum/construct-3/how-do-i-8/color-chooser-plugin-addon-147352?kws=color%2bpicker

    I think those might all be C3, so here is also a C2 capx that I think I adapted from one of the examples...

    https://www.rieperts.com/games/forum/ColorPicker.capx

    (requires the ROJOhound canvas plugin)

  • Newly spawned Sprites will not be pickable until the creation process has finished, which Construct does at the end of the event that creates it. So you have to wait until the next top level event, or use a Wait 0 seconds, before you can use Pick All to pick the new instances.

    The "System Compare two values" will only look at one instance of Sprite and Spawn, so if you are looking for any instance too close then do something like what Dop2000 said.

  • You are off to a great start!

    what is happening is that the drag and drop knows which instance of Deck is being dropped, but in your function "CardPlayed" it has no idea which card was just dropped so it defaults to the first card UID which is not in the player's hand. You need to either pass in the UID of the card dropped as a parameter or set a global variable that contains the UID of the last card played.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks! :)

    the official Blockudoku game has more types of pieces that can appear - up to 5x5 blocks, so you can lose much quicker. Expanding the PieceArray to accommodate that would be pretty easy. There is a text file that has the piece definitions in json format - spaced out so you can kind of see what the pieces look like. You then have to tell the GeneratePiece function how many total pieces it has to choose from.

  • when you first posted about this game a couple months ago, I had a lot of fun trying out the version Maverick1912 came up with. I also watched a couple videos about Blockudoku and was impressed with how fast it calculated valid moves, and removed completed lines and squares.

    I was curious if C2 could match that speed, so when you asked again about showing the shadow I decided to give it a try... I started from scratch and used every thing I could think of to optimize how it calculates, and I am very happy with how well it turned out.

    as it spawns each piece, it knows how wide and how tall the piece is and uses that info to reduce the number of checks it takes to see if there are possible moves. Each block in each piece knows what position it came from in the PieceArray and uses that to reduce the number of checks it takes to test if the shadow should be shown. Each block placed on the board knows its x and y location, and what 9x9 square it is in, so checking for complete lines and squares is simply picking and comparing the pickedcount - no looping through arrays, or collision tests, etc.

    After each piece is placed on the board, it has to check if there are any possible moves for the remaining pieces, and it shows in a text box at the bottom of the screen how many squares in the array it had to test to determine if a move is possible or if the game is over. Even on my old Iphone 5s it does this instantly in surprisingly few checks!

    This game doesn't use any tweens, animations, no sound effects, doesn't keep score, or any of the other nice things Maverick did, but it is fast! I might add more, and put in comments to help make it clear what it is doing, but hopefully this helps.

    https://www.rieperts.com/games/forum/Blockudoku.capx

  • I always thought it was more of a hardware issue. Not sure if Construct can do anything about it, but I guess it doesn't hurt to ask.

  • yeah, I have noticed a difference between mouse and a finger. The mouse generally seems to give less reliable results in terms of speed and angle, and different devices respond differently too.

  • you must have fast fingers!

    can you clamp it to a range that fits your requirements?

  • the clamp was supposed to be 4, not 5, because 100 / 20 = 5, and you wanted to limit it to 4.

    frame = clamp( floor( x / 20 ), 0, 4)

    edit: yeah, using min works too :)

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies