droptank21's Recent Forum Activity

    From recent tinkering..."Global Objects". (if feasible)

  • <img src="smileys/smiley1.gif" border="0" align="middle" />

    It worked. Thank you a bunch Kyatric.   <img src="smileys/smiley32.gif" border="0" align="middle" />

    Now to test out creating items, storing them in an inventory, using them to create events by dragging and dropping over other objects and hopefully create an animation effect or two.

    Thanks again.

  • I added a new text object, edited its instance variables to show the global variable and still nada.

    So I even created a new global variable(Message2), updated instance variables and updated all of the event info to match the new global variable specific to the second layout. Still nothing.

    CAPX: Shadowgate2 CAPX

    <img src="http://www.mypwn.com/example1.jpg" border="0">

    <img src="http://www.mypwn.com/example2.jpg" border="0">

  • I'm having issues transitioning from layout 1 to layout 2. The objects transition as they should but the events in the second layout don't function at all. Could anyone tell me what I may be doing wrong?

    Here is the CAPX: Shadowgate CAPX file

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • <img src="smileys/smiley1.gif" border="0" align="middle" /> Sweet

  • Tom,

    You had mentioned earlier that:

    Yes! Jquery is included with exported games, and it has some excellent AJAX wrappers. These will be available in C2 soon hopefully as they open the door on what can be achieved massively.

    AJAX also will be able to manage some multiplayer online games as well (turn based and puzzle). HTML5 websockets will be able to handle real time multiplayer games.

    When the AJAX plugins are completed I'll write some tutorials on how these can be applied easily. I'll also write some sample server side code in multiple languages to make it easy for people to install.

    Do you still plan to write up a quick tutorial on how all of this is done? I plan on developing (don't laugh) an HTML5 rendition of Shadowgate that doesn't kill the user every three seconds. <img src="smileys/smiley2.gif" border="0" align="middle" /> I will need to have, of course, a login page and a way to manage which rooms, events, items etc each individual user has.

    While the method of maintaining a database on the user's computer would be simple I'm guessing it wouldn't take much for them to hack the XML or text code in the file. Hence the need for sql database connectivity. I am decent with sql and okay with php, but have almost no knowledge of AJAX.

  • Good question.

    Everything in HTML and Javascript is client side, that means, whoever is playing your game can theoretically view all the source to it. It will be obfuscated as part of the export process which will serve well in certain types of plagiarism, but for storing connections to databases, this is a big no no as anyone that can view the source and extract the database username and password could cause havock on it by executing any command they wanted. This is why there is no native support for database connections in HTML/JS.

    Why not just switch the .html to .php, it would still then run all the html and javascipt code but only process the php requests server side. I'm not a php/mysql expert but I'm fairly sure php code is not visible client side. The only dilemma I foresee would be not being able to include php into the js files.

  • With HTML and AJAX requests, it will be really really easy to make requests to servers with HTTP requests to execute certain SQL commands, and retrieve data. Websockets will be more functional for streaming/realtime data.

    Tom

    Wait??? Let me be sure I'm reading your response correctly. HTML5 allows AJAX XMLHttpRequest objects within js files?

  • I suggest you to rewrite a preciser review of what your needs are and what you would like to see implemented.

    Okay. Basically a built-in IDE that allows php and mysql interoperability.

    For example: In the first layout is a splash screen where the user can login or register. The inputs are sent via php to a mysql database. If the user id and password exists in the mysql database the next layout is displayed. If the user is not logged in an error message is displayed.

    Register brings up a new layout where the user can create a user id and password and populated into the mysql database.

    Example 2: After loged in the user's character picks up a "usable item". The sprite for the item is destroyed on the main window but populates in the items inventory. Likewise, if the user utilizes the item from their inventory the sprite in the inventory is destroyed and that object's/sprite's event is run.

    Example 3: User's character takes damage from hazardous object. As far as I have seen in most of the examples so far, the health of the character is maintained in a js file which can be very easily hacked by anyone who knows js. If health/HP level is maintained as a variable in a mysql database and only accessed server side via php, it cannot be hacked by simply changing a js file.

    Example 4: User's character triggers battle sequence. New layout opens showing character sprite, moster sprite, HP, etc. (Similar to Final Fantasy 1 battle scenes) User clicks button to attack. Character sprite movement etc. Deals damage to enemy- damage dealt represented in message. Enemy responds dealing damage to character-damage dealt represented in message. HP level decreased. Character deals damage to enemy reducing enemy HP to zero. Enemy sprite dissolves. Victory message displayed. Stat change message displayed ($, Experience, etc...). Sequences back to prior layout before battle scenario layout triggered. New HP/MP/$/Exp variables updated.

    Those are just a few examples. What I am suggesting is an IDE implemetation to Construct 2 to quickly and easily add mysql variables and php script. Just as it is easy to add a sprite and set js script events for it, Constrcut should just as easily set mysql variables and set php scripts to manipulate and work with them. (IMO )

  • What file extension was the sprite?

  • I'm new here and to programming in general so go easy. Lol.

    I would suggest a built in library or what you all I suppose call a plugin of some sort that incorporates php and mysql.

    Allow the programmer to set variables in mysql, insert php code and such and auto populate the mysql info into an sql database.

    I may be covering something that Construct 2 already does, however I haven't yet seen any db files in any of the samples people have constructed.

droptank21's avatar

droptank21

Member since 6 Apr, 2011

None one is following droptank21 yet!

Trophy Case

  • 13-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies