![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
Tilemap Editor |
23yrold3yrold
Member #1,134
March 2001
![]() |
Tilemap Editor (105KB source, binary, and makefile) Just to show you I do actual work between posts .... This is an Win32/Allegro tilemap editor I'm making for my game. I plan on adding quite a bit more (main.cpp has a to-do list) but I'm throwing it out now just for kicks. Firstly, while it's not as general purpose as it will be in the future, it's pretty simple, so maybe someone can hack around in the source and make one for their own purposes faster than starting from scratch. I've already brought this post to SSC's attention Secondly, I'm open to further suggestions as to what to do with it. Functionality-wise. Thirdly, it still doesn't draw the border and scroll bars (entirely) in the main window. This is a problem I posted about in the Programming Forum a while ago, but never managed to fix. First person to nail it gets ... um, renown, I suppose ... There's not a whole lot to it. The left mouse button draws, the right has several secondary functions available from a drop-down on the left. You can zoom in on both the map window and the tile window using + and -. It has some cute tricks, like easy importing and exporting of tilesets. Cut, copy, paste, and delete are all in there. Plus a floodfill. Many keyboard shortcuts are to come; clicking around in the menu gets tedious. One cute feature is if you select an area which is longer than it is wide (or vice versa), then try to Insert Rows/Columns. See? It can read your mind if you let it The main to-do's include an undo (naturally), layers, plus stamps (self-explanitory) and something I call clone-stamps. Say you have one of a hill going up, leveling out, and going down again. Like the clone tool found in most image editors, you can clone bits of it where you need them, instead of drawing a repetetive pattern over and over, but without making a zillion stamps for all occasions. Not sure if any other editors do that, but I'm interested in seeing how useful it might be. Plus it needs to make more versatile tilemaps. Right now it uses bitmasks for collision detection, but there should be an option to just make walkable/non-walkable tiles, among other things. Bitmasks would be overkill for a Final Fantasy clone Comment away. -- |
kazzmir
Member #1,786
December 2001
![]() |
why was it written for win32? pure allegro not good enough for you? |
23yrold3yrold
Member #1,134
March 2001
![]() |
No, actually -- |
Bob
Free Market Evangelist
September 2000
![]() |
Segfaults on me, apparently performing an array overrun inside a Win32 call, called from within Allegro, called by a function in your program. Can you supply a debug version, linked with the debug version of Allegro? -- |
MiquelFire
Member #3,110
January 2003
![]() |
When hitting the X to close (File->Exit don't work) it complains about an area not writible --- |
23yrold3yrold
Member #1,134
March 2001
![]() |
Crashes!? Quote: Can you supply a debug version, linked with the debug version of Allegro? I would have no clue how. You have the source, no? Quote: File->Exit don't work Yeah, I hadn't bothered yet since the X works fine. For me, anyway. This is weird; I can understand if I missed some stuff, but it should at least run fine for the most part. No crashes or anything for me ... The bald alien down there said: yep crashes here too... AAARRGGHHHH!!!! Would your OS's (W2K, XP, Win98) matter? Feel free to mention them if there's this many problems ... -- |
Steve Terry
Member #1,989
March 2002
![]() |
yep crashes here too... it just shows the drmingw32 exception window but with no output... just a blank window... ___________________________________ |
Ultio
Member #1,336
April 2001
|
Definitely crashes upon startup. Can't really give you more than that. I'm on an XP box. Also, try to include the dll in that acrhive, or at least at a separate location. It's a pain when I don't have a specific allegro.dll when I'm going to test someone's program --- |
X-G
Member #856
December 2000
![]() |
Yay for segfaults! -- |
Dark
Member #749
November 2000
![]() |
Can't even connect to get it.. EDIT Runs perfectly. Win98Se
__________________________________ |
23yrold3yrold
Member #1,134
March 2001
![]() |
Quote: Runs perfectly. THANK YOU!!! I was beginning to think I forgot a vital file. Even though there aren't any Wh47 sI Wr0n6 Wi7H j00r C0mpU74r5!!!``11~! What about compiling your own versions? That work? -- |
SonShadowCat
Member #1,548
September 2001
![]() |
Works perfectly for me as well. Win2k |
Ultio
Member #1,336
April 2001
|
I haven't tried compiling it myself, as I never usually compile stuff on my own. It seems like people who aren't on XP are having no problems running the code. Maybe it's a XP thing with NTFS file format? Are you doing any specific directory finding stuff? --- |
23yrold3yrold
Member #1,134
March 2001
![]() |
Quote: Are you doing any specific directory finding stuff? The only file it comes with is the tileset, and that's the only one it loads. You can also save/load maps/tilesets, but from the sound of it you guys aren't getting that far Bob requested a debug version for some reason; anyone wanna tell me how to do that? Never bothered with how to do that ... -- |
Thomas Fjellstrom
Member #476
June 2000
![]() |
23 said: Never bothered with how to do that ... Really? w0w. Just how do you debug then? compile the program with the alld (allegro debug) lib, and add -ggdb3 or -gstabs to the compile line of your makefile (where is makes the object files). also make sure not to include -s -- |
23yrold3yrold
Member #1,134
March 2001
![]() |
Okay. Now what's so special about a debug version? Quote: Really? w0w. Just how do you debug then? I find de bug, I fix de bug .... EDIT: g++ -o Main.o -c Main.cpp -gstabs g++ -o TilemapEditor.exe CTilemap.o Main.o rsrc.o -Wall -O2 -s -ffast-math -fom it-frame-pointer -funroll-loops -mwindows -lalld C:\DEV-CPP\BIN\..\lib\gcc-lib\mingw32\2.95.3-6\..\..\..\..\mingw32\bin\ld.exe: cannot find -lalld C:\DEV-CPP\BIN\MAKE.EXE: *** [TilemapEditor.exe] Error 1
-- |
Thomas Fjellstrom
Member #476
June 2000
![]() |
You need to compile the debug lib also in regards to 'i find de bug, I fix de bug....' Its alot easier to find out exactly whats going wrong with a real debugger. like Dr.Mingw or gdb. (though I could never get gdb to work on windows...) Seriousloy, with gdb on linux, it pin points me to the exact line the SIGSEGV (segfault) occured on. Mind you it gets harder when debugging a threaded application but still easier than trying to find out what happened by staring at the code til I find the error... -- |
Ultio
Member #1,336
April 2001
|
Well, when the program crashed, I had the option to debug it, as I have MSVC. However, it turned up for the worse. MSVC totally funked out and stopped responding. This is either one HUGE bug, or something was just clunky with my computer at the time Good luck debugging. --- |
Matthew Leverton
Supreme Loser
January 1999
![]() |
It crashes here on XP for me: UpdateWindow(mainwindow); from within WinMain (right after the classes are registered). I created my own binary using MinGW32. It worked sometimes, sometimes it didn't. |
Flecko
Member #566
August 2000
![]() |
WinXP w/ service pack here and *boom*...crash. Haven't had time to skim the source yet, but I'll try if I get some free time tomorrow. -Flecko ben's drivel |
MiquelFire
Member #3,110
January 2003
![]() |
--- |
23yrold3yrold
Member #1,134
March 2001
![]() |
Apparently Quote: as in DEBUGMODE=1 on the make command when making allegro. So: fix mingw32 make DEBUGMODE=1 make install Like that? Isn't there a third library; profiling or some such? Quote: It crashes here on XP for me: Well that's just queer -- |
MiquelFire
Member #3,110
January 2003
![]() |
Unless I'm building a static version of Allegro, I just use make installall installs all three versions (one of which I don't understand, profiling) --- |
Thomas Fjellstrom
Member #476
June 2000
![]() |
It doesn't crash on my machine... [edit] p.s. Don't mention me being in windows, I neded to get something with shareaza -- |
23yrold3yrold
Member #1,134
March 2001
![]() |
How do they not "fully" load? And if the left mouse button works, the right one should too I was hoping for more in line of the three reasons I had for "throwing it out" -- |
|
1
2
|