Sign in to follow this  

Level Format Design: Appreciate Feedback

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

Hello , I am a programmer making my own small engine for game development. Eventually it will be [almost] usable. Right now Im creating the level system and I'm wondering if should go with: 1. Text File: Pro: easy to develop Con: Relys on Standard Data Files [images , etc] provided with game. 2 Zip: Pro: Contains all resources needed for level [music , object coordinates] easly create content Con: Large file size I would also like to know is implementing a scripting engine like python useful , if it is: is it easy to implement with a separate engine ? And do you have any tips for doing so ? Thanks A Novice Developer

Share this post


Link to post
Share on other sites
I have never worked on a game engine it self, but i know how it is implemented, I have also played around with a lot of engines.
I would say use zip files. Think form a users point of view. There is nothing better than dragging and dropping a resource file into a directory. I understand your concern about dealing with huge bulk files though.
It really is design decision. Or even better allow both.
ev

Share this post


Link to post
Share on other sites
Those are really different questions, you're comparing apples and oranges, though they are similar they are also different, let's break it down:

Text-files versus binary: text files are easy to hand-edit and read, but harder to parse. What it really comes down to is do you need to hand-edit them?

Pack level specific data or rely on already distributed content: This is less of a problem if you use some kind of vfs. In my current game I mount each levelfile(zip archive) to the vfs and loaded a common, recently mounted, binary level file. Using this technique it can reference both the common or level specific files in the same way.

Share this post


Link to post
Share on other sites
Quote:
Original post by jopy
1. Text File: Pro: easy to develop Con: Relys on Standard Data Files [images , etc] provided with game.

Why is relying on 'standard data files' a con? You're going to need images and other resources regardless.

Quote:
2 Zip: Pro: Contains all resources needed for level [music , object coordinates] easly create content Con: Large file size

A con to your pro: how about data sharing between levels? As for your con: why would zipping the resources that you need anyway result in larger files? Quite the contrary. Either way, those options do not contradict each other: you can store a text file and all the images it references inside a .zip file.

Quote:
I would also like to know is implementing a scripting engine like python useful , if it is: is it easy to implement with a separate engine ? And do you have any tips for doing so ?

I've never integrated a scripting engine - I've always just used Python directly, using some framework or engine alongside it (Pygame, Pyglet). Either way, a high-level scripting language is definitely worth it. :)

Quote:
Original post by sirGustav
Text-files versus binary: text files are easy to hand-edit and read, but harder to parse. What it really comes down to is do you need to hand-edit them?

Depends on what language and libraries you're working with I suppose, but I've often found text files to be easier to parse.

Share this post


Link to post
Share on other sites
Elaborating on top of sirGustav,
Quote:
Original post by jopy
Right now Im creating the level system and I'm wondering if should go with:

  1. Text File: Pro: easy to develop Con: Relys on Standard Data Files [images , etc] provided with game.

  2. Zip: Pro: Contains all resources needed for level [music , object coordinates] easly create content Con: Large file size

Supposing you are on limited time and effort and need to prototype fast, there's no choice but native binary (not compressed).
Archives add a layer of complexity in building the assets required to run the system. It's just dropping a fine in a .zip, but still adds. Over many and many format changes (because you'll change formats) you will sooner or later forget to drop the new file, have your system bail out with no apparent reason and figure out the point after hours of debugging.

Text files? No thanks. I've posted a few negative messages on using text files (I'd have linked them here if I could find them). The main points against them are:

  1. They truly go BIG fast. The benefit of a human readable format is quickly lost, essentially after initial design testing.

  2. They can't be truly complex. While there's no reason to not have complex text files, with hierarchies, forward declarations and whatever comes to mind, I am not quite sure those still qualify as "human readable".

Quote:
Original post by jopy
I would also like to know is implementing a scripting engine like python useful?
Probably not so early. Having scripts adds alot of implied complexity. Until the tech isn't at least ironed out, you're better work with less variables, not more.

Share this post


Link to post
Share on other sites
Quote:
Original post by Krohm
  • They can't be truly complex. While there's no reason to not have complex text files, with hierarchies, forward declarations and whatever comes to mind, I am not quite sure those still qualify as "human readable".


  • Well... your source code qualifies as "human readable", right? Think about some of the things that keep it readable. Maybe some of those ideas (splitting into multiple files, hierarchical organization, etc.) are applicable to level file design, too. :)

    Share this post


    Link to post
    Share on other sites
    Quote:
    Original post by Krohm
    Supposing you are on limited time and effort and need to prototype fast, there's no choice but native binary (not compressed).

    I'd use a language/platform that's suitable to prototyping - and often such high-level languages make it easier to parse text than binary files.

    Quote:
    Archives add a layer of complexity in building the assets required to run the system. It's just dropping a fine in a .zip, but still adds. Over many and many format changes (because you'll change formats) you will sooner or later forget to drop the new file, have your system bail out with no apparent reason and figure out the point after hours of debugging.

    True, it's added complexity. A virtual file system, as sirGustav suggested, will hide that complexity (treating archives as folders), but that still takes some time and effort to implement.

    Adding files to .zip files is a step that can (and most likely should) be automated.

    Quote:
    Text files? No thanks. I've posted a few negative messages on using text files (I'd have linked them here if I could find them). The main points against them are:

    1. They truly go BIG fast. The benefit of a human readable format is quickly lost, essentially after initial design testing.

    Some frameworks/engines use both text and a binary representations: text during development - after all, it is still a lot more readable than binary - and binary for deployment.

    Quote:
    Quote:
    Original post by jopy
    I would also like to know is implementing a scripting engine like python useful?
    Probably not so early. Having scripts adds alot of implied complexity. Until the tech isn't at least ironed out, you're better work with less variables, not more.

    True, true. One of the reasons why I never bothered integrating a scripting engine - I'm using Python directly. :)

    Share this post


    Link to post
    Share on other sites

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