Page 1 of 1
Mini-map issue
Posted:
Mon Jan 25, 2010 7:22 am
by NUTINC
Hey guys. I'm currently working on a space travel game, and I need a little minimap in the corner to show where a ship is on another part of the screen. It would be much smaller than the main player screen though, and meant more to tell the player how close they are to spaceports. Any ideas? I've been fiddling around with canvas actors, but not getting anything
Re: Mini-map issue
Posted:
Mon Jan 25, 2010 7:53 am
by skydereign
Well how specific does it have to be? Can it be just a radar type screen? Also, how many ships and ports should be displayed on the screen? Canvas would definitely be my first choice. Not sure your level layout, but for showing other ships and places, you can place them on the canvas by getting their xy positions in relation to your main actor, and use that to place the markers on the minimap. The center of the canvas should be your main actor's xy equivalent. Also since it should be much smaller than the real xy coordinates, you would need to reduce those when placing the marks. Again if the levels are just open space this would work, but if you have obstacles you want, then it depends on how you set everything up. I can make a ged example if you give some more information.
Re: Mini-map issue
Posted:
Mon Jan 25, 2010 3:41 pm
by NUTINC
It won't be so much a zooming out of the playing field, but showing a small detailed minimap off to the side. The gameplay itself will be much like galaga or other shooters where the player is generally stationary. The small map that I am needing will be a cutout view of an entirely different area of the game, where there will be a map and a pointer to show the location of the player.
Re: Mini-map issue
Posted:
Wed Jan 27, 2010 3:46 am
by Scorpion50o1
This wouldnt be my first idea or best but could you use collision events? OR
when you use keys like left for ship lets say x=x-5; then on the minimap make a player and make key down event for left x=x-1; maybe that'll work. (Tweak it some)
Re: Mini-map issue
Posted:
Wed Jan 27, 2010 3:54 am
by NUTINC
Here is the .ged you requested, Sky.
Re: Mini-map issue
Posted:
Wed Jan 27, 2010 4:15 am
by Scorpion50o1
nutinc you think my idea for your mini-map would work?
Re: Mini-map issue
Posted:
Wed Jan 27, 2010 6:35 am
by NUTINC
Scorpion50o1 wrote:nutinc you think my idea for your mini-map would work?
After a talk with Sky, I'm gonna attempt your idea Scorpion. I'll work on it and show a demo when its ready (has to have the map travelling system done first before he can show anything)
Re: Mini-map issue
Posted:
Thu Jan 28, 2010 6:01 am
by skydereign
Well, here is what I interpreted what you were asking for. I think this is about right, the code is pretty simple, but the math is kind of weird do to the xy coordinate system of the canvas.
Re: Mini-map issue
Posted:
Fri Jan 29, 2010 2:06 am
by NUTINC
Thanks Scorp and Sky! This is exactly what I was looking for!