Realtime MiniMap Tutorial

Well at the release of my game The_Ball I offered to write a few tutorials on how some of the stuff was setup in the game. masta_p was the only one that came up with some suggestions so… here it is. :-? Well might have had more suggestions, but sorry to the guys that aren’t on windows. %| I haven’t released the .blend yet cause I’m planning to expand the game out a bit more. When the time comes the .blends will be released when this part of The_Ball iteration has come to an end and he becomes something else.

Well… here’s the
Realtime MiniMap tutorial.

Not sure when I’ll get to the tutorial on “the ball moving relative to the camera”. Lol, I forgot how long it took to write a tutorial. It takes quite a lot of time.

Jason Lin

Good stuff as usual

keep it up!

Great tuts! Thanks a lot!

Hi! There is something wrong with the link…I can’t view your tutorial.

I get a 404 too…

looking forward to seeing this , Thanks for doing this :slight_smile:

yup I get a 500 server Error… also looking forward to seeing this…

Guys, this is a year old thread that Shellfish grave dug. goldentaiji’s site is no longer up.

Sorry ! I too getting “Page cannot be displayed”
hoping to see it

Crap, I was really looking forward to this :frowning:

Heh, 2nd tutorial that got dug up.

:no: Sorry guys, but I no longer have any of my tutorial files since my HD crashed awhile back.
However, antihc3 that hosted my site back then, might still have a backup copy of the my site, before the server went down. So the tutorials, might still be in there someplace. I’ll try to catch him when he’s on sometime, and see if he still has the files.

If not, it was just something simple. Basically the whole thing took advantage of the split screen that Lagan implemented into Blender awhile back. The split screen was modified to take up a small portion of the screen. The active camera for the split screen was a camera positioned in top down position of the whole scene. So any action happening would end up being a realtime top down representation of the main screen.

Jason Lin

If you were to create a second camera, somewhere over the world map and use the following python script, it will work as a realtime minimap. Locates the map to the top right corner of the game screen. It will just cover up some of the exsiting map. But have fun and play with it.

from Rasterizer import *
g= GameLogic
c = g.getCurrentController()
o = c.getOwner()
o.setViewport(getWindowWidth()/1.6, getWindowHeight()/1.6, getWindowWidth(), getWindowHeight())
#Shows Veiwport

Thats sad man! That the tutorial is lost. Thanks Azazel! But how do we use it? What are the logic blocks needed?

Use an Always Sensor connected to the Python script. I can make a simple demo if needed.

For those that are interested, here is a link to the sample blend file.

If you would like the file again Please Request!!!

If it not to much trouble. THANKS!

It works! How do you calculate the location to place the map on and could I change the size of the mini map?

In order to change the size of the map, you need to move the MiniMap camera. Move MiniMap camera further away from the map to make it smaller.
And to change the location on the Map, if you were to change the code to this:

from Rasterizer import *
g = GameLogic
c = g.getCurrentController()
o = c.getOwner()
#gets location
x = getWindowWidth() / 1.6
y = getWindowHeight() / 1.7
#Sets Viewport
o.setViewport(x, y, getWindowWidth(), getWindowHeight())
# Shows Viewport

X and Y determine the location of the ViewPort
If you change the Divsion number to Neg eg: x = getWindowWidth() / -1.6, locates to the opposite side of the screen. Ignore the errors in the command window though.
Hope that helps.

I.C… Thanks Again! :slight_smile:

As for the command window errors, has to do a with depreciating interger value. When I get home from work, I will see if there is another way around it. No prblem at all!!!

THanks MAn!