how to set behaviors: IsoCharacter via json
Shri

Gio,

 

I am playing around with the iso plugin.

When I try to setup a player object, using a json file, it seems I am having a problem with the behaviors.

I keep getting "string" is not a function.

I have tried

"behaviors": "IsoCharacter",

"behaviors": "IsoCharacter()"

"behaviors": [ IsoCharacter ] 

and various other permutations, but nothing seems to work.

If I can't set this via json, could you show me the snippet for doing so without json

i.e. (???)

foo = wade.iso.createObject(...)

foo.behaviors[IsoCharacter]

behavFoo = foo.getBehaviors()

 

On another minor note,when I setup an iso character in the game I am createing, it doesn't seem to be allowing the character to return to the original grid it was setup in. That is, the character is created at say 4,4. The character moves on a mouse click to another grid. If I try to click on 4,4 again, the character won't return to that grid. The get objects in cell call returns nothing, but the setDestination(4,4) always returns false ?

 

thanks,

Shri

All 5 Comments
Gio

Hi Shri

 

I think you are right on both accounts - sounds like you found a couple of bugs there :) 

 

It should be possible to do what you are doing for behaviors, i.e.

"behaviors" = "MyFunction"

or 

"behaviors" = ["MyFunction1", "MyFunction2"]

It works if you do it in JavaScript without the quotes, but if you do it in JSON (where you have to use the quotes) wade.iso thinks that those functions are strings and fails. This is easy to fix, I'm on it now :)

 

And it probably doesn't clear the collision information in the cell where you create your character. I don't know why that is, but I'm going to have a closer look at some point today.

 

I'll try to roll out an update as soon as possible (probably tomorrow).

 

It's a first release so it's normal to have a couple of bugs, but we'll fix them all as soon as they appear. Thanks for reporting them!

Gio

OK, these problems have now been fixed. Simply download the iso plugin again from your downloads page (you must be logged in to do that). You should get version 1.0.1 which includes these bug fixes.

Shri

Gio,

 

Thanks for the quick turnaround.

Both issues seem to be fixed. I can now pull all the iso character creation out of the javascript file and just read it via json !

Getting close to completion of the iso game, should be in the next couple of days. I will post it when it is done.

 

cheers,

Shri

hermes

You are really quick with these games! I have only started to play with the isometric plug-in now, it generally takes me about a month to make a game :) 

Shri

Hermes,

 

Thanks for the compliment.

 

I think it would be better to count hours than calendar time.

Since you can work 40 hours in one week, or 40 hours in one month depending on how much time you have.

I also think you have to consider the state of the game on the site.

 

For the RAF game, it took me about 40 hours to figure out the engine, go through the tutorials and then have something worth putting on the site. After that, it took about another 20 hours to get the game to as it is now on the site. To release it commercially would require another 20 hours in my opinion to provide some extra polish/testing.

 

For the Shoal game, it took about 20 hours as most of the code was reused and it was essentially a top down game. I have not taken a second run at that game, but I think it would require another 15 to 20 hours to add stuff that people suggested (levels, scoreing, etc). To release commercially would require an additional 20 hours for polish/testing.

 

The iso game I made took about 40 hours to figure out the engine, go through the tutorials and get it up and running.

It is at the first relase stage (hopefully tomorrow). Depending on how things go, I think it wil require another 40 hours to get to stage 2 and an additional 40 hours for polish/testing.

 

In the future I hope to turn around iso games faster, as I won't have to learn the engine again.

 

Anyway, that is a long winded explaination about how long it took me to make the games. I find the engine really easy to use and if you look at my code there is a lot of reuse.

 

I hope to see something of yours on the site soon.

 

cheers

Post a reply
Add Attachment
Submit Reply
Login to Reply