Help with moving sprites

Ask any questions that come up while using the PC or Android IceBlink 2 Engine

Re: Help with moving sprites

Postby youngneil1 » Wed May 17, 2017 3:13 pm

Very short video of the props in action:


Awesome!!! That looks so charming in action, wonderfully done :) . I like the guard keeping order, good man ;) . The sprites and tiles have a vibrancy and I dont know, maybe "completeness", to them that's really striking.

My guard now has a convo that triggers when he is on the same square as the PC. It only triggered when the guard moved onto the same square as the PC (ie not when the PC moved into the same square as the guard), so I've turned Collision to False and now it is working great. I thought turning collision off might mean that he starts walking through walls again, but he's respecting them fine.


Yes, as rule it's recommended to set collision to false for movers. They will still respect the terrain (walkable state, height) and also they will avoid landing on the same square during their moves (which can look funny if you have many in narrow space: you will see them rushing with increaesd speed, overtaking each other so that no choke points are created).

Happy with this, I've added in a couple of bar patrons, a thief, a barmaid, and a couple of general wandering characters. Its fun watching them explore the map, going in and out of the shops etc. I haven't got to testing it yet, but I have a feeling this might cause a problem when I start "locking" doors to specific properties. I guess the solution would be to put characters in the vicinity of a locked door onto a more fixed movement path (ie a patrol rather than random movement).


Locked doors will likely work only for all movers or none at all (ie walkable or not), at least as of now. Patrol mode allows fine control indeed. The pathing is dynamic (calculated anew each turn, navigating between known waypoints of the patrol route, filling the distance between known waypoints by AI decisions for shortest route). So, if on route from point A to point B an obstacle appears (like a square switched from walkable to non-walkable) they will try to walk around the obstacle. If the obstacle is another mover they will increase speed and move through the other mover, landing on the next square in their path (behind the other mover). The code tries to prevent two movers from sharing the same square ever (it would be hard to decipher for the player if several movers stack on top of each other).

This sounds great - does it only work for patrolling props? I had a look through the options and I wasn't sure how to get the floaty one liners working on moving props, could you give a short explanation please when you get a minute - no rush!


It definetly works for world time driven movers (these can traverse across several areas btw) and patrol movers. Let me look up an expalnation for thsoe and also double chkec on the random movers...

Edit: Ah here is some good info for the one liners ("bark strings"). Hmm, I think tehse will not work for random movers as these have no waypoints. Woudl eb col to ahve a generic pool for them still, tough. Plus,. I think Jer had random movers in Unwanted Guests with one liners...must look up again [WIP]

Patrol: The first mover type that makes use of the waypoints ("wayPointList") of a prop. A patrol mover starts at the first in list waypoint (index 0 in the waypoint list) and from there on moves from waypoint to waypoint in order of the waypoint list. After having reached the end of the list, the patrol mover starts with first waypoint again. A never ending circle.
The waypoints themselves are found in prop properties window, too. You can add and delete them from the props waypointlist. Each waypoint has an x and y location. When you move your mouse pointer over the area in the toolset's area main window you can see the location of each square as x,y coordinates. This way you can easily plan your props patrol route. Additionally waypoints have departureTime and areaName properties - both are only relevant for time driven props (daily, weekly, monthly, yearly), so you can ignore them patrol movers.
Furthermore, waypoints allow to set barkstrings for them (BarkStringsAtWayPoint, BarkStringsOnTheWayToNextWaypoints), short floating texts that will appear with a chance of 10% (checked for every barkstring entry, but a max. of one barkstring is shown per turn) above the prop on the main area map itself. An author can set two different lists of barkstrings for each waypoint, one at the waypoint itself (BarkStringsAtWayPoint) and one for travelling to the next waypoint (BarkStringsOnTheWayToNextWaypoints). Then, there's also a wait duration property: it makes props of mover type "patrol" wait for x rounds on the waypoint before moving on.


