Homebrew Tiled map level editor on DS

Schmendrick

Well-Known Member
OP
Newcomer
Joined
Sep 12, 2009
Messages
55
Trophies
0
Website
www.dennisvanzwieten.com
XP
166
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):
le-screenie.png



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.
 
  • Like
Reactions: Jwiz33

jurassicplayer

Completionist Themer
Member
Joined
Mar 7, 2009
Messages
4,484
Trophies
1
Location
Pantsuland
Website
www.youtube.com
XP
2,894
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.
 

Prof. 9

Well-Known Member
Member
Joined
Jun 17, 2008
Messages
324
Trophies
1
Location
The Netherlands
Website
twitter.com
XP
853
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?
 

absolalone111

Chiptune Extraordinaire
Newcomer
Joined
Aug 4, 2011
Messages
70
Trophies
0
XP
209
Country
United States
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
0B003CA8: 00000000 020097BB
0B003CA8: 02064FD8 02002F15
0B003CA8: 02064FD8 02009ABD
0B003CA8: 00000000 0000490C
0B003CA8: 00000000 023F4000
0B003CA8: 0201F798 00000000
0B003CA8: 00000000 02064FD8
0B003CA8: 00000000 00000000
0B003CA8: 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?
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.
 

Prof. 9

Well-Known Member
Member
Joined
Jun 17, 2008
Messages
324
Trophies
1
Location
The Netherlands
Website
twitter.com
XP
853
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.
 

jurassicplayer

Completionist Themer
Member
Joined
Mar 7, 2009
Messages
4,484
Trophies
1
Location
Pantsuland
Website
www.youtube.com
XP
2,894
Country
United States
Excuse my newb but what exactly is this a tile editor for.....
its edting the overworld a program to use on the DS and can edit the NES
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 -_-"...
 
  • Like
Reactions: 1 person

Schmendrick

Well-Known Member
OP
Newcomer
Joined
Sep 12, 2009
Messages
55
Trophies
0
Website
www.dennisvanzwieten.com
XP
166
Country
Netherlands
Hi everyone, thanks for your positive feedback!

Some of the sort of things I would love to see:
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 )

Awesome dude. This would be cool to use for future projects if it can emit h/c++ files.
I could easily add an export button for this. What format should this be in? PM me if necessary.

Getting a Guru Meditation Error as soon as I boot it.

Also, what is the file format for .pcx files?
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).

Excuse my newb but what exactly is this a tile editor for.....
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:
 

Godson777

yo waddup
Member
Joined
Mar 27, 2010
Messages
396
Trophies
0
Age
25
Location
idk
XP
420
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.
 

Prof. 9

Well-Known Member
Member
Joined
Jun 17, 2008
Messages
324
Trophies
1
Location
The Netherlands
Website
twitter.com
XP
853
Country
Netherlands
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.
Tried it and it boots up now, but I don't see "Could not initialize fat!". This is what it says:
Debug Menu: Stats
Game: LevelEditor
Last recorded FPS: 61
Number of components: 27
Number of active components: 27
Memory usage: 41252b
Runtime: (time here)
Debug Menu: Console

Initializing...
Initializing game base; Dual3D...
Setting video modes and vram banks...
Initializing sprite/3D engine...
Initializing console...
Loading new texture with id 1
Done initializing game base
Loading new texture with id 2
Loading new texture with id 3
Loading new texture with id 4
Activating menu
Initializing done. Dual3D mode: Yes
However, when I boot it up again click the "Load" button I get a brand-new Guru Meditation Error.

pc: 00000008
addr: 00000008

r0: FFFFFFFF
r1: 00000001
r2: 00000000
r3: 040943D0
r4: 0208613C
r5: 0204A209
r6: 00000000
r7: 0B0027D6

r8: 00000000
r9: 0B0027D6
r10: 00000001
r11: 0206C078
r12: 0000001F
sp: 0B001F90
lr: 023FA6C5
pc: 0000000A

stack:
0B001F90: 0206C078 00000000
0B001F98: 00000000 020856C0
0B001FA0: 00000019 0202C489
0B001FA8: 0B001FD3 00000002
0B001FB0: 00000000 02009789
0B001FB8: 0207F1B0 0207F1C0
0B001FC0: 0207F1C0 02085D28
0B001FC8: 3A746166 61642F2F
0B001FD0: 00006174 00000000
0B001FD8: 00000000 00000000
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.
 

Schmendrick

Well-Known Member
OP
Newcomer
Joined
Sep 12, 2009
Messages
55
Trophies
0
Website
www.dennisvanzwieten.com
XP
166
Country
Netherlands
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.
Is it similar to Prof 9's guru errors? It seems to happen around the same point (opening the file browser).

Tried it and it boots up now, but I don't see "Could not initialize fat!".
However, when I boot it up again click the "Load" button I get a brand-new Guru Meditation Error.
I use several other homebrew apps that access the filesystem.
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:
C:\devkitPro\devkitARM\bin\arm-eabi-addr2line.exe -f -C -s -i -e F:\Dennis\Documents\VisualCProjects\HomebrewGames\LevelEditor\LevelEditor.elf 0x023FA6C5
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!
 

Prof. 9

Well-Known Member
Member
Joined
Jun 17, 2008
Messages
324
Trophies
1
Location
The Netherlands
Website
twitter.com
XP
853
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?
 

Schmendrick

Well-Known Member
OP
Newcomer
Joined
Sep 12, 2009
Messages
55
Trophies
0
Website
www.dennisvanzwieten.com
XP
166
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?
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..
 

Godson777

yo waddup
Member
Joined
Mar 27, 2010
Messages
396
Trophies
0
Age
25
Location
idk
XP
420
Country
United States
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!
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.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    fluff663 @ fluff663: hello everyone