Tiled map level editor on DS

Discussion in 'NDS - Emulation and Homebrew' started by Schmendrick, Nov 6, 2011.

Nov 6, 2011
  1. Schmendrick
    OP

    Newcomer Schmendrick Advanced Member

    Joined:
    Sep 12, 2009
    Messages:
    55
    Country:
    Netherlands
    I've been working on a DS-based level editor, and by now the basics are pretty much covered.

    Proudly presenting: My Tiled Map Level Editor for NDS!

    Download: http://temp.dennisva...LevelEditor.rar

    Screenie (kinda blurry; blame pasting in word, then copying from there):
    [​IMG]


    Levels can be up to ~500000 tiles in size (for reference, the original NES Mario world 1-1 is ~4096 tiles in size). This number is limited by the DS' memory only (4MB yay).

    Updates
    Intermediate (111124):
    Fixed crash bug for AKAIO users.

    111113:
    - Added autolog save (fat:/data/LevelEditor/console.log) on guru crash
    - Added custom level save location

    Current features:
    - Easy-to-use level editor with stylus controls
    - Simple but efficient UI
    - Generic level data format to be used in any game engine
    - Show or hide grid, tile IDs or complete layers
    - Level saving/loading to/from sd
    - Up to 5 layers (last layer reserved for collision map data)

    - Dynamic layer resizing (when possible, resizing will keep your level data in place)
    - Customizable Parallax layer scrolling
    - Built-in customizable playtest featuring Mario

    Known bugs:
    - Playtesting may have some frameskips with crowded levels
    - Layers may not display correctly with severely crowded levels

    Confirmed working:
    - R4
    - Acekard 2i

    Readme/user manual included in zip (Level Editor User Manual.pdf). NES Mario world 1-1 included for funsies (Mario.level). Copy the 'data' folder in the zip to the root of your flashcart to use.
     
    Jwiz33 likes this.


  2. coolness

    Banned coolness PSN: Dutch_DarkLord

    Joined:
    Jun 14, 2009
    Messages:
    2,016
    Location:
    Rotterdam Bitches!!
    Country:
    Netherlands
    YES DAMN THANK YOU :D
     
  3. jurassicplayer

    Member jurassicplayer Completionist Themer

    Joined:
    Mar 7, 2009
    Messages:
    4,280
    Location:
    Pantsuland
    Country:
    United States
    I gave it a quick test with DeSMuME since this is actually something that I think is actually interesting (I don't have access to a DS at the moment). It's surprisingly pretty nice, though at the moment it seems to only be able to create some simple platformers at best (though I'm sure this isn't going to be a true statement for very long :3).

    Some of the sort of things I would love to see:
    - moving collision boxes
    - one touch only collision boxes (like a crumbling platform or something)
    - collision boxes that only have physical effects on the top of the box (like some of those platformers where you can jump up from a lower level while being underneath)
    - option for double jump or maybe wall jumping (or both :3...or even allowing them as power ups)
    - simple cut-scene (maybe just some text in a textbox and a character sprite to go with it)
    - other things that is usually found in platformers (:3 I seem to like platformers more than those top-down sort of games...but then again, there are always shmups :3)

    Once I get access to my DS again, I'll probably give it another shot (unless there is an update that I just HAVE to try :3). All in all, really smexy job with your initial release and obviously enough, I'll be keeping an eye on it.
     
  4. relminator

    Member relminator GBAtemp Fan

    Joined:
    May 28, 2010
    Messages:
    333
    Country:
    Philippines
    Awesome dude. This would be cool to use for future projects if it can emit h/c++ files.
     
  5. Prof. 9

    Member Prof. 9 GBAtemp Fan

    Joined:
    Jun 17, 2008
    Messages:
    316
    Location:
    The Netherlands
    Country:
    Netherlands
    Getting a Guru Meditation Error as soon as I boot it.

    pc: 20B758FC addr: 20B758FC

    registers:
    r0: 0204A150
    r1: 02047D10
    r2: 00000309
    r3: 20B75902
    r4: 02047D10
    r5: 0204A150
    r6: 00000309
    r7: 00000000
    r8: 023F4000
    r9: 0201F798
    r10: 00000000
    r11: 00000000
    r12: 00000000
    sp: 0B003CA8
    lr: 02039F01
    pc: 20B75904

    stack:
    0B003CA8: 02047D10 0201F798
    0B003CB0: 00000000 020097BB
    0B003CB8: 02064FD8 02002F15
    0B003CC0: 02064FD8 02009ABD
    0B003CC8: 00000000 0000490C
    0B003CD0: 00000000 023F4000
    0B003CD8: 0201F798 00000000
    0B003CE0: 00000000 02064FD8
    0B003CE8: 00000000 00000000
    0B003CF0: 00000000 0203B965

    This is on an Acekard 2i running AKAIO v1.8.8. My MicroSD card is using the regular FAT (not FAT32) filesystem. I'll try reformatting it and see what happens.

    Also, what is the file format for .pcx files?
     
  6. absolalone111

    Newcomer absolalone111 Chiptune Extraordinaire

    Joined:
    Aug 4, 2011
    Messages:
    69
    Country:
    United Kingdom
    i have a similar problem coming up, if not the same one, im using an M3 simply, i tried booting it up with moonshell, as that sometimes fixes stuff, but still no change.
     
  7. Prof. 9

    Member Prof. 9 GBAtemp Fan

    Joined:
    Jun 17, 2008
    Messages:
    316
    Location:
    The Netherlands
    Country:
    Netherlands
    I've reformatted my MicroSD card with the Panasonic SD Formatter, copied over all my old files, and re-extracted LevelEditor.nds and the data folder. The problem persists, I get the exact same GME.
     
  8. Godson777

    Member Godson777 Everyone's Favorite Blue Mario

    Joined:
    Mar 27, 2010
    Messages:
    394
    Location:
    idk
    Country:
    United States
    This looks interesting, I'll probably give it a quick test on my DSTWO. :yaynds:
     
  9. JinTrigger

    Member JinTrigger Asentrix Studios

    Joined:
    Jun 25, 2008
    Messages:
    1,550
    Location:
    Lunesta/Mysteria
    Country:
    United States
    Excuse my newb but what exactly is this a tile editor for.....
     
  10. coolness

    Banned coolness PSN: Dutch_DarkLord

    Joined:
    Jun 14, 2009
    Messages:
    2,016
    Location:
    Rotterdam Bitches!!
    Country:
    Netherlands
    its edting the overworld a program to use on the DS and can edit the NES
     
  11. jurassicplayer

    Member jurassicplayer Completionist Themer

    Joined:
    Mar 7, 2009
    Messages:
    4,280
    Location:
    Pantsuland
    Country:
    United States
    wtf...did you even test/think before answering ._.

    At the moment, it's just like a basic DS based game maker where you can place solid blocks around (as the name suggests, it's just tile editing, so nothing TOO amazing yet). It doesn't do shit with any NES, there just happens to be a demonstration level that is based off of the first level of Mario -_-"...
     
    1 person likes this.
  12. Schmendrick
    OP

    Newcomer Schmendrick Advanced Member

    Joined:
    Sep 12, 2009
    Messages:
    55
    Country:
    Netherlands
    Hi everyone, thanks for your positive feedback!

    It seems you may have mistaken this level editor for a game maker-like application. As it currently is, this is purely a level editor, which saves the levels as .level files, to be used in your own game engine. It just happens to include a playtest to see how your level plays in most common possible configurations. The file format is explained in the .pdf file.

    However, your comments made me realize it'd be cool to make a DS-based game maker software. You've given me a lot of ideas. I've been thinking of the possibilities, and I've thought up a basic design for it. Give me a few weeks and I'll see what I can come up with (no promises ;) ). I really want to do this, but sadly I don't have much time to work on anything (Going from university to full-time job is a big change :P )

    I could easily add an export button for this. What format should this be in? PM me if necessary.

    I'll look into the guru error, thanks for letting me know. Could it be an issue with libfat? Please try the following steps:
    - Re-download the file. I have updated the binaries to include a fat check.
    - Start the editor. If it's a fat issue, it should start up now.
    - Press L+R+SELECT. This will open the debug menu (You can close it by tapping the icons in the top-right and selecting 'close')
    - Tell me if you see the console say 'Could not initialize fat!'
    - If it does, I'll have to look into another way to do file management
    - If it doesn't, it was likely just a bug in my boot code, and it should work fine for you now
    - If it doesn't show or still crashes, please run it in an emulator (I use no$gba) to make sure you have the right version (it may be cached). It should boot, and show the message in the log by default.

    .pcx is a pretty common format (libnds even has a loadPCX function, which is why I use it - I'm lazy like that). GIMP can easily save your file for you in this format. Just make sure it's indexed (max 256 colors), with the first color index as transparent. Be careful when using Photoshop, as their color index order seems off sometimes (at least when I tried it).

    See my comment above. Basically in its current state it's a tile editor for use in your own engine. Since you know the .level file format, you can use the data in any way you want (see .pdf file)

    Thanks again! Let me know if I've missed anything or you run into any more issues, because that's unacceptable :D And if you make any levels, please share! I'd love to see what you guys can come up with, and how you use my software.

    EDIT: Woah, this post looks a lot smaller in that tiny editing window.. :blink:
     
  13. JinTrigger

    Member JinTrigger Asentrix Studios

    Joined:
    Jun 25, 2008
    Messages:
    1,550
    Location:
    Lunesta/Mysteria
    Country:
    United States
    Oh ok....I understand now. Thank you Jurassic
     
  14. zachtheninja

    Member zachtheninja Honorary Ninja

    Joined:
    Aug 28, 2011
    Messages:
    191
    Location:
    Texas
    Country:
    United States
    thanks, looks awesome!
    I'll be sure to try it.
     
  15. Godson777

    Member Godson777 Everyone's Favorite Blue Mario

    Joined:
    Mar 27, 2010
    Messages:
    394
    Location:
    idk
    Country:
    United States
    I've started it up, attempted to change the texture, or even do anything, and I get a guru error. I'll try to find a way to post it.
     
  16. Prof. 9

    Member Prof. 9 GBAtemp Fan

    Joined:
    Jun 17, 2008
    Messages:
    316
    Location:
    The Netherlands
    Country:
    Netherlands
    Tried it and it boots up now, but I don't see "Could not initialize fat!". This is what it says:
    Top screen
    Touch screen
    However, when I boot it up again click the "Load" button I get a brand-new Guru Meditation Error.

    Warning: Spoilers inside!
    I use several other homebrew apps that access the filesystem such as DSOrganize, MoonShell 2, DSCraft and NitroTracker (and of course AKAIO itself) so I don't think it's my microSD acting up (as formatting didn't fix the problem).

    EDIT: Interestingly, saving DOES seem to work as it produced three BackupX.level files as I was toying around with it, 4.11 KB each.
     
  17. Schmendrick
    OP

    Newcomer Schmendrick Advanced Member

    Joined:
    Sep 12, 2009
    Messages:
    55
    Country:
    Netherlands
    Is it similar to Prof 9's guru errors? It seems to happen around the same point (opening the file browser).

    Alright, thanks for trying; It seems fatInitDefault isn't the problem here. Do you get the same error when you tap the 'Texture' button (like Godson777)?

    I would like to ask you to make a level with something recognizable (like text or an image) with the default map texture, and save it. If it doesn't crash, it should be saved as fat:/data/LevelEditor/Levels/Level0001.level (check the console log to get the exact path). Please send it to mail dennisvanzwieten com so I can make sure it's saved correctly. If it doesn't save, obviously some IO is going wrong somehow (newer cards all have auto-DLDI patching, right?)

    At this point my add2line knowledge is kind of failing me. No matter what I do, all values I enter result in
    Code:
    ??
    ??:0
    
    .. which makes the guru exception system kinda useless.
    I've got the -g command in my compiler arguments, so it should work according to the one site I could find on this subject. I'm calling it with this code:
    Warning: Spoilers inside!
    Obviously I've checked that the paths are correct, and I've tried without the 0x prefix as well. Any ideas would be appreciated.

    As a side note, I ordered an acekard 2i for homebrewing, so I'll see if I run into the same errors when I get it. Until then, all I have is your cooperation. Thanks again!

    [EDIT] Ninja-edit! I see saving seems to work. Apparently then there's some issues with my file browser (though I wouldn't know what, or why it crashed on boot before). Could you send me the .level files anyway? I'll be able to do more as soon as I get my own acekard (I couldn't really ask you to try out several different builds with selected lines commented out.. Too much work on either of us :P)

    [SUPERNINJAEDIT] Please re-download. I've added yet another check which could prevent some issues. If it still crashes on tapping either 'Texture' or 'Load', I'm really gonna have to wait for my card. If it doesn't crash, but doesn't open the browser either, please check the console log for 'Couldn't open folder' message. If it doesn't crash and opens the browser, problem solved!
     
  18. Prof. 9

    Member Prof. 9 GBAtemp Fan

    Joined:
    Jun 17, 2008
    Messages:
    316
    Location:
    The Netherlands
    Country:
    Netherlands
    Yeah, pressing Texture produces the same GME as pressing Load.

    Pressing Save a couple of times got me a bunch of LevelXXXX.level files. I'll send those when I can (am using a mobile device atm). These are only 2.11 KB which makes sense I guess because the previous time I increased the map size.

    I also have an R4 btw, I'll test it on that as well. Does it work fine on your flashcard?
     
  19. Schmendrick
    OP

    Newcomer Schmendrick Advanced Member

    Joined:
    Sep 12, 2009
    Messages:
    55
    Country:
    Netherlands
    Awesome, thanks. I'm using R4 (with woodR4, if it matters), and it works fine. I assume it's got to do with getting the contents of the 'fat:/' directory or checking file extensions, since the rest of the browser code doesn't do anything special..
     
  20. Godson777

    Member Godson777 Everyone's Favorite Blue Mario

    Joined:
    Mar 27, 2010
    Messages:
    394
    Location:
    idk
    Country:
    United States
    I'm gonna re-download now, hopefully this will work.

    Also I'm using a SuperCard DSTWO, I'm saying that just in case it matters.

    EDIT: Just tested it again, guru errors again. I might have to take a pic of my DS Screen so you can see unless there is another way to post it.
     

Share This Page