RPG game (Arrays, Structs Message boxes) (Allegro 5)

To start with, I am making an RPG (rogue like more or less) and it is all made using the the console. I am wanting to work on remaking it using allegro. I know how to use a tile map for integers and am thinking i know how to do simple collision within the array. but i do not like having to make my maps using integers. it is difficult for me to keep track of. So two ways i came up with to solve this are as follow:
1: make the tile map read the characters and create the map that way
2: Convert character array into integer array and then from there i know how to make tile map already

maps look something like this

@ player, # wall, M mountain(mine), T tree, W water, + next map, - previous map

1
2
3
4
5
6
7
8
9
10
map[][] =
{
"##########",
"#@     MM#",
"#   TT  M#",
"#        #",
"#   WW   #",
"#-   W  +#",
"##########"
}


so any help with this is greatly appreciated.


next, I have a very poor inventory system and it is pretty much a pain in the ass to get anything done using it... and yet i have a bunch of items already in game using all integers.

Can someone point me in the right direction to learning structs for an inventory and banking system? see the attached files for how i have it already. it works how i have it but i know there has to be a better way to do this. see lines 801 for inventory and 3844 for bank also see 2190 for cutting down wood, fishing mining and cooking are similar in structure.


Finally i want to know if there is a way to make a native message box where the buttons are custom. for example.

ALLEGRO_MESSAGEBOX_YES_NO now what if i wanted to ask the player if they want to go to the left or the right for example

ALLEGRO_MESSAGEBOX_LEFT_RIGHT I know that this doesnt work. but i want to know if there is a way of doing something along these lines




the program can be found here:
https://sites.google.com/site/temprpgquestion/go-here-for-the-program
Last edited on
Topic archived. No new replies allowed.