Vectron map editor

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
User avatar
hoop
Round Winner
Posts: 201
Joined: Tue Jul 24, 2007 7:45 am
Contact:

Vectron map editor

Post by hoop »

hi
Like 2 weeks ago I've started writing Vectron using gtkmm (gtk binded to c++), cairomm and libxml.
Its main purpose is to edit and save xml AAmaps easily and with a nice/easy-to-use GUI. I'll keep the code flexible to allow the user create and save simple vectorial graphics too.
I've done a lot of work (from my noob point of view) but it's rather far from being complete yet, of course. So I'm here to hear from who would be intersted joining the project to make it a decent program, or even to listen for suggestions etc...

already implemented (draft stage):
- aamap loading
- xml validation with DTD
- display coloured map elements
- mouse middle button or arrows to translate the point of view
- mouse wheel or +/- to zoom in/out
- zoom fit, zoom 100%
- fullscreen
- multi-layer interface (partially)
- menubar and toolbar (still unable to set custom icons :evil:)
- side panel with tool/object properties (only for zones atm)
- bottom bar displaying cursor coords and zoom percentage

planned features:
- drawing wall along fixed axes
- snap to grid (not necessarily ortogonal)
- read coordinates data created with other programs/scripts
- use of guidelines (circles, curves) to be translated to wall segments
- multi-layer interface (e.g. import a picture and draw walls over it)
- undo/redo system
- time simulation (i.e. to preview zones' growth/movement)
- compatibility with future/unofficial zones versions (zones v2, sty, ct)
- ...to be continued

At the moment I'm working on map objects creation, mouse interaction and xml export

The main things I need help with:
- autotools configuration
- classes design
- windows/mac os/... porting

You can download the source from the attachment below (it may be out of date though) or using bazaar (thanks epsy for the input):
https://launchpad.net/vectron/

The map in the screeshot has been made with armabell mapeditor btw ;)
Attachments
vectron-0.1_beta20080914.zip
source available for linux
please read the README
(55.14 KiB) Downloaded 261 times
vectron.png
Last edited by hoop on Sun Sep 14, 2008 6:08 pm, edited 4 times in total.
User avatar
Ratchet
Match Winner
Posts: 779
Joined: Sat Mar 15, 2008 5:55 am

Post by Ratchet »

Nice
Last edited by Ratchet on Sun Oct 31, 2010 5:17 pm, edited 2 times in total.
QUARG
Round Winner
Posts: 223
Joined: Thu Sep 14, 2006 2:38 pm
Location: montreal

Post by QUARG »

A trace feature would be interesting. Say you had a picture of a cycle for example and wanted that shape for a map, you could clcik the trace button and it would make walls over the outlines.

One question though will it be mac compatible? :)

Edit: I just Dl'ed it and was reading the read me file. I was confused about this one command though. I dont think that this combo exits "shit+c". :D
User avatar
hoop
Round Winner
Posts: 201
Joined: Tue Jul 24, 2007 7:45 am
Contact:

Post by hoop »

QUARG wrote:A trace feature would be interesting. Say you had a picture of a cycle for example and wanted that shape for a map, you could clcik the trace button and it would make walls over the outlines.
Tracing images is not that easy to program I guess, though it would be interesting indeed
QUARG wrote:One question though will it be mac compatible? :)
I hope so, afaik the libraries in use are available for mac, probably it will need some adjustment to be compiled
QUARG wrote:Edit: I just Dl'ed it and was reading the read me file. I was confused about this one command though. I dont think that this combo exits "shit+c". :D
what do you mean?
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

hoop wrote:
QUARG wrote:Edit: I just Dl'ed it and was reading the read me file. I was confused about this one command though. I dont think that this combo exits "shit+c". :D
what do you mean?
Do you not mean shift+c? I don't think I can do that combo above. The keyboard is usually very far away at those times...
Image
User avatar
hoop
Round Winner
Posts: 201
Joined: Tue Jul 24, 2007 7:45 am
Contact:

Post by hoop »

hahahahahahaha
I didn't notice the typo :lol:
User avatar
ivantis
Round Winner
Posts: 269
Joined: Mon Mar 03, 2008 2:33 pm
Contact:

Post by ivantis »

rofl i was going to point that out
Image
Image
Image
User avatar
ed
Match Winner
Posts: 613
Joined: Mon Feb 13, 2006 12:34 pm
Location: UK

Post by ed »

A nice start ;)

Loaded up any maps I threw at it ( < zones v2).
One gripe was not being able to span around, ie. If I wanted to move to a different part of the map I would have to zoom out and back in again at my chosen location.
It's easily possible for a fool to zoom in out at the wrong position and lose the map completely. "zoom real" doesn't seem to reposition the map back in the centre of the page.

