🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How to implement levels for a text adventure

Started by
0 comments, last by nfries88 8 years, 3 months ago

If this is the wrong place for this question, please move it.

I'm developing a text adventure game in my spare time, and came across an issue. How do I implement my levels? What I mean is, are levels just classes, Ex:


Level first  = new Level();
first.isMissionCompleted();

This example I found treats each level as a static class. It's sort of what I have in mind.

Ideally would this be a good?

I guess it depends how I'm implementing my game. I have a class that manages Characters(Players/NPCs), Weapons, and Inventory. Now each level could contain various people, cities, and locations to complete missions. I also need to check to make sure the input is valid, where the player is, and so forth.

How would you go about doing it?

Advertisement

Its an option, but ideally you would have a "next level" integer value stored somewhere so you wouldn't need to check every level for completion.

This topic is closed to new replies.

Advertisement