edit2: Ah, yes. Jer made a waypoint for the random mover at x0,y0 and added entries for one liners to "barkStringsOnTheWayTo NextWaypoint" list. Looks like the only existing waypoint is always considered as "next waypoint" and so even random movers use these one liner/barkstring entries. This way you can have the guard yell some reminders for keeping up law & order form time to time :mrgreen: .

Please note that the "schedules" feature has still to be fleshed out. In the end this will allow different waypoint lists for the very same mover (with differnt bark strings). So, there might be a morning patrol route and an evening patrol route for the same guard, saying good mornign or good evening when appropriate. Lots of possibilities, we just need more time :lol: .
User avatar
youngneil1
Backer
Backer
 
Posts: 4006
Joined: Sat Dec 08, 2012 7:51 am

Re: Help with moving sprites

Postby youngneil1 » Wed May 17, 2017 3:42 pm

Finished above answer :) .
User avatar
youngneil1
Backer
Backer
 
Posts: 4006
Joined: Sat Dec 08, 2012 7:51 am

Re: Help with moving sprites

Postby Pongo » Wed May 17, 2017 4:30 pm

Awesome, thank you!
I'll play around with this later and give some of the props lines as they walk around. "Your move, creep", "I am the law!" etc :). I might have a go at a town crier or something, that could be an interesting way for the heroes to hear about their own exploits...
User avatar
Pongo
Backer
Backer
 
Posts: 566
Joined: Tue Nov 27, 2012 4:58 pm

Re: Help with moving sprites

Postby youngneil1 » Thu May 18, 2017 7:51 am

Hehe, he's gonna be my favourite guard ever. The older I get, the more I appreciate the strong hand of the law (and the occassional doughnut :lol: ). Nothing beats medieval robocop :o :mrgreen: .

We gonna have look into the schedules (alternative waypoint lists, including their own barkstrings, for the same mover) and manipulating them via script, based on quest progress. This would be the easiest to keep the town crier uptodate with the party's last heroic deeds (and spectacular failures ;) ).
User avatar
youngneil1
Backer
Backer
 
Posts: 4006
Joined: Sat Dec 08, 2012 7:51 am

Re: Help with moving sprites

Postby Pongo » Thu May 18, 2017 8:22 am

Great, that was a very clear explanation - thanks! I've changed his movement pattern to "patrol", and my guard now wanders around the square muttering "watch out for thieves, citizen" and "don't go causing trouble and we'll get on just fine". :)

Edit: and now another one giving useful directions as to where to go first.

And animated water tiles for the docks area. :) so many new, fun options.
User avatar
Pongo
Backer
Backer
 
Posts: 566
Joined: Tue Nov 27, 2012 4:58 pm

Re: Help with moving sprites

Postby Pongo » Tue May 23, 2017 10:32 am

A low priority suggestion.
I've noticed that quite often a prop's text triggers twice in quick succession, leading to the text appearing doubled and overlaid. It happens to one of the guards in the video I uploaded earlier, for example. Weirdly, even when set at a 5% chance of the text appearing this double trigger thing seems to happen quite often (ie, you won't get the text for ages, but when it appears it appears twice or more).
It's not a big issue, but perhaps it could be set up so that once an overhead text has triggered there is a slight time gap (eg 5 seconds or so) before it can re-trigger?
User avatar
Pongo
Backer
Backer
 
Posts: 566
Joined: Tue Nov 27, 2012 4:58 pm

Re: Help with moving sprites

Postby youngneil1 » Tue May 23, 2017 11:05 am

That's an excellent idea - I think back in the day when the IB mover system was wholly done via scripting there was such an enforced block between two bark strings. I will look into it :) .
User avatar
youngneil1
Backer
Backer
 
Posts: 4006
Joined: Sat Dec 08, 2012 7:51 am

Previous

Return to Questions and Answers

Who is online

Users browsing this forum: No registered users and 1 guest

cron