donelwero's Forum Posts

  • You are doing it right but, you forgot to create an object "cage" on the LO_RabbitsNumber layout. So when you assign the "Rabbits" value of the dictionary to the instance variable of cage you are assigning that value to nothing, because there no object to assign that value to.

    Also, it would be better to increase, decrease the value of items when the + or - buttons are clicked, not after going to another layout.

  • It seems like it has been finally updated. An icon came up on intel xdk program saying an update is available.

    I'll come back after it's downloaded.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • rexrainbow you are awesome!!

    Thanks I will give it a shot now!

  • Thanks LittleStain

    I think I was looking for confirmation, as I had doubts about the way I wanted to do things. I read a lot of stuff about xml, csv, and json so my head wasn't working properly. That means the file is only used once, am I right? Maybe I should just save to webstorage the mission number and its state "completed", "not completed" and keep loading al the text from the file. Guess I'll make some tests to see perfomance.

    So, I still have one doubt, is it possible to save to a file during runtime on mobile devices? I won't be needing it but, just to clarify that point.

  • I didn't know what to write as topic name...

    I want to implement a mission/task system into my game. Let's say 50 missions/task that the player must complete in order to receive exp or money or whatever.

    Player will have to kill n number of enemies, explode things, collect n numer of items, etc.

    With that said, I've been cracking my head trying to define if I should use JSON, XML, CSV (Rex's Plugin)... As I don't really know how they work. I've used ajax before on webpages but, only to save info to a database, and that was using JQuery, so I'm don't really get what is going on with the examples provided in the tutorials.

    I'm leaning towards CSV, making a table where I have Text info for the mission, reward, task to complete, etc

    So here's how I think I could do it:

    Load the csv file as a String using ajax.

    Do all Construct stuff to present the first mission to player... player kills 50 monsters and completes that mission.

    Set the "completed" row in the csv string to 1 and continue to the following mission using another variable which stores current mission.

    Now, this is where everything gets messy.

    How do I save all that? I can use webstorage but, won't my info be overwritten by the On start ---> Load from csv file?

    I don't know if what I'm writing makes sense. I can load, modify and set new values to the json string loaded from my csv project file. But how to save that info, so when the game is loaded again, player can check missions that are already completed?

    I want it to be offline as I don't like that the game needs access to internet to be "fully played", and I don't know if I can alter my project file during runtime to save the new info. Can I alter a JSON, XML or CSV file during runtime?

    Sorry for my english, hope you guys can help me or share some light on the subject.

    Thanks.

  • rexrainbow

    Awesome plugin, also, one question. Is it possible to save to the csv file? I know I can set/change the value from a Ajax loaded string, but is it possible to make changes to the file on runtime?

    Also, I know I can save the string to webstorage and save the changes to that string, just want to know if it's possible to save changes to the actual file.

  • When you create a second/third.... layout, Construct asks if you want to add another event sheet, in your case, select no. Now, select you new layout and in the properties tab, you can set the working event sheet for that layout.

    You can see my example and test other stuff, but that's the simplest way to do what you want to. You can even compare LayoutName if you want some stuff to only happen on certain layout.

  • zenox98 thanks, It's 3:30 am here, so I can't relly make tests with your capx but, I wll take a better look at it tomorrow. I'm thinking about moving the "target" depending on the strength and angle of the shot. I tried using qarp but I'm no math magician as R0j0hound but your capx gave me some ideas, I'll make some test in the morning and let you know how those went.

    Thanks!

  • Ok, I'm going to take a look at it and let you know how it went, thanks Joannesalfa

    Edit: After looking at the example and reading your post a few times I finally understood. I was able to simulate more or less the same thing, what I'm having trouble to do is the effect on the ball.

    Let's say the player is shooting up (north), I still need to simulate the effect of the ball on the x axis if the player made it's shoot with effect to avoid the wall of defense in front of the player covering the goal, so the player can't shoot directly to goal.

    I need to bend the the direction of the ball so it curves in mid-flight.

  • First of all, I don't know if "drag" is the correct term in this case, my english is not that good.

    I'm trying to make a 2d top-down "Free kick" soccer game (see New Star Soccer). Where depending where you hit/kick the ball will determine the angle and force applied to the ball, including drag or effect on it, it's time on the air, etc.

    You can (more or less) see what I'm talking about in this video

    I've tried using different approaches but none of them feels right. I'm about to test using freel fall equations on y axis to calculate the flight time of the ball given certain force and angle, but the problem is the effect on the ball, I've been thinking about using the same free fall equations but with a different gravity (much smaller than 9.8). Haven't tested this.

    I've tried using sin behavior to a certain value, so it goes up and continues to go down until the ball stops, but it just doesn't feel right. I think theres the qarp interpolation to simulate something like this, but don't really know how to use it, because in the examples I've seen (all by R0j0) he's using another set of x,y positions.

    I could keep writing about all the ways I can think of making it work, but maybe I'm just too focused on the problem right now that I can't just see a clearer path to tackle this.

    Anyways, hope you cguys can help.

  • I've been able to export to Android with leadbolt ads with iframes.

    But, I want to know if it's possible to put ads on a Facebook app, if it is, what can I use? It seems like leadbolt only works for mobile devices.

    Thanks!

  • suntemple yeah, I used intel XDK (Crosswalk) to export the game.

    Glad you liked, I made it just for fun and learned a lot about the process of getting apps published.

  • Finally, my first app is up and running for android and Chrome Web Store.

    It came up as a joke with my brother, I was getting mad at all the memes of Van Persie's goal against Spain National team on the Soccer World Cup that the idea came to mind and Flappy Persie came to live!

    Also, I used it for learning purposes, now I know more about integrating APIs and other stuff into my games, it has been a very nice experience.

    Just tap the screep to make Persie flap, also, you need to touch the balls (no pun intended) to score points, flying through the pipes will give you nothing.

    Hope you guys like it!

    Google Play: https://play.google.com/store/apps/details?id=com.dudeincgames.flappypersie

    Chrome Web Store https://chrome.google.com/webstore/detail/flappy-persie/aaohneonegahjaopfihcmjkhocpgecml

  • jayderyu HZGaming, finally solved it. Thanks guys, you are awesome.

    It seems like it's all good now. I'm having a little problem with sound playing a little late, I've tried changing when the sounds should be played, preloading them, etc.

  • HZGaming ir worked in the preview but not on my phone exported with crosswalk for Android. I will keep trying , but it.doesn't seem to work