Sign in to follow this  
AAAP

Hey suggestions please?

Recommended Posts

Ahh, it's been a long time since I've been here. I lost interest in programming for a long time due to certain things -.- Anyway, me and my artist friend decided we'd try our hands and creating an SNES-style RPG game. I'm sure you guys see that a lot here :P Well, I didn't think it would be that hard, and truth be told it isn't really. Well anyway, I'm at a kind of problem. I don't want to hard code any of the menus or anything in the game. I want to have a set of Actions that can be performed, which will be set using NPC and menu scripts. actions like, Show Text (make a little text box I guess) Show picture Open Menu Cancel Menu Exit various inventory operations I can write these routines, and I can parse scripts, but i'm at a loss as to how to run them in the game after parsing them Would it be like... <in script file> Say { Hello World! } and then when it reads Say, it will run the Say_Text routine with "Hello World!" as the parameters? I think that makes sense... Maybe writing this down helped with mental block. But still, if anyone has better ideas please suggest them for me =)

Share this post


Link to post
Share on other sites
Do a search for RPGMaker, I believe that is a good framework for making SNES-style RPG games. I've no idea how it works but it would save you a lot of work if it does things in the right way for your project.

Share this post


Link to post
Share on other sites
I disagree about using RPGMaker because that would definitely not be as rewarding as coding an engine yourself, however that is a bit off topic.

About the script question, I don't know how the "professionals" do it, but I would just create an interface (abstract class) called "command" or something and create specific command classes out of it (one of which may be the "SayCommand" class). Also, you could probably use a linked list or array in every class as a list of parameters. Then, as you parse the script push all of the commands into a queue or linked list and read off their actions during runtime.

Share this post


Link to post
Share on other sites
Yes, we won't be using a canned RPG engine. As I said, I'm not really having a hard time writing this =)

Now, I havn't exactly worked out the entire triggers/scripts, but my GUI scripts are pretty much ready to go, which has a more small ammount of "commands", such as show a picture, a window, text, etc. The other commands would follow a similar format, I would think.

For now though, I'm working on an image sorter so that images called up in the scripts will be loaded automatically, and disposed of when unused. This is kind of new to me, so perhaps suggestions for this would be useful as well:

For now, I'm only using TGAs, but if I need other formats for some reason, I'd need to make some kind of format-detecting-thing.

As for the sorter itself, I'm using a std::map with the filename, and a structure that has the address of the texture on card, and a integer of how many objects are using it. So when the max # of textures is reached, and it wants to add a new one, it will flush out unused ones. I think I can manage that, but again, suggestions would help

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this