Ideas for a simple inventar system

For questions about using Classic.

Post » Mon Dec 27, 2010 6:24 pm

Hi,

Currently i'am trying to build a simple and clean inventar system for my game project. The system in Mickey's Adventure tutorial is nice but a bit to complex for my needs. I don't want to read out items from external array data.

I managed to build a few different systems, but i'am not satisfied with the results(to much events, unclean event sheet, to much time to include new items etc...)

The goal is simple: on a key pressed a seperate inventar screen will be displayed. On this screen you see graphical represantations or just the name of the items you collected. If the button is pressed again, the screen disapears and you return to your actual game layout.

Is there possibility to store this informations in simple text files to read them out from hash tables? I would prefer a solution without external tables and files, but i don't know if this is possible.

Have you guys some ideas or suggestions for such s simple inventar system? I'am not asking for event sheets or codes, just for some creative input and ideas.(Of course any described event is welcome :D )
B
2
G
2
Posts: 15
Reputation: 680

Post » Tue Dec 28, 2010 3:38 am

Hi,

Here are some ideas:

You might try an INI file:
viewtopic.php?f=3&t=7992&p=61722&hilit=inventory#p61722

viewtopic.php?f=8&t=6788&hilit=inventory

Also, here are several other inventory implementations listed by PixelRebirth:
viewtopic.php?f=3&t=7452&p=58102#p58102

Another one (I think modified off the adventure tut):
viewtopic.php?f=3&t=7721&p=59935&hilit=inventory#p59935

Keep in mind that there are pros and cons of using a simple text file to store your inventory. It is easier to work with than arrays but easier for a player to edit. If you make an "array helper" as I did the adventure tutorial then you still can store all of your stats in the text file and then convert to an array before sending out your game. It makes it a little harder for players to "cheat" and it is easier to access items in the array. Without the "array helper" though it would be a pain to populate the array.

I think arrays are pretty intuitive overall so if you have any questions on them or don't fully understand them then feel free to shoot questions our way! :-)
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Tue Dec 28, 2010 12:36 pm

Actually, I think most of these things are just way too complex, especially for a simple inventory system.

I've been putting together something simple that I think would suit most games. Kinda works like this:

On Player pressed Inventory: Set gv 'inventory' to 1, else: Is gv 'inventory' to 0: Make Inventory invisible

Is gv 'inventory' to 1: Inventory: Make visible, Selection: Make Visible, deactivate Player Controller

Done. Now you'd only need to define events when inventory is 1 to move the selection around and if the selection is overlapping an item and you press a button, activate it, press the button again, deactivate it.
B
6
S
2
G
3
Posts: 520
Reputation: 2,690

Post » Tue Dec 28, 2010 8:27 pm

Thanks for the help!

@scidave:
the links gave me a lot of ideas for the system. I wonder why i wasn't able to find this posts...
And a txt file is completely fine for me. I think if a player wants to spoil the fun through cheating than he should do this :P
I'am sure arrays are very intuitve for people with coding experience. But i have none, so arrays are the same black magic for me like python and c++ :D

@thomasmahler:
Right now i'am using such a simple system. It works fine, even with mouse interaction and displaying item information on mouseover. But at the moment the event code is unnecessary complex and i have to write events for every single item. In this early stage of the game there are not many of them so now this is no problem, but i guess as the project will grow this system will become more and more complicated and time consuming.
B
2
G
2
Posts: 15
Reputation: 680

Post » Tue Dec 28, 2010 8:32 pm

I'm pretty sure it should be fine for a game like Zelda, where you mainly have 20 or so items and that's it. For complex RPGs with hundreds of items... yup, it'd suck.
B
6
S
2
G
3
Posts: 520
Reputation: 2,690


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests