Letting players create their own levels

Discussion in 'iOS Programming' started by Karl King, Jul 1, 2013.

  1. Karl King macrumors newbie

    Jul 1, 2013
    Hi guys! This is my first post here, and I am still very new to iOS development, so please forgive me if I ask any newbie questions! :D Anyway, I was wondering if there are any resources online or anyone here that might be able to explain to me how to add a functionality to my game that would let the player create their own small level using properties that I have created and put into the game. Basically, they would need to grab and place each item where they want it and save the level to replay at any time. It will essentially be a side scrolling 2d game. I don't know how difficult this would be to implement, or how long it might take. Like I said, I am new to all of this! If there is anything more I can explain, please let me know and I will try!

    Thanks everyone!
  2. ArtOfWarfare macrumors G3


    Nov 26, 2007
    Yep, but you're getting way (at least months, possibly years) ahead of yourself right now.
  3. Karl King thread starter macrumors newbie

    Jul 1, 2013
    That's what I figured. Do you know of any particular websites that would explain it though, even if it is just to get me thinking about how it would work?

    Thanks again.
  4. 1458279 Suspended


    May 1, 2010
    One big issue is what you use for a game engine. Does the game engine allow you to do something like this. Even if they don't have easy access to something like this, you might be able to do a workaround.

    Example, you have a box somewhere, the user decides to move that box to the other side. Does the game engine make that easy or hard?

    Would you have to make everything or most everything optional? Does the engine load everything based on a config file or is it stored in some file?

    My guess is that most game engines are not setup to do this, they are setup for the developer to make the game.

    So you'd probably have to create a work-around, how hard/easy that would be depends on how the engine loads and control game objects.

    Most advanced game engines probably use a UI that sets up all the objects, so you'd have to dig under the hood to see how this is done and if you can control it.

    Then, after that, you have to create an interface for the user to move object, control attributes of objects, maybe even testing how attributes work. Not to mention the logic of what can be combined or changed for certain objects.

    I'd say it's not going to be very easy.
  5. Karl King thread starter macrumors newbie

    Jul 1, 2013
    Okay. That is very true. To give you guys a little better insight into what kind of levels I have in mind, it would be alot like the old Excitebike game on NES, but not with bikes. But essentially the player would be picking and dropping ramps and obstacles into place and then sort of skating over or around them. As for the details of how I am building the game thus far, I am using Xcode and Cocos2d, and I have considered loading my tilemaps with Tiled Map Editor. I am not married to any one idea at the moment, but just considering what my limitations are with the game.
  6. xArtx macrumors 6502a

    Mar 30, 2012
    So what's the problem?
    Is the game written yet or not?
    If you can write a game from scratch, writing a level editor for it will be a piece of cake,
    and you wouldn't even need to ask.

    I think you are ahead of yourself thinking about a level editor if you don't have a game.
  7. Karl King thread starter macrumors newbie

    Jul 1, 2013
    I am putting the game together as we speak. I am creating the art and the different game properties as well as beginning the coding process. Even though I am asking these questions now, I realize it may be months before I get to the point of actually putting this information to use. I guess I am just wanting to get a grasp of what is or isn't possible. My basic game is much less complicated than the portion involving the custom built levels. They were more of an idea that I am considering adding to the game only if they are feasible.
  8. ChOas macrumors regular

    Nov 24, 2006
    The Netherlands
    Hi there, you might want to have a look here:


    Now, that link is specifically for creating an editor, but the site has loads of useful articles.
  9. Karl King thread starter macrumors newbie

    Jul 1, 2013
    Thank you ChOas! I am a big fan of Ray's site and tutorials. I will definitely give your link a try. And thank you again to everyone for your help. Once again, I know I am new to alot of this, so I may come across as overly ambitious, but I totally understand this is going to be a challenge, and I am fine with that. I don't want this to be easy, I just want to make it happen, even if I have to overcome alot of obstacles along the way! :)
  10. xArtx macrumors 6502a

    Mar 30, 2012
    If you are writing the game from scratch, and it sounds like that is your intention,
    and it is a 2D platform game, your levels should be stored somehow in
    some format you either borrow, or make up..
    ie. Level 3 of the game has this particular background, and obstacle here,
    some enemies come out in this pattern, etc.

    Once you actually have a game referencing the data for those levels,
    and playing, a level editor is trivial.
    It's just a matter of making a program that creates the level data in
    the format you used in the game, and provides an interface to edit the data.

    When writing the game, all you need to worry about is that you are using
    some orderly format for the level data, rather than something like this:

    if (gamelevel == 1)  {
    //load level one background
    if (gamelevel == 2)  {
    //load level two background
    // etc.

Share This Page