Teaser: Map editor screenshot
Here's another teaser screenshot with the toolbar partially implemented.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN
Be the devil's own, Lucifer's my name.
- Iron Maiden
Be the devil's own, Lucifer's my name.
- Iron Maiden
Waa. Decided to rewrite the internal coordinate system, broke everything. Heh. (Actually, I just factored the base widget class, which I needed to do pretty badly)
New screenshot showing a new widget, a panel! (another source tarball if anyone's screwing with it)
New screenshot showing a new widget, a panel! (another source tarball if anyone's screwing with it)
- Attachments
-
- acme.tar.gz
- The program.
- (207.76 KiB) Downloaded 191 times
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN
Be the devil's own, Lucifer's my name.
- Iron Maiden
Be the devil's own, Lucifer's my name.
- Iron Maiden
Toolbars are neat. This one doesn't work yet (still have to hook up the event handlers), but here you go.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN
Be the devil's own, Lucifer's my name.
- Iron Maiden
Be the devil's own, Lucifer's my name.
- Iron Maiden
Ok, I am definitely ready to put this thing into cvs. So what's the consensus?
I'm counting one "i don't care", one "why isn't it in cvs yet?", and zero "nos". If y'all decide "no", who wants to join the map editor project when I stick it somewhere (probably sourceforge, since y'all already have accounts there)?
It's now got a toolbar that runs the length of the right-hand part of the window with three tools on it, the tools highlight when you hover over them, and the toggles are right (i.e. if you toggle one while the other is toggled, the one that's already toggled will be turned off). It also shows the armagetronad icon in the window title bar.
I'm happy with the widget API and am ready to turn it loose on programmers-at-large.
To release it for all to use, it still needs a file dialog and an eraser, and a little bit more feedback from the save button (a short animation will suffice). It also needs to be kept updated with changes to the map file format.
I'm counting one "i don't care", one "why isn't it in cvs yet?", and zero "nos". If y'all decide "no", who wants to join the map editor project when I stick it somewhere (probably sourceforge, since y'all already have accounts there)?
It's now got a toolbar that runs the length of the right-hand part of the window with three tools on it, the tools highlight when you hover over them, and the toggles are right (i.e. if you toggle one while the other is toggled, the one that's already toggled will be turned off). It also shows the armagetronad icon in the window title bar.

To release it for all to use, it still needs a file dialog and an eraser, and a little bit more feedback from the save button (a short animation will suffice). It also needs to be kept updated with changes to the map file format.

Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN
Be the devil's own, Lucifer's my name.
- Iron Maiden
Be the devil's own, Lucifer's my name.
- Iron Maiden
How's this? (wondering if the grid lines are too bright now, but the green ones got submerged by the darker background)
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN
Be the devil's own, Lucifer's my name.
- Iron Maiden
Be the devil's own, Lucifer's my name.
- Iron Maiden
Haha, this might be a dumb question, but I'm at a loss. Probably basic algebra and I'll feel dumb with the answer.
Given a point and a list of line segments, how do I determine which, if any, of the line segments contains that point?
Nevermind, I was right twice, it's both a simple algebra problem and a stupid question.
Given a point and a list of line segments, how do I determine which, if any, of the line segments contains that point?
Nevermind, I was right twice, it's both a simple algebra problem and a stupid question.

Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN
Be the devil's own, Lucifer's my name.
- Iron Maiden
Be the devil's own, Lucifer's my name.
- Iron Maiden
- philippeqc
- Long Poster - Project Developer - Sage
- Posts: 1526
- Joined: Mon Jul 12, 2004 8:55 am
- Location: Stockholm
- Contact:
Ownership of a point by a line segments
Determine the shortest distance between said point and the mathematical line of a segment. Find the coordinate on the line that is the closest to the point. If this coordinate is withing the start and end point of the segment AND the distance is smaller than epsilon, then the point should be part of the segment.
There may be better algos out there. This one is a "distance between a line and a point" with home-brewed considerations for segments.
Are you planning to tackle the grid locking behavior that Lyx described?
I really love the icon for the Wall.
-ph
Determine the shortest distance between said point and the mathematical line of a segment. Find the coordinate on the line that is the closest to the point. If this coordinate is withing the start and end point of the segment AND the distance is smaller than epsilon, then the point should be part of the segment.
There may be better algos out there. This one is a "distance between a line and a point" with home-brewed considerations for segments.
Are you planning to tackle the grid locking behavior that Lyx described?
I really love the icon for the Wall.
-ph
Canis meus id comedit.
Sorry Jonathan. Now I'd like to see your post again. 
I used slope, and the selection algorithm is really, um, picky? It also won't pick certain walls on certain maps.
So much for using slope, anyway. I'll probably need the same algorithm to cut a wall whenever someone (me?) makes that feature.
Of course, if I just made every wall two points, things might get simpler, but who wants to do that?
In other news, I've implemented erasing, but selecting isn't quite working well.

I used slope, and the selection algorithm is really, um, picky? It also won't pick certain walls on certain maps.

Of course, if I just made every wall two points, things might get simpler, but who wants to do that?
In other news, I've implemented erasing, but selecting isn't quite working well.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN
Be the devil's own, Lucifer's my name.
- Iron Maiden
Be the devil's own, Lucifer's my name.
- Iron Maiden
Small feature request: add "category" along with author, name and version.
Where to put it? The only criterion I have to offer is that IF it is supposed to become THE official map editor, it definitely belongs into our CVS. Even if it's not and it's just ONE editor, there is no reason not to put in into AA CVS. I think you should only keep it out if you want to prevent some of the other developers from messing with it
Where to put it? The only criterion I have to offer is that IF it is supposed to become THE official map editor, it definitely belongs into our CVS. Even if it's not and it's just ONE editor, there is no reason not to put in into AA CVS. I think you should only keep it out if you want to prevent some of the other developers from messing with it

Not shy here. I'll make another module for it in a few minutes.
Figured out how to select walls. Duh. Just check if you're near a known point on the wall (which will be a corner). It doesn't have to be that hard.
So I can erase walls and spawn points now, and I've added category as you asked, z-man. There is one minor feature I keep forgetting to mention, and one bug I haven't been able to fix yet. Spawn points don't actually point in the right directions, but that's ok because you can't set spawn point directions anyway.
Figured out how to select walls. Duh. Just check if you're near a known point on the wall (which will be a corner). It doesn't have to be that hard.

So I can erase walls and spawn points now, and I've added category as you asked, z-man. There is one minor feature I keep forgetting to mention, and one bug I haven't been able to fix yet. Spawn points don't actually point in the right directions, but that's ok because you can't set spawn point directions anyway.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN
Be the devil's own, Lucifer's my name.
- Iron Maiden
Be the devil's own, Lucifer's my name.
- Iron Maiden
Ok, it's in cvs now, module "acme".
Edit: All the stuff is there for a Windows build. You need py2exe and NSIS to make a windows build, then you need to make sure the path to NSIS is correct in setup.py. If you have all that, then you can run setup.py with a commandline option that I have temporarily forgotten (and with the newest version of py2exe, I might add) and when it's done you'll have a self-installer.
(yeah, I usually do all that stuff either right before release or right after first cvs import, whichever I feel like when I do it)
Edit2: To build in Windows, do something like this:
Requires the newest version of py2exe because only the newest version supports bundling. It runs in Windows, but won't actually execute without a file dialog (because I used the commandline for that). So make a file dialog and people in Windows can run it.
(in case you're wondering, the only windows-specific code needed is in libacme/paths.py, and I ripped that file from mathguy which already ran in windows. That is probably the only file you'll need to modify to make it work in Mac OS X as well)
Edit: All the stuff is there for a Windows build. You need py2exe and NSIS to make a windows build, then you need to make sure the path to NSIS is correct in setup.py. If you have all that, then you can run setup.py with a commandline option that I have temporarily forgotten (and with the newest version of py2exe, I might add) and when it's done you'll have a self-installer.
(yeah, I usually do all that stuff either right before release or right after first cvs import, whichever I feel like when I do it)
Edit2: To build in Windows, do something like this:
Code: Select all
c:\python24\python setup.py py2exe --bundle 2

Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN
Be the devil's own, Lucifer's my name.
- Iron Maiden
Be the devil's own, Lucifer's my name.
- Iron Maiden
contrast looks okay to me now - but that brought me to another idea..... maybe make the grid-background dark-grey and the gridlines bright-grey...... and everything else in non-greyscale-colors. That way, it would be easily visible which of the lines are gridlines, and which are real polygons, spawns, etc.
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6712
- Joined: Thu Dec 18, 2003 7:03 pm