How To Store and Access RPG Data?

0 favourites
  • 6 posts
From the Asset Store
DATA+ (Addon Pack)
$11.25 USD
50% off
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • Hi there. I have a fair amount of experience developing browser-based RPGs with HTML/CSS/Javascript for the user interface, and PHP/MySQL for the game logic and user/game asset data storage.

    I'm considering trying to use Construct2 for a new action RPG idea I have. My plan is to use Construct as the front-end, but still store all of the user and game data in a MySQL database, and use PHP to process all the game logic on the server side.

    My idea is that I would have a series of generic layouts that load different resources from the MySQL database via AJAX depending on what the user is doing. For example, the user might enter a building. This would cause all of the assets and graphics for the interior of the building to be loaded (layout background, furniture, NPCs, etc) dynamically from the server via AJAX. Another example might be that a user opens a chest. This would dynamically load from the server a list of the contents of the chest for the user to view and manipulate, and then update the server if the user takes something from or puts something in the chest.

    Is this something that makes any kind of sense, or is this totally the wrong way of going about handling RPG game assets within Construct? I've been trying and failing to wrap my head around the best practices for storing and retrieving large amounts of data with Construct. It would be nice if I could keep it all internal within Construct itself, but this seems totally impractical to me since the game could potentially have hundreds (or thousands) of items, NPCs, locations, attributes, etc, etc. Additionally I'm a lot more familiar and comfortable coding game logic with PHP, processing all game logic server-side also has a number of inherent security benefits, and storing all game data server side allows for adding new content with relative ease.

    TL;DR:

    I'm trying to make an RPG which will have lots of stuff in it (hundreds of items, NPCs, locations, attributes, etc). What is the best method to store and retrieve large amounts of data such as this using Construct2?

    Thanks for your help!

  • I would love to know the answer to this too.

    It seems impractical to load the whole game at the start.

    I would prefer the first load to be rather quick, so the player can get into the game, and then other levels and items can be loaded/streamed whilst the player is playing, and not having to store the whole game in memory would be a bonus for large games.

    Also I assume that loot drops would be more secure if you had to pull them off a server; checks could be run and what-not to reduce duping.

  • The answer is doable. It's also my main plan for my online web rpg I plan to do. After using C2 for a few months I can say your plan can be done. I say go for it.

  • I use MySQL a great deal with asp and javascript and it sounds like quite a lot of work, I have been looking at single stack javascript like wakanda. This would cut out the php and mysql and would make a great partner for C2

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Considered looking at http://clay.io has API to handle items ?

  • I use Rex's CSV to create external databases. You can then import the file to construct via the project tab (right click the files folder) then use the AJAX object to load the file to the CSV plugin

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)