How To Store and Access RPG Data?

Get help using Construct 2

Post » Tue Feb 26, 2013 7:03 pm

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!ExperiencedNoob2013-02-26 19:30:46
B
2
Posts: 1
Reputation: 252

Post » Tue Feb 26, 2013 9:46 pm

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.
B
11
S
2
G
3
Posts: 22
Reputation: 2,590

Post » Tue Feb 26, 2013 10:33 pm

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.
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Tue Feb 26, 2013 10:44 pm

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
B
19
S
5
G
2
Posts: 20
Reputation: 2,621

Post » Tue Feb 26, 2013 11:07 pm

Considered looking at http://clay.io has API to handle items ?
B
24
S
11
G
5
Posts: 140
Reputation: 5,004

Post » Wed Feb 27, 2013 4:02 am

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
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,129


Return to How do I....?

Who is online

Users browsing this forum: badmoodtaylor and 11 guests