AllanR's Forum Posts

  • You do not have permission to view this post

  • hard to tell... in the AddCard function, all cards are set to PlayerNo = 1

    this may be preventing ArrangeDeck from being able to sort the cards for other players.

  • AJAX sends and receives data from a server, so for promo codes you would need a web site with a database like MySQL usually with PHP scripts to read and write to the database.

    if you have or need a web site then the is no extra charge, but there is the learning curve and you are responsible for security... There are tutorials and help available.

    the other options would likely be a lot easier at first, but I haven't tried them.

  • there might be a chance that the encryption adds symbols that cause trouble.

  • I would try urlencode first - it converts commas, &, ?, and all the other symbols to codes that cause trouble in URLs. then urldecode converts them back.

  • have you tried "urlencode" before sending the text? you will then need to urldecode in php on the other end.

  • Try Construct 3

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

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

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