Creating Mini Map of Isometric game world
Shri

Gio,

 

I was going to take a shot at another gui element.

A mini map for an isometric game.

This kind of thing could double as a range finder, target finder, map, etc.

So, it seems like it would have a general enough use.

Anyway, I was looking through the wade docs and don't have a good idea of where to start.

 

Init a second iso engine but draw to a different layer ?

Write code  that duplicates all the iso drawing stuff but draw to a different layer ?

Do some sort of screen capture and then shrink the image down ?

 

If you could point me in a direction, I would appreciate it.

 

thanks for any help,

Shri

Comments 16 to 30 (30 total)
Shri

Elliot,

 

Thanks for pitching in again.

All great ideas and it looks good.

However, I tried the code with the line "forceUpdate": "true", and the demo got really "laggy" and unresponsive.

Did you notice that ? or is it just my machine ?

It seems like it has something to do with that flag, because when I remove forceUpdate, everything works fine.

Looking at the code, I can't understand why that is ?

Maybe you don't even need that option and instead make the game programmer call the generate map function if they want to force a reload ?

 

I was also curious as to how much time / memory you save by not refreshing the map on every update versus only on moving.

It seems like only updating when necessary as you have done it is more efficient, but I wanted to know the details if there are any.

Maybe that is more a question for Gio.

 

Anyway, I still like the changes.

 

cheers

hermes
Elliot, that's precisely what I meant.

I'm sorry I couldn't contribute, I did try but it probably was just too difficult for me:)

Ideally, by choosing an appropriate radius, you could now generate the whole map once and just move it around. It would be quick, and suitable for mobile applications. Thanks for doing this, guys!
Gio
Well done both of you!

Do you mind if I clean it up a bit and add it to the market?

I'd like to mention it in the newsletter that goes out when we release WADE 1.2.

Shri: from what I understand, running it with forceUpdate does pretty much the same thing that it used to do (i.e. it renders the whole thing every time). But in the current demo, the map is large and the radius is even larger, so doing that every frame is slow.

I believe it can be optimized a bit too, I'll see what I can do. Would you be able to create a pdf like you've done for the other behaviors?

Thanks!
Shri

Gio,

 

Feel free to add it to the market.

The graphics are from this site http://www.reinerstilesets.de/

And he says that they are freely reusable, but I still give him attribution when I use them.

If you use your own graphics then you don't have to worry about that.

 

I have attached the zip file of the code that I had cleaned up and was about to release when Elliot posted his changes (doh !).

I haven't integrated all of Elliot's changes because I was waiting to see what was up with the force update.

I still think it would be better to have this as a call exposed through the api rather than through the configuation.

The code is cleaned up and should be pretty easy to integrate with Elliot's changes.

I have also attached the pdf file I was going to post. It does NOT have Elliot's changes, so you will have to modify some sections based on his changes.

 

cheers

OkieDokie

It is great that you do this. It works perfect even in not isometric game!

 

I am still learning wade, when I have learned something I contribute too.

 

Thanks

Gio

Could both of you (Shri and Elliot) please confirm that you're happy with the minimap behavior being released under the MIT license?

 

If so, it'll be available in the Market on Thursday, when we release WADE 1.2, and it will be mentioned in our newsletter.

 

If you don't mind, I'm changing the demo a bit, to use Clockwork Chilli's assets and simplify the code.

 

Thanks

Shri

Gio,

 

The MIT license is ok with me.

I figured you would 'Chilify' the demo and the documentation, so that is also ok.

 

As an aside, will the code in the marketplace be minified or obfuscated ?

If so, I would like to get a final version of the source so I can see your optimizations to improve my own coding.

 

If you want to pursue future efforts like this, you may want to explore adding a separate area to the web site ?

Or maybe setup something on github ?

 

thanks, it has been a pleasure working on this with you

Shri

Gio

The code won't be minified, I think it's better to leave it as it is in case people want to change things. In general, if something is opensource (MIT, GPL or otherwise), I think it's always better not to minify or obfuscate it.

 

I haven't really changed much in the minimap behavior itself, I mainly changed the test demo to make it a bit simpler - I like the word Chillify, I'll start using it now :) This also gave me an opportunity to review the iso plugin and make a couple of minor changes to it.

 

There is indeed a plan to add a new area to the website - this is the same thing I mentioned a couple of times in other threads, referring to it as a new way of sharing games on this site. It can be used to share other types of projects, such as this one too. I am not working on it myself, but the guy who's doing it says it should be ready in a couple of weeks time.

 

Having said that, it's still worth adding a "WADE Behaviors" category to the Market, which is what we'll do from Thursday. The main difference is that there will be some sort of "quality control" from Clockwork Chilli for the stuff that ends up in the Market, whereas things that you share with the other method are completely unmoderated.

Elliot

Hi Gio

 

Yes, the MIT license is OK with me. I hope it helps some other wade users.

 

I'll try to think of some more UI behaviors to make

Gio

In fact the official release with the newsletter and all that will probably be tomorrow (fixing some bugs took a bit longer than anticipated), but in the meantime here's the final version of the MiniMap and demo.

Shri

Gio,

 

Downloaded it and took a look. Very cool.

I looked around for a key to see if I could open the door and watch the hero get eaten, but no luck.

It looks like there are some new tricks in the engin/plug-in for setting up scene objects via json.

 

I pulled down all my previous versions of the minimap.zip so people would only download the final version.

 

Anyway, looks good,

Shri

Gio

Ah yes, a key would have been cool! But I had to keep it simple and quick :) But I thought the door would be an entrance to a dungeon or something, with the monster being above it - I just wish I had the time!
 

I removed the previous zip and replaced it with this one which contains a small fix. 

 

Once again, thanks very much for sharing the minimap code

 

EDIT: Updated again (with the final version of wade 1.2). To try it go here.

hermes
Very cool, a big thank you to all those involved!
Taddeus
I was away for log time, too busy. But minimap looks very good and i will find time now to help you with these gui stuff which you do. Even if i canot code very good like you :D i looked the code and looks very nice and easy to understand.
zekedevs14
food = Hash.new 
food["doughnut1"] = "chocolate"
$stdout.puts food["doughnut1"]

 

Post a reply
Add Attachment
Submit Reply
Login to Reply