Sign in to follow this  

Where does GameLevel class belong?

This topic is 2541 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

Hi Im in charge of coding a reusable engine. Im confused at where should GameLevel class belong? as part of the engine or as part of the game?How do you guys do it?If I make it part of the engine, then probably the engine wont support user-designed-GameLevel class...I really need advice now...thanks

Share this post


Link to post
Share on other sites
The line between game and engine is never completely clear. The fact that you are asking a question this specific makes me think that you should focus on writing a game first. Once you have a game written you can harvest the common code into an engine.

Share this post


Link to post
Share on other sites
Hmm that makes me think there's no "Single Engine", but what other general game engines do?Unity, Unreal, CrystalSpace, Do they make it part of their engines? (Sorry if I sound stupid, but I never used them nor can download them now, connection Cut by ISP due to run-out-Quota (T_T) )

Share this post


Link to post
Share on other sites
Hmm maybe you mean a 'World' class? Anyway if it's Engine part, that means user will not be allowed to use their custom map format/class right? So the engine should provide 'Purrfect' GameLevel class and format which Iam intersted in. Damn I need to wait for a week to revive my connection...

Share this post


Link to post
Share on other sites
Quote:
Original post by Bow_vernon
Hmm maybe you mean a 'World' class? Anyway if it's Engine part, that means user will not be allowed to use their custom map format/class right? So the engine should provide 'Purrfect' GameLevel class and format which Iam intersted in. Damn I need to wait for a week to revive my connection...


Well, if you want the user to have that much control then I suppose you can have it as part of the game. But for engines like Unreal, it's part of the engine.

Really you should be able to expose enough functionality in your level class anyway to make it flexible enough. But if your engine is so "reusable" that this isn't enough, then it really sounds like you are biting off more than you can chew.

The best engines are the ones that focus on one or two things and do them really well (ie action games for the Unreal engine), rather than trying to do 100 things poorly.

Not trying to discourage you or put you down in any way! Either way best of luck :)

edit: what exactly do you envisage the typical GameLevel class to contain?

Share this post


Link to post
Share on other sites
@mightypigeon: Just simple class that contains a octree-ed map and octree-ed entities. I still dunno how to texture the map mesh though, use splatting or something else...I wonder how Unreal render its level..very flexible for indoor and outdoor scenes (think about Lineage)

Share this post


Link to post
Share on other sites
Quote:
Original post by Bow_vernon
@mightypigeon: Just simple class that contains a octree-ed map and octree-ed entities. I still dunno how to texture the map mesh though, use splatting or something else...I wonder how Unreal render its level..very flexible for indoor and outdoor scenes (think about Lineage)


Unreal uses a combination of terrain, static meshes and oldschool BSP geometry.

Lineage used a heavily modified version of the engine though. Even with an engine like Unreal engine modifications are unavoidable.

Share this post


Link to post
Share on other sites
Well some maps are outdoors and use terrain. (not sure exactly what spatial partitioning they use but I'd assume an octree or something like that). BSP does stand for binary space partitioning, there is still a bit of BSP brush-based geometry used for levels (usually the shell is done in BSP and then certain parts replaced with meshes and details added with meshes).

You can't use BSP for terrain (well, technically you can but it's very inefficient). But there's nothing to stop you from having part of your level in an octree, part of your level as BSP, part as something else...

But the BSP tree stuff is probably mostly there for legacy reasons, there's better data structures to go with these days (that is a massive topic in itself).

Share this post


Link to post
Share on other sites

This topic is 2541 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.

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