You mentioned being able to snap to grid, I think this is essential, otherwise it will be hard to create a truly grindable wall.
snap grid size being configurable would be a great help.
How about grids for different axes? ie 6 axes grid, this would be incredibly useful (for 6 axes maps ;) )

I've often wanted to be able to copy and paste a cluster of walls. if I create a star shaped wall for instance, it would be nice to be able to copy this to another position on the grid, save having to recreate it. And move clusters of walls around.

spawnpoints as circles? I'm hoping they will become rotatable arrows?

If it could take the simplicity of armabell and throw in some of the best map making features of Inkscape it will become an excellent tool for creating maps.

I'm happy to help test this project as it progresses :)
User avatar
hoop
Round Winner
Posts: 201
Joined: Tue Jul 24, 2007 7:45 am
Contact:

Post by hoop »

hi ed =)
Thanks, I'd love to see more feedbaks like this
ed wrote:A nice start ;)
Loaded up any maps I threw at it ( < zones v2).
One gripe was not being able to span around, ie. If I wanted to move to a different part of the map I would have to zoom out and back in again at my chosen location.
I'm not sure I understand this point: with 'span' do you mean moving your point of view?
If so, for that you can use the keyb arrows or move the mouse pressing the middle button. The README file explains this and more :) (included the shit+c typo XD)
ed wrote:It's easily possible for a fool to zoom in out at the wrong position and lose the map completely. "zoom real" doesn't seem to reposition the map back in the centre of the page.
That's right: zoom real is meant to let you restore the zoom size at 100%. If you get lost in the white, press shift+c, or click the 4th lens icon, it will display all the elements in the map.
ed wrote:You mentioned being able to snap to grid, I think this is essential, otherwise it will be hard to create a truly grindable wall.
snap grid size being configurable would be a great help.
How about grids for different axes? ie 6 axes grid, this would be incredibly useful (for 6 axes maps ;) )
I've often wanted to be able to copy and paste a cluster of walls. if I create a star shaped wall for instance, it would be nice to be able to copy this to another position on the grid, save having to recreate it. And move clusters of walls around.
spawnpoints as circles? I'm hoping they will become rotatable arrows?
I agree 100%, these are all features I had in mind, just forgot to write everything ;)
I'll replace the spawn circles with arrows as soon as I'll realize how to exactly display their direction: there are two ways to define it in a map, this actually confuses me a bit.
ed wrote:If it could take the simplicity of armabell and throw in some of the best map making features of Inkscape it will become an excellent tool for creating maps.
I'm happy to help test this project as it progresses :)
That's it, you cathced my basic idea: something like (inkskape + svg2aamap) / armabell
Btw it will take longer than I thought, beacause I'm gonna rewrite it all using Qt instead of gtk
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Post by epsy »

hoop wrote:I'm gonna rewrite it all using Qt instead of gtk
:(
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1876
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Post by kyle »

hoop wrote:I'll replace the spawn circles with arrows as soon as I'll realize how to exactly display their direction: there are two ways to define it in a map, this actually confuses me a bit.
:) I was messing with this already it is really easy
add something like that to your program :)

Code: Select all

float xdir = cXml::GetPropFloat( node, "xdir" );
    float ydir = cXml::GetPropFloat( node, "ydir" );
	
	float angle = cXml::GetPropFloat( node, "angle" );
	
	
	
	//we will go by angle unless the following case where xdir and ydir is used
	if ((angle == 0) && ((xdir!=0) || (ydir!=0))){
		
			angle = (atan2(ydir, xdir) *360)/(2 * 3.14159);
		
	}
you will have to correct for arena_axes still but take floor((angle / (360/axes)) +.5)*(360/axes)

yes that is probably sloppy :)
User avatar
hoop
Round Winner
Posts: 201
Joined: Tue Jul 24, 2007 7:45 am
Contact:

Post by hoop »

Nice kyle, thanks for the hint :D
The spawn direction works, and I fixed some issues, perhaps I'm still missing something...
No need to edit anything to install now, just ./configure && make
Also it is now available the kdevelop project :)
https://code.launchpad.net/vectron


edit: Link fixed
Last edited by hoop on Mon Sep 22, 2008 3:03 am, edited 2 times in total.
QUARG
Round Winner
Posts: 223
Joined: Thu Sep 14, 2006 2:38 pm
Location: montreal

Post by QUARG »

Link no worky.
User avatar
Ratchet
Match Winner
Posts: 779
Joined: Sat Mar 15, 2008 5:55 am

Post by Ratchet »

https://code.launchpad.net/~hoop

navigate to it from thar
User avatar
Infa(mous)
Round Winner
Posts: 255
Joined: Thu Aug 14, 2008 11:27 pm

Post by Infa(mous) »

lolz... did development on this just... die?
Post Reply