mikepixie's Forum Posts

  • Mmmmm grenadine.

  • Awesome thanks for the quick help here. I can see this becoming one for the FAQ.

  • Thanks dude, I will drink a beer in your honour.

  • Hiya

    This may be a herpaderp question but I can't seem to find the answer.

    I have a an object with the official drag and drop behaviour. I want it to collide with solids. In my test I have both my draggable object and my test wall set to solid but the draggable object still flies right over my wall.

    I have tried using the bullet behaviour and while it does create a slight bounce on collision the draggable object still moves through the wall.

    Any ideas?

  • Wow man this looks awesome, can't wait for the release.

  • I love it when a plan comes together.

    digimonk you can count me in for beta testing if you do release an extension.

  • Wow man, this is great, I love the fact it has layers, makes animating sooo easy and the interface is nice and modern.

  • I just sent the developer a mail pointing them to this thread. I would give it a go but at the moment my javascript is abysmal.

  • At the moment I am considering writing my own middleware for it that gives simple responses which construct can handle, however when there is some sort of native json/xml parsing it should be a doddle to work with.

  • I thought all your constructors might like to know about the Roar Engine. Essentially it is a back end for multiplayer social games and rpg's. It handles everything from inventories and currencies to achievements and magic items:

    ROAR Engine

    I can't possibly explain how cool it is so have a look for yourselves.

  • Hey Ashley and co,

    Apologies for leaving this thread for so long. Been some crazy stuff going on so have been looking after my boy full time for a while.

    I have made some wonderful progress so far and I think flask and construct are a lush match for anyone wanting to move away from php or who already have python experience from construct 1.

    I will write a complete tutorial to help people get started when I have the time however I will share some of the possibilities now.

    Also I have a missing feature for you Ashley: The ability to set custom save paths for the runtime file so that it doesn't need to be manually edited, no biggie but it speeds things up:

    On a flask site the folder structure is like this:

    app.py (in the root)

    /templates (folder for templates, ie this is where html of the game lives)

    /static (all static files so I have the basic runtime files in here then subfolders /images and /media)

    My app looks like this:

    app.py

    /static

    /static/allthejquerybits.js

    /static/mygamename/runtime and appcache.js

    /static/mygamename/media/myaudio.ogg

    /static/mygamename/images/myimages.png

    /templates/game.html

    I edit the html to reflect this and when I export the project I set the right paths for images and media so I don't have to do it manually for every file in the runtime js.

    As far as things you can easily do (I will make a full tutorial on flask soon enough) here is a quick one.

    On an ubuntu dev box install pip:

    sudo apt-get install python-pip

    sudo pip install flask

    Create a directory called "mygame" to store your files.

    make two sub directories called "static" and "templates" we will come back to these.

    Make a new file called app.py in your mygame directory.

    paste this into it:

    ###################################

    #import your dependancies

    from flask import Flask, request, render_template

    #Set key for encrypting cookies

    SECRET_KEY = 'development key'

    #Turn on debug mode

    DEBUG = True

    #define app

    app = Flask(__name__)

    app.debug = DEBUG

    app.secret_key = SECRET_KEY

    #create our method called funnysentance

    #Start with defining the route

    ('/funnysentance')

    #define your function

    def funnysentance():

        #fetch arguments from url using request.args.get

        a = request.args.get('a', None)

        b = request.args.get('b', None)

        #make the funny sentance

        c = a+" make me happy in the "+b

        #return the result to the browser/ajax

        return c

    #render your game on a url

    ("/mygame")

    def mygame():

        #render the html

        return render_template('mygame.html')

        

    #set up the app to run

    if __name__ == '__main__':

        app.run(host='0.0.0.0')

    ########################

    Open a command prompt on the path of this file and type python app.py

    Open a browser and put this in the url bar:

    127.0.0.1/funnysentance

    You will get your sentance using the variables parameters in the url.

    Make a simple game with a button and a text box, when the button is clicked it makes an ajax call to:

    127.0.0.1/funnysentance

    and sets the text in the text box to AJAX.lastData

    Export the files making sure you put your template renamed mygame.html into the "templates" folder

    Put the c2runtime files in the "static" folder and make sure you change the path of c2runtime.js in your mygame.html file. If you do use images and sounds be sure to place their folders in the "static" folder. When you export the project append static to the paths of media and images and this will make sure you have the right paths in runtime.js.

    Still with me?

    Good

    Navigate to 127.0.0.1/mygame and you should see your game, click the button and you should get a sentance in your text box using the url encoded variables.

    If you are using a headless server not an ubuntu desktop vm just navigate to serverip/mygame and you should see it.

    Cool I should get some actual work for money done now. Hope you guys enjoyed this. I will do a bigger tutorial involving databases and other fun things as soon as poss.

    Mike

  • Heya, sorry I have not responded to this thread in a while. Been a full time dad for a few weeks and so have only had late evenings to work.

    I have not yet tried to directly parse json in the app itself but am using tokenat and using my flask backend to do the hard parsing work for now. Fortunately the api I am using is not very involved.

    I am interested in how the CSV plugin can be used to parse json though as that could indeed be very helpful. I will keep you guys informed.

    I have also been playing with the idea of using the calljs plugin to call some custom js that deals with specific bits of json.

  • Cool, the system expressions manual shall be my bedtime reading tonight, thanks for that.

    I would rather use JSON than csv's as most of the API's I want to work with return JSON and I would rather just work with JSON directly.

    Thanks for the help :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just resurrecting this, the project is underway now so expect some more info soon.

  • Hi everyone

    I have been using Scirra for a little while and there is something that vexes me.

    I can retrieve a json object with ajax no problem but I am a little confused as to how to parse the object to make the data more useable.

    I have searched and can see there has been no real answer to this on the forums. Does anyone have any advice or a wee tutotial I could check out.

    Thanks

    Mike

    EDIT: I have read that it can be done with the tokenat but my noobness with construct expressions is blocking me.