Where does GameLevel class belong?

Started by
10 comments, last by Bow_vernon 13 years, 3 months ago
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
Advertisement
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.

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) )
a "GameLevel" class is usually part of the engine, and loads in user created levels, models and scripts.
[size="1"]
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...
ours is game level.

Game.Level

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?
[size="1"]
@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)
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.
[size="1"]
Unreal use terrain? what is BSP geometry? I suspect BSP(binary space partition) doesnt fit with terrain? Anyway good info.

This topic is closed to new replies.

Advertisement