CrazyVulcan's Forum Posts

  • Any one who is familiar with my post history knows that I am not too knowledgeable about JSON/AJAX. This is a more general question and hope to help not only myself but others who maybe have noticed this strange occurrence.

    I am trying to Save/Load a Array using JSON with a bit of help from Rex's CSV2Array. But since I am not too skilled with writing JSON strings I have kind of found a lazy mans way to get them. I put the CSV into the array like

    "Red,Blue,Blue

    Red,Red,Blue

    Green,Green,Blue"

    I then have a small board that I assign colored animations to depending on running a for each XYvalue loop. That all works great. The board changes colors just as I expect. However now I use my trick to set the text of a text object to be the JSON of the array. Then from within C2Debug I copy n past that sting to a notepad file and save it to my project files.

    Here is where my problem starts.

    the JSON looks much like

    {"c2array":true,"size":[3,3,1],"data":[ [ ["Red"],["Blue"],["Blue"] ],[ ["Red"],["Red"],["Blue"] ],[ ["Green"],["Green"],["Blue"] ] ] }

    However when I put the vary same JSON sting back into C2 it gives me all kinds of syntax errors. Why? It is literally the exact same JSON that C2 spit out and directly plugged back in. Anyone know what I may be doing wrong?

  • rexrainbow Since the last C2 update I seem to be having issues with loading a CSV sting to an array via AJAX. If I load the CSV raw into CSV2Array it works fine. I pull the file of my server it loads fine. But when I go to put that string as AJAX.LastData into CSV2Array it buggers out. I will load about 88%-100% and the game will freeze. If I disable the 'Fill Array form CSV string' action it will run fine.

    I think this is either a bug or error on my part using LastData.

    Start Of layout->Ajax Request URL DOMAIN&"/Data/PoliticalMapCSV.txt"; Load CSV2Array "LastData" Row to X and Column to Y;Set Board to 10x10; Fill Board Tiles with "MapTile"

    For Each XY element in array & Pick Instance of "MapTile" = MapIndex-> Add 1 to MapIndex; Change Animation of "MapTile" = Array.CurValue;

    You can dump LastData into CSV2Array without any additional formatting right?

  • Thanks for all the information, I am actually re-evaluating the idea of making a company right now.

    I might start in a few years once I have released a couple of successful games, and I have made some sort of revenue from those games.

    Have you made any games that have generated you revenue? and how?

    Thanks again! Cheers!

    Not yet, my main game is going to take about a years worth of work. Look at my thread "Advance C2 Building a Online Browser Game with C2" I go into a fair bit of detail on my project. The other two games, more like a game and a "game' app are much simpler. One is a board game that I am designing and would like to sell digitally as well as making a physical version. I intend to make it free with a link to a patatron account where people can donate to support my content.

    I thought about running a Kickstarter for it but many game KS fail because people have little faith to put money into something that may not come around when they expect it to. Less money to start but I feel that garnishing the good will of my fans is more practical

    The other was kind of a lesson I came up with for learning triggers. Its a Tarot Card fortune telling app. Only bigger than others currently on the market. While 3 card spreads are not uncommon I am going full on Celtic Cross a 10 card spread. I will run video ads from within a iframe inside the app and play it off as discussing payment for the psychics time. A bit obtrusive but other than that it will be free form the IOS or Google Play store. Have yet to really sit down and look how much I can realistically expect from that but as long as its is popular enough I should have a steady income from it.

    However I will not be incorporating till those two are near the release phase as one is a mess of spread sheets and place holder art while the other is a half done proof of concept. I am not making money yet but plan to by years end though I am planing to not be making a profit by then. But that is the important thing which is having a set of goals set. I may not have a boss sitting over my shoulder to get my work done but self motivation is key.

  • I don't know how old you are, I am assuming you are +18 and living in the US but here are some things that you need to consider. I am myself working on these and I am still learning.

    To start a company in the US dose not take much more than registering a Trademark/Copyright. I recommend thinking of a few and google the hell out of them in every context you can imagine. There are many registered names and you really don't want a lawsuit starting right out. Even if it is something that seems to no longer be in use someone still owns it and you can not simple take it from them. If it is a name you really have your heart set on maybe reach out to that party and see if they would be willing to sell to you.

    I highly recommend looking into lawyers. You do not need a company lawyer in fact many firms will do if you simply are starting out. I also recommend not involving family or friends no matter if they 'seem' to know all that you need. However if you have family that owns their own business it is very worth your time to talk to them and learn.

    Lawyers cost money though so be prepared to have that money available. Myself I have worked for a year and some change saving every cent I could. I am looking at about $300 for all the necessary papers.

    Before you start selling games you may want to have a product ready to sell day one. Also look into how incorporating works as the Laws for doing business are vary direct. You will also need to look into opening a business account with your bank of choice.

    This is vary important come spring tax season. The IRS is not vary fond of people running a business for profit and not paying tax. With a personal account and a Business account set up and proper documentation of your company even if you fail at that business you would not loose everything like your house, car etc.

    Now myself I intend to form the business later the fall and am looking at lawyers and maybe not for you but I will be looking to get a personal loan. Small as my gole is to making a profit by Feb 2016.

    I wish you the best of luck. Any job can be hard but starting a business is perhaps the hardest. However the payout can be well worth the work. Just look out for the many many pitfalls that are in front of you.

    As some one mentioned you need a action plan. Look at every expense you have. Food, car/house payment, insurance, utility. Those are monthly and more or less fixed. Then you look at your start up costs. Buying needed software hardware or legal fees. If you need to get a server to house your game(I saw your MMO thread) That has a cost.

    Next look at your income. Second job, ad revenue, donations. And do a side by side look. Are you making more than you are spending? How much more do you need each month to make profit? What is your forecast for the next 6 months?

    Then for the game its self what can you make quickly and cheaply to get on the market? I have One dream game I work on but I also have two different game I bounce back and forth on. Those side projects are meant to be done by years end and hopefully sell well enough to fund me to finish my main game.

    It is also important to keep in mind time. How many hours will it take you to develop your game to completion? Is there another game you could make faster? Also are your games Free with ads? What about a cash shop or is it a one time purchase. For each game you make what will be the peak amount of revenue before you start making less each month. This last part is why most games don't get support beyond the first year or two after release because there is no money in it.

    If you read all this and you are still excited by the challenge and conquering the mountain before you, great! If not don't worry that is a perfectly normal reaction it just means you may need to re evaluate you attack plan a bit.

    CrazyVulcan

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So as a update form my last post I now have a good grasp on calling AJAX and thank you all for your support and help. I finally gave in and now have web hosting though Azure so now I can get all the data setup completed. I just have a few specific issues I need to ask.

    1 How do I "POST" using AJAX?) I know a simple question but right now I am trying to understand how this works from a how to level. I have made a sort of custom character portrait generator and am trying to save an screenshots JSON to a SQL database. I am using MS Webmatrix and have my DB from Azure linked so I hope that I can see in real time if I am indeed Posting back the JSON correctly.

    1 Unique User Profile with SQL) I have a Database called "Player Data" inside I have two tables called Player_Roster and Standard_Character_List. The first is straight forward enough that all it dose is store players username and password and will link to additional tables. The second is a little more complex as it lists all the characters and their respective stats. Each column Has things like a Name that is unique, levels of skills in TAC, SCI, and ENG along with what skills they know.

    This is more of a SQL question as to how I can auto generate a table for each player. So that when a new player creates a account on my main website I then have my database copy Standard_Character_List to be "UserName"_Character_List. But I have yet to find a resource that lays how to do that out.

    3 Calling SQL Data and fill an array) To save costs from players calling the server constantly I plan to use a C2 Array object to store relevant data the game will need to call for each action. I though need to know how to link the data in my DB to my array in C2.

    I have a active account with pluralsite.com and digitaltutors.com so if you can, you can link me a course or lesson that I should look at would be great.

    Thank you for your time,

    CrazyVulcan

  • Or, When you trigger you clone action, click button. System - "Create Object": Cake, PosX, PosY, It gives you more control just keep in mind that you IID is now =1 for the new cake

    That way you can chose by ID for you cakes and you wont have to worry about one event affecting each instance.

  • DUTOIT Thanks, I believed that Webmatrix had its own built in settings to allow me to use ASP.Net MySQL and various other programs like a server that I just ran from within the application itself. I was wrong about that.

    I now have XAMPP 3.2.1 using Apache to set up my own network archetecher. I guess I knew that was what I should have been doing in the first place but I had believed that I was not at that point where it would have been necessary.

    I do not have a issue exporting my game to HTML5 and running that but using preview would have been nice. A few more days to get everything working like I want it and I should be able to get back to working on something game related.

    Thanks again DUTOIT for your help and that tutorial really helped a lot. This winter when there is a game to actually play I will repay everyone who helped.

  • Hello,

    Is it possible to embed a browser (object type) in a game ?

    I've made a game that I published on a plateform (I didn't used C2 to create it) but I would like to embed it in a C2 game to add arrows and jump to play it on phone and tablet.

    H**p://db.tt/IaT63RDD

    Do you know if it is possible ?

    Thanks

    So you have a game that you made in a previous program and want it to run and add things to in C2? I fear that you have two options

    A > remake the game in C2 and just put that on various platforms useing the export feature

    B > Look for a ifram plugin in the "Complete Addons" below and put that into your layout in C2, the catch is that you can not change anything about the old game within C2 since all you are doing is having a window inside a C2 layout.

    But if you wish to import your game into C2 to continue working on it on this platform, I am afraid that it is not possible. If it is a simple game your probably will be surprised how few hours it would take to remake it.

  • I have a straight forward question that I need explained to me in detail about AJAX

    Not including the file in my project folder how do I compose the "http// " string to get exactly what file I want?

    I have this basic folder structure in my asp.net folder using webmatrix

    localhost:7777
    MyCoolWebsite
         My Exported C2 Game
              imagesfolder
              index.html <this is my game
         App_Data
              config.php
         index.html
         MainCSS.css
    
    <><><><><><>
    MySQL database
    
    PlayerData
    MyData_Table
    [/code:1v2vo90q]
    
    After exporting the whole game to the C2 game folder I can not seem to connect to the config.php file. Inside C2 I have a AJAX request looking for that file only I can never seem to find what I am looking for. And not being able to do this inside C2, I have to export the whole file and clear my cookies from chrome every time I need to test a change. Understandably I am rather frustrated by this. 
    
    What do I put into the URL box?
    
    A>"http//localhost7777:App_Data/config.php"
    B>"../App_Data/config.php" <<i.e. do I have to go up a directory form where index.html of the game is?
    C>"http//localhost:7777../App_Data/config.php
    
    I know it is not any of those above because I have tried them, Please help as I have been trying at this for the better part of 6 months at trying to get player data to work. bouncing form CSV, JSON, MySQL
    
    I just want a answer. 
    
    Thank you for your time in this.
  • Integrating a SQL Database into C2,

    Howdy, After two days of bingewatching tutorials around the net on PHP and SQL I now actually understand how they work, somewhat

    Ok so back to working on my game I now in my project file folder have a .php script and the website itself is within a webmatrix3 project. In that I have a Database that has about 20 officers listed with all there stats and info. My goal atm is to have C2 reference that Data base to populate a info card with all of each characters stats.

    So I have a DB smiler to this

    Master_Officer_List
    
    Officer_ID    | Name | Rank        | Strength | Speed | Cost | Unlocked|
    01               Bob        Captain        3                  2          10          True
    02               Mark      Ensign          2                  1           5           True
    03               Sue         Admiral       2                  1           15         False
    04               Liz           Captain       1                  2           10         True
    [/code:10rohfxk]
    
    Now to make this card I have a tile set where each tile is associated with the ID value in this DB. Under that Is the Name and Rank of that person and off to the side is each stat [Strength, Speed, Cost] And It will only show the officers that are unlocked, marked True. C2 will do a For Each loop and make a new card under the first till we run out of things on the list. 
    
    Going though the SQL DB is easy enough all I need it to say is
    
    SELECT Officer_ID,Name,Rank,Strength,Speed,Cost,Unlocked FROM Master_Officer_List WHERE Unlocked IS True;
    
    But as always getting this integrated into C2 is proving not so easy. I know that I can upload a PHP file into C2 and using AJAX I can pull data from it bout no matter how much I look though this tutorial [url]https://www.scirra.com/tutorials/721/lennaerts-php-mysql-multiplayer-tutorial[/url] I do not understand how my PHP script should look.
    [code:10rohfxk]
    <?php
    $servername = "localhost";
    $username = "username";
    $password = "password";
    
    $conn = Master_Officer_List ($servername, $username, $password);
    
    if ($conn->connect_error) {
        die("Connection failed: " . $conn->connect_error);
    } 
    echo "Connected successfully";
    ?>
    [/code:10rohfxk]
    
    From the login portal on my homepage there is a login form for username and password and a table in my database for just that info [username, password, contact_email] and in my C2 game I have a username global variable.
    
    Ideally I would like to have when a player creates a account that my website will make a new table titled username_Officer_List.sql that they can then wright data to as they progress and unlock/perches items.
    
    I am makeing progress but I just am not seeing the big picture, or more how big picture is connected from all the little pictures
  • OK so above where I mentioned that though my computer is x86 but C2 is version 200x64, somehow. After installing my plugins to my Construct 2 x64 folder path it works just fine. Strange Did not know I could even do that.

  • Hello,

    After a complete reset with my Win7x86 OS I am now unable to use my C2Personal with any added plugins or behaviors. Originally I tried to move the entire steam folder to a flash drive and then back to my program files folder after reinstalling the OS. However now even though I can launch C2 and use it just fine all my extensions are now no longer visible to the program.

    For example I use a lot of Rexrainbows plugins in my games and he provided a app that auto installs his extensions to the necessary folders. But when I launch and try to open my capx a error pops up and says that I need to reinstall a number of plugins to get the game to launch. The same is true when I manually install a plugin.

    Also when I create a new project and try to add a object they will not show up in that menu.

    To try to fix this I have; Reinstalled C2 though Steam, Verified Integrity though Steam, Rebooted before reinstalling C2, Logged out and back into Steam, Complete reinstall of Steam.

    I am currently using Windows 7 Basic x86 SP1

    Strangely it is saying that I am running release 200 x64 bit could that be a issue? Certainly having just reinstalled though steam it should be the latest release?

    One last thing if i try to run C2 form withing my steamapps folder it wants to install C2 Free. Now I originally installed the free version to test C2 but that was more than a year ago so I should not come up like that and instead should launch C2 Personal. And yes C2Personal is what is installed.

    I cant really provided a capx as it is C2 its self that is the issue.

    Thank you for your time in reading and replying to this

    CrazyVulcan

  • So save the json data into a mysql database entry

    User Id | Userdata string

    The url is a post/get system it can send the id to a php file which retrievs the data string shouldn't that work better having it saved in a database vs tons of json files lying all over the place

    DUTOIT yes that is my eventual goal, and my trouble is not making a form to store the json's. More that once they are in the database how do I "see" them with ajax. What exactly do I need to put in that url to find the specific json I am looking for.

    I need to learn how to have C2 find that string. My thinking is to have a javascript in the head of the index.html file of my game that will pull the table based on the UserID that the player has after they log in. My homepage has, like others a log in form at the top left and after they successfully log in that is replaced with a nice big img they click on the launch the game. The C2 game is then launched in a new window. Having the script inside the head of my game html should pull the needed json...however I am not exactly comfortable poking my html page for fear of breaking it. That and java script is still on that to do list of learning.

    There is always this https://www.scirra.com/store/game-making-tools/c2-data-editor-124 I am writing Mr Gibson a pm to inquire about if this is the right tool for me and if he has any advice that will help me. And for $29.99 it will be worth paying to alive me of this headache.

  • Edit: You need to import you json file into your project.

    From what I understand.

    You want to get data in a json file into your game using ajax?

    In your projects window you want to import files - in your case it would be your json file. It will now save it allong with the c2 icons. If you save project as project you will see it there. And you can edit it directly. {C2 saves as single or project, project allows you to edit files within the folder structure directly}

    Ajax is simple. You request a file dropdown will list files you've imported and tag it with a easy to remember name "MyAwesomeData"

    The trick is ajax on "MyAwesomeData" completed, this means it has all your juicy data.

    Now you can load from json string using AJAX.LastData to either array or dictionary ect.

    Ajax request "your json file you imported into project"

    Ajax on completed, load json string ajax.lastdata.

    I don't know if this will help: load data from json into array

    So, import you json file into the project. and it will save it under Files folder

    Hi DUTOIT

    Unfortunately my project requires that I be able to edit and replace elements of that JSON and then post them back to a file that is unique to each player. While I have been successful in loading it as a project file as you have described above C2 will not allow you to post changes back to the project file. And I can not use web data as this game will involve a in app store and having that data stored local on a players computer leaves too much to be tampered with. I cant have cheaters ruining my game for not only dose it hurt the paying player but that is money lost

    I need to work out how the URL works and how it will find the exact folder I want. I have the cross domain problem solved with a tool for chrome and am able to deploy this site to Azure. But I am stuck on the exact path the AJAX looks up. I can have "http://localhost/PlayerData/"&PlayerID&".json" That PlayerID is a global variable that will allow me to call their own files. Which will be stored in a database table and when you login to my site it will make a MySQL call and get that JSON in question.

    But I appreciate the help.

    Just got back from work and am trying to remember what I was working on before I left. I believe I was researching the 404.3 error and doing something with enabling IIS on my computer or something like that but I really don't want to leave myself open to hacking.

    Any one familiar with Webmatrix3? Im thinking about asking on their forum but am trying to see if I can not solve my issues first. They most likely will know nothing about Construct any way.

  • https://www.dropbox.com/s/vhx888s3cpvtuj8/WebDebugAJAX.capx?dl=0

    https://www.dropbox.com/sh/yfum8cnri1vzmoc/AACwvUPc0vqiFC6HDDak2ju7a?dl=0

    It's whatever the root folder for your server is configured to. It depends what server you are running. Basically it's the folder you're exporting your project to. If that top-level index.html is at http://localhost/index.html then the JSON file would be http://localhost/UserData/MyData.json.

    I really need to quite my day job so I can focus on this game dev shtick full time.

    So have you ever done something that you have tired to do for a good amount of time and then call it a night after feeling good. Only to come back a week later and have no idea what the hell you just did? Well now I do because I have managed to get the AJAX to see my file but then now after coming back to it, it will not work. Above is a Dropbox link for my capax and a folder that I am using for a web site. the package.json is the file I am trying to call but for the life of me I can not get the plug in to find it even though I have it sitting in the same folder as my index.html for the C2 Game.

    Here is my event sheet, ignore the Big A as that is just something I change the color of to see if my update was successful. The capax is a new file that has been striped of all the fluff not related to AJAX.

    https://www.dropbox.com/s/ug4otfz4210tvp4/C2error01.png?dl=0

    https://www.dropbox.com/s/ard8964th040wp7/C2error02.png?dl=0

    Some guidance would be most welcomed. I am mostly sure that my URL for the AJAX is wrong. That and I see that a Error 404.3 involves needing to set a MIME type but I am haveing toubble finding on what that means and what I need to do. Also there really is not a guide in this site that plainly says for a AJAX you must do A>B>C and for me that is really hard because I feel that this is something so simple to under stand that no one has felt the need for such a tutorial.

    ps what happened to being able to post attachments?