Jump to content
  • Advertisement
Sign in to follow this  
Syrena

How to implement levels for a text adventure

This topic is 991 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!