rekjl's Forum Posts

  • Somebody, I hope you don't mind me asking a bit cause I am really stumped with Json a bit. Is the only way to save a Json file to use the download option? It opens a new window and ask to save the file. I am making a mobile game so that is out of the question. What is the other option to automatically save it? I am using it to save a 100+ array. Thanks.

  • No problem maxer006. Best of luck!

  • Thanks Will look into JSON as this will be the first time working with it. All my previous was with webstorage and I had to manually enter one after the other.

    Again, thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a long array, 120 x cells long. How do I save all of it at once into a variable?

    All this while I have been using short arrays, less than 10 and saving them into a variable using the (array.At(0)&","&array.At(1)......etc etc). But since I have 120 cells long what would be a more efficient way to save the new array to a variable?

    Thanks guys.

  • There is a way for you to do it much simpler. First of all, use the same sprite for all the white keys, and also just one sprite for all the black keys.

    That way, when you want to compare if the player has clicked on the correct key you can just check with the UID. Also, this example takes that animation frame0 is the original and frame1 is the image of it being played in the replay and frame2 is the image for when the player has clicked on the key.

    WhiteKeySprite frame = 1--->set varkey = WhiteKeySprite.UID

    Mouse on left clicked WhiteKeySprite-->whiteKeySprite set frame to 2

    subevent

    Pick WhiteKeySprite with UID = varkey

    subevent

    WhiteKeySprite frame =2--> do your actions since for the correct key pressed

    Else--> do your actions for wrong key pressed

    As for a sequences, you can do that with arrays. It will be perfect for your situation, so if you are not familiar with it, now is a great time to start learning about it.

  • From your post, I would guess the problem would be your images. If you are using images with large resolution, it will kill your memory bandwidth very very quickly. In the C2 window, at the bottom, how much memory does it show is being used?

  • I think the easiest way without having to go buy those different supporting devices, it to look for family members and friends who have those phones, and borrow them just to test it out. Of course in borrow I mean, for 5 minutes to install and just run it. Haha I doubt anyone can be without their phones for more than 10 minutes nowadays

  • IndieKiwi, thanks! That's really informative. Haha it's a plan for a game down the road, but it is nice to start learning and understand. It might help me avoid many mistakes, like maybe implementing this if it really isn't that feasible. Again, thanks for sharing! Appreciate it!

  • I think the best way would be to test it on a android device so you can quickly see if it is indeed your events that needs modification or it was the emulator that was not accurate. You should build your game in XDK, and once they send you the link for the apk, you can ask your friends with an android device to test it out and see what the results are.

  • IndieKiwi, thank you. I see, so it is important to get a good basic understanding of php to be able to implement and understand how it can be exploited.

    Does how hard it is to hack serverside games, depend more on the security used by the server company, or more on how we code and implement the games on the server?

  • IndieKiwi, thank you for that info.

    For 1 and 2, the main reason is because I would seem to be the most secure in terms of not allowing players to hack or manipulate the results. So I would store all the variables in the server making it harder to manipulate, but leave the game codes on the client side because even if they can read all the code, they won't be able to manipulate the results since the variables are on the server?

    Does that mean that to implement server side games, I will need to learn a programming language, such as the php that you mentioned? Is this something very complex, or perhaps there are templates out there and we can study the basic to modify and implement the templates to work for our game?

  • Hello Michael and welcome.

    There are events that can handle all of what you mentioned. For the flip, go to your sprite, and choose the flip option for when you want it triggered.

    As for expanding and reducing size, you can use the set size for the sprite. If you want it to gradually expand instead of jumping from one size to another, you could use a variable, and set it to every seconds (exact time will depend on your taste) add 1 to variable, than every tick set your sprite size to the variable. An easier method would be to use the litetween plugin.

  • Hi guys,

    As someone with no knowledge and understanding on programming and networking, I am grateful to scirra and the community here for helping and giving me the opportunity step into the world of something I have always loved. I would like to increase my knowledge and understanding on the various approaches to games out there. I do hope that some of you with knowledge in this will be able to help shed some light on this. This is what I would like to create.

    1: I want my to store all my game events and variables on a server.

    2: The player can't play the game offline, as all the code is on the server.

    3: At the start of the game, it will ask the player to enter a name. After that, every time the player achieves a new high score, it will will save the score onto the server next to the name so that it can be easily accessed.

    What are the things that I will need to look into and learn to be able to implement this into my game?

    Thanks you for any insight and advice on this.

  • GeometriX and lemo, sorry i'm a bit rusty on the subject, will take a look at my old project to refresh my memories. I tested the file Geometrix, and it worked for me on my HTC One m7. One thing I notice though, that since the orientation wasn't locked, it changed from portrait to landscape. And when it changed, the whole offset followed, so it was always off by +90 or -90 depending on which way it was tilted. I didn't have a real compass with me so I couldn't check the accuracy to see which one was the correct one though.

  • Thank you! Any help on the matter is really appreciated. I am not sure, but maybe in my previous capx, I didn't find the initial offset which is why it didn't work at all. I'm now working halfway on another project, so I don't want to leave it first or I will get confused when I return. But will definitely want to return to my old capx once I have the time and try it. Hope you won't mind if I tag you again in the near future in this post if I was to encounter a problem with regards to this exact topic. Again, thanks!