CoffeeOD's Forum Posts

  • Agreed, simple tutorial about how to get started with the new websocket feature would be nice, it could be simple as sending text to websocket server and displaying that text in-game (from server).

  • Short answer: Yes.

    Longer version:

    This scirra.com/tutorials/346/online-high-score-table-ajax-php-mysql tutorial will give you basic information, you can modify script for your needs.

    Example call:

    "http://website.com/get.php?name="&name

    note: after name=" you should define where script looks for name, it can be global variable, instance variable or so. To get information out, I had following line in my PHP script

    $result = mysql_query("SELECT * FROM (table) WHERE (row) = '" . mysql_real_escape_string($_GET['name']) . "'");
    $row = mysql_fetch_row($result);

    (table) = name of database table.

    (row) = row where to look for info.

    Example

    $result = mysql_query("SELECT * FROM highscores WHERE name = '" . mysql_real_escape_string($_GET['name']) . "'");
    $row = mysql_fetch_row($result);

    In this script is looking from highscores table and checking "name" row to match player name and gets information from there. Then we want some data out from player mysql rows. We can do following

    $koe = stripslashes($row[3]);
    echo $koe;

    This would echo $koe value to browser which you can echo to game using "Ajax.LastData" method. So whats up with $koe? In "$koe = stripslashes($row[3])" line Im looking third row from database, here is

    example setup:

    highcores table: ID, name, score.

    now when we look at this, "score" is third row which is why we echoed it since we wanted score.

    At websites (where we we have this script) we echoed $koe Ajax.LastData got one value which was $koe (score from database). You can use this method to dig out information from database to your game, modify script for your needs. To save up some time, you can also do few if/elseif things in script to define what exactly script is looking.

    Example

    "http://website.com/get.php?pid=score&name="&name

    example code at PHP page.

    <?php if $_REQUEST["pid"] == "score") { mysql code for score search };
    elseif ($_REQUEST["pid"] == "avatar") { mysql code for avatar search ; }?>

    Now you have to only change "pid=score" line from ajax request to match score or avatar and your PHP script would echo information you need without need to setup more complex thing. To get image, I assume you could echo full URL, for example check this file: dl.dropbox.com/u/59009902/load_image_from_url.capx

    Hopefully this helps abit, I assume you wanted more simple and short answer but I figured that small tutorial would help others who are looking for answer to same problem.

    This is not perfect solution but worked for me, tho I was searching and taking larger amount of data but idea is same. Feel free to send me private message if you need more detailed help.

  • I have done this multiple times using code, but having brainfart with C2 drag&drop system, any help would be very welcome.

    In short:

    1) while inventory(0) < inventory.width let loop run trough array from first to final "slot".

    2) If currentX equals 0 set string to get what X is first empty, then stop loop all together, no need to touch anything other as I want to get first empty (in this case "0") X location.

    Here is my few attempts but they fail, some loop affect all X?s and other just stops after first one, does not run trough all values and then pick first 0.

    This is inventory test where I want to put new item automatic to first empty slot available, since its random (maybe first slot is taken, maybe first, second, fourth but not third etc.).

    <img src="http://media.rajatila.com/images/failurtpt.jpg" border="0" />

  • Email send (from email), was in hurry tho so hopefully my points were clear enough :)

  • You do not have permission to view this post

  • Pretty fun, gameplay is simple but challenging.

    Have you consider any sort of power-up�s for normal attack? Example making enemies slower, blasting off multiple targets using area of effect missile etc.

  • I would not recommend using anything that you have not received permission for, even if person X did not get in trouble for using material X doesnt matter, these things goes case by case. Some people dont care if their material is being used, others will come after you in way or another and things might turn ugly very fast.

  • Small bump, would love to know is there any solution to this? Current system works only for those who have active internet connection available.

    Second thing I worry is Kongrete/other providers if they have similiar data storing solutions for us to hook into, of course Steam is another thing which Im uncertain with current setup, all seems quite scary at this point :P

    Making wrong decision now with data storing can lead into bigger problems later. I have look into other engines but to be honest, CS2 provides us fast way to make our ideas happends.

  • Whats your opinion on GarageGames recent news? After trying to search decent 2D engine I found following intresting news topics:

    1) Torque 2D MIT

    Torque 2D MIT is an all new, open source, version of our 2D game development software.

    link: garagegames.com/community/blogs/view/22062

    2) 3 Step Studio

    Very intresting screenshots: 3stepstudio.com/news/next-release-coming-soon-

    3 Step Studio looks very nice to me, but only time will tell how it will work out.

  • All right, back with more questions. I managed to save and load information using database, then loading/saving information via JSON and parsing necessary parts to arrays.

    For offline games, is there any way to store information in XML or any other file to player own computer and use that for saving/loading information?

    I assume we can use instance variables to check if object should spawn or not, but there is alot more information we need to be able to handle such as player own information (health, mana, skill points, money, items currently in use, skills selected etc.), inventory, map progress, dungeon progress, game total progress, karma (relationship between other NPCs) and more. Hoping that player will not clear their cookies and lose all game data is bit akward.

  • Good questions, Im also quite intrested to know about offline data storage without fear of losing it. I had an idea to use XML file to store information but not sure if file is saved to your HD, havent tried since for now I dont need that offline features. For online we use database (mysql) to store player(s) information and load/save them when needed using simple register/login system.

    About selling your game, you could read scirra.com/forum/ideas-to-monetize-html5-games_topic51184_page4.html and see if there is any ideas which would benefit you.

    Another option is Steam Greenlight, I found few games that are made using this engine and submitted their game at Steam Greenlight.

    Save the Creatures

    steamcommunity.com/sharedfiles/filedetails

    Adventures of DaKoo the Dragon

    steamcommunity.com/sharedfiles/filedetails

    8BitBoy

    steamcommunity.com/sharedfiles/filedetails

  • Can I make html 5 websites out of this too?

    Here is few topic you might want to read before considering doing so.

    scirra.com/forum/construct-2-website-my-professional-webpage_topic44637.html

    scirra.com/forum/making-websites-with-construct-2_topic51310.html

    Even if its possible to certain point, I dont think anyone will recommend using this engine for websites. If you want basic websites you are better off using some blog engine (wordpress for example) or searching free websites templates/website creation softwares.

  • You might want to try scirra.com/tutorials/345/how-to-sell-your-game-to-large-publishers/page-1/comments-2 sounds quite intresting, will definitely look into that more, thanks for sharing.

  • CoffeeOD - I think as a whole this topic has been blown out of proportion. Firstly, before you commit to any product/service etc.. you need to do your own due diligence. There are far worse advertising schemes out there that are clear breaches of the Fair Trading Act (or whatever the equivalent is in your country). C2 in my opinion is not remotely approaching anything like that.

    Secondly, for a full license it's 79 Euros (I think). That's hardly going to break the bank, and even then you can download the free edition to play around with the exporters, and do an evaluation for yourself. That's what I did before purchasing my full license.

    EyeHawk I think its good to discuss about any confusion/problem with product and for community (old, new or future) its nice to see that developers are doing their best in all situations, it shows that they actually listen and care which I cant say for certain developers out there.

    Not sure if you understood my point there, since it was nowhere near negative as your reply might makes it look or Im just taking it wrong way (if so, I apologize). I understand situation and personally did not have any problems to find out that outside HTML5 its third party road.

    My only "complain" was that front page should inform about that third party progmans, which from my understanding Ashley is working on to improve. I dont really see anything wrong about adding some sort of "statement" to cover third party requirement for publishing games to X platform, its clear and fast way to avoid future akward situations like this.

  • if anyone is serious about investing time into C2, I'm sure they would dig just a little further and see that 3rd party services are used - no one is hiding anything here.While its not "hiding", front page is giving impression that from making to releasing games for all of those platforms would work out of the box.

    I will admit that I first selected this engine due to that assumption, tho now I have dropped that idea and focus making PC/Browser version.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads