« first day (1700 days earlier)      last day (3616 days later) » 

12:01
now there is really slow movement towards target follow
mean main player goes out of the screen
Jon
Jon
goes out of the screen when you move?
mean player is already moving to right side
Jon
Jon
adjust the lerp value -- to something higher
we have to follow it
okay
trying
Jon
Jon
player on right side?
change your offset direction
12:04
I have set value to 0.5
but no change in output
I am mentioning code that i have used
recent code link
please sir check it
Jon
Jon
Check what?
modified script code
in pastebin
found it or not?
Jon
Jon
That is just stupid man
targetInitialPos is vector3.zero
no
because I have not set my player at zero position
at start up
so it definitely got different valye
Jon
Jon
ok, well you know what you are doing then
12:10
so I added it as offset that you have suggested
if I try something else then no change in output
Jon
Jon
put a breakpoint on that line
Vector3 adjustedTarget = camera.WorldToViewportPoint (target.position + targetInitialPos);
and tell me what targetInitialPos is
else part gives you information about ath
that
Jon
Jon
oh ok
your logic is flawed. do it
does it even hit the breakpoint?
sup pip
@Jon ! I DID IT!
i.imgur.com/fSudRr1.gifv
Jon
Jon
yay
wow that looks good
12:15
mean when I found target
@Hjorthenify got the animation working?
Looks nice
and store its position
Pip
Pip
@Jon morning
Jon
Jon
@Siddharth did you put that breakpoint?
that I used as offset purpose
no not at all
Jon
Jon
12:15
well then..
you don't believe me?
Please don't be like... who was it @Tyyppi_77 or @Pip and not be using a proper debugging
@KevinvanderVelden Not quite, but I made the background move forever :P
@Hjorthenify aah
The anim still needs some tweaking
totally believe to your suggestions
I am just trying to that
user92578
12:16
@KevinvanderVelden Could've been me print()ing in Python
Jon
Jon
Do you know how to use breakpoints?
Pip
Pip
lol
@Tyyppi_77 probably
Dunno
Pip
Pip
Breakpoints are nice
No wait, it was C++
user92578
12:16
yup
Debug.BreakPoiint()
right?
Jon
Jon
no
user92578
well I've used those quite a lot now
then what?
user92578
but could still be me :)
user92578
12:17
@Siddharth F9
Jon
Jon
ever see one of these red dots?
it interrupts the flow of your logic
user92578
user92578
interesting setup
yes that I know
Jon
Jon
12:18
ok, so put a breakpoint on that line
run it and connect it to unity
http://pasteboard.co/2eUY3sFy.png
THAT'S how the setup looks... hopefully
user92578
yup, looks cool
Jon
Jon
yeah man
user92578
needs awesome dynamic shadows tough
Oh yes.
12:19
then what?
Jon
Jon
@Hjorthenify what are your plans with this?
what I have to find?
I have to just go for tea
come soon again
@Jon Survival arena games where you scavenge metals from the robots you slaughter to build up a defence
Jon
Jon
i want you to tell me what the var is
12:20
first I implement whatever get from you guys
Jon
Jon
how many ppl working on it?
thanks for help
Jon
Jon
np
Working on mine?
Jon
Jon
yeah
12:21
Just me
Jon
Jon
wanna ditch your battle arena idea, and collab on something else?
Pip
Pip
hahaha
The arena is more so that I can test stuff. I might turn it into a RPG later
Jon
Jon
twin shooter
12:23
Yes?
Jon
Jon
yeah, you can do the art
and i'll write the code
lol
Nah I'm good :P
Jon
Jon
been working on this
Yeah the pathfinding
Jon
Jon
yeah, working on group behaviors now
I have a fun idea for a game, heh
12:25
Yeah
Jon
Jon
I like the idea of HUGE amounts of mobs
Sorta like L4D amounts?
Jon
Jon
yeah
Jon
Jon
or like gauntlet original
12:27
O_o
hello guys, is there any Unity expert here? I posted a question with what in my beginner point of view is a strange behavior
0
Q: GameObject scope over RPC call

Leggy7Debugging my code I faced some unexpected behavior. I called an RPC using uLink.NetworkView on the server passing some parameter including a GameObject tagged as Player. Inside that RPC I make a call to GameObject.FindObjectsWithTag("Player") What I refer to by saying "unexpected" is that that...

Doesn't unity come with built-in pathfinding?
Jon
Jon
Yes.
I think you need unity pro to use the aaron pathfinding asset
Jon
Jon
However, the Pathing tool only works in 3d
Pip
Pip
12:28
mhm
Jon
Jon
unity 5 unlocked it @Leggy7
Aw man
oh!
Pip
Pip
2D is a bitch, I wrote my own
cool
Jon
Jon
12:29
aye.
Pip
Pip
@Hjorthenify you can have the source if you want
Jon
Jon
Mine is way more advanced than pips
It is tilebased?
Jon
Jon
you want the source?
Pip
Pip
Truetrue
@Hjorthenify eyp
12:29
://
Jon
Jon
you can't handle the source
Pip
Pip
lol
Nah I'll just improve the source and you're afraid of it
Pip
Pip
Alright, time to make some path sprites instead of just setting the color of the tiles
Jon
Jon
@Pip make sure to bitmask those
otherwise it will just look weird.
or just use a LineRenderer
Thick on one end, and 1 pixel on the other, make it look like an arrow
demonstrate direction
Pip
Pip
12:32
Yeah, definitely doing some bitmasking. That's what's been intended since the beginning :D
Jon
Jon
bitmask it man
lol, just trying to annoy you with the bitmask stuff
How would bitmask help here?
Pip
Pip
Actually intending to do it XD
Jon
Jon
a couple got snagged
still manage to get out of it though
Pip
Pip
@Jon Yes Jon :P
Jon
Jon
12:42
it is fun to play around with, heh
Pip
Pip
I need to find some way to do mountains.... the cellular automata thing I did will work fine for resources but I want mountain chains instead of.... mountain blobs :P
Was thinking about bilinear interpolation, and just setting each tile's height based on some random nodes, then ones that exceed the limit would be mountains
Jon
Jon
create a heightmap
Pip
Pip
Something like this
Jon
Jon
that could work
Pip
Pip
Yeah, I want to see how it turns out before I scrap it
12:47
I have no idea what I wanna do next.. Weapons, AI, objects, what do you think I should do?
Jon
Jon
AI
you are gonna need a pathfinder if you plan on doing ai
Jon
Jon
might as well get Pip's
Yeah I thiink I'll do pathfinding
Well problem is that my map isn't grid based
And I need to take deployable walls and stuff into account
Jon
Jon
welp, that is where my pathfinder comes in handy
i can help you make it if you want
12:51
That'd be great :D
Jon
Jon
It is an incredibly simple concept
Jon
Jon
1. Define an area for your map.
2. Raycast down, at predefined intervals, in a grid like fashion.
3. Create a game map based on the collisions.
Then, I found out that , some of the connections could be bad if the walls were thin enough.. so
4. Raycast between connection points, removing bad ones.
Then you can run the game map into a a* pathfinder
:o
So that's what those points are in your game?
Jon
Jon
the points are for debugging, but yeah
notice they are either green or red
Then the red lines show that the connection was removed
you do this calc when you load the level
It is really fast from my testing
12:55
So just test it once?
Jon
Jon
as long as your world is not huge
yeah, run pre-calcs..
I have a seperate collision system for dynamic entities
For the points to remove?
Jon
Jon
that map is just for pathfinding in the world.
Yeah.. for the points to be marked as a collision
so your pathfinder doesn't try to make you walk through a wall
Jon
Jon
I guess it is pretty advanced
but the concept is pretty simple
12:58
Its smart.
Yeah you said that you calculate the red lines when you load the level, right?
Jon
Jon
Yep, it has its limits though -- wouldn't work well if you had to constantly update the level data
yeah
but what's the interval for then?
Jon
Jon
If you had to open, close a door, you could alter that data manually for example.
instead of re-raycasting
the interval?
1. Define an area for your map.
2. Raycast down, at predefined intervals, in a grid like fashion.
oh
Jon
Jon
oh, the distance between nodes
13:00
Thats a distance interva
Not a time xD
Jon
Jon
in my case I do x+=1 y+=1
so that my x,y coords work well with a map
well.. I do y-=1 and invert it actually
Jon
Jon
public void Initialize(float x, float y, Vector2 position)
{
    X = (int)x;
    Y = (int)y;

    Position = position;

    RaycastHit2D hit = Physics2D.Raycast(position, new Vector2(0, 0));
    if (hit.collider != null && hit.collider.tag == "Wall")
        Collidable = true;
}
How do you store the grid?
Jon
Jon
public Dot[,] Dots;
13:02
Like where's the script stored and how do you access the data?
Jon
Jon
I called them dots.
shuld of called them Nodes
I'll code them nodes
Jon
Jon
oh, the Grid is generated with an empty gameobject, called Grid with a Grid script attached
So if I added an object to the grid, then I would just have to figure out which dots that are at its location, right?
And you access it how? I don't know how to call functions from other scripts, yet.
Jon
Jon
Eventually, that gameobject will be removed, and the Grid will be called from some Game manager
The grid doesn't need to be extended from MonoBehavior
13:04
Right
But still.. How do I access stuff from the script?
Jon
Jon
You can access it just like you would usually
I'm new to unity :P
Jon
Jon
Lets say you have a gameobject, and you want to access the script
go.Getcomponent<ScriptName>()
So just gameObject.Dots
Jon
Jon
this will return the object reference to that script component
13:05
Ahh
Jon
Jon
but for your grid though, you could just have a Grid grid; object in some other script component
and just use it from there as well
In my case right now, i have a Grid script component on a gameobject
and it loads up a Dot[,] array which is the game map
each dot does a raycast -- then checks its 8 neighboring connections
When you get to your Pathfinder -- you check your 8 neighbors, but opt out of the ones that were flagged as being removed
Jon
Jon
super easy
lol
So each dots just raycasts its 8 neighbours?
Jon
Jon
raycasts down to see if it is on a wall
pass 1
check neighbors, if red or green
pass2
you need to do it in two stages
13:10
I see
Jon
Jon
if a neighbor is RED, then you can't travel to it
But wouldn't a raycast to one of its neighbours tell if its in a wall?
Jon
Jon
yes
you need to raycast in the 8 directions
or 4 if you don't want diagonals
... so what's the point of casting down first?
Joe
Joe
@Jon the company is called mediocre industries ... i cant imagine they worry much about how performant their javascript is :D
Jon
Jon
13:12
if your walls are super tiny and manage to fit between the 8 raycasts, then you reached a limitation of this design
hmmm
I see..
Jon
Jon
i have to thinmk about it, but you might be right
might not have to cast down
:D
I knew I could help...
Jon
Jon
because I originally cast down and figured it was going to be ok
and added the connections thing later
the connections thing should be all that I need
I'm not sure if I even need to take size into account
Because my walls is going to be about the same size as the units
13:14
Today is going to be a fabulous day!!!! .................. April Fools! -_-
Joe
Joe
so Spartan your coming to the Unity Roadshow in Philly tommorow right?
My boss called me and told me I was fired...
That bitch
Joe
Joe
^ LOL, you got owned
also sue the hell out of that company, thats nothing to joke about
Maybe in America :P
But Im great friends with my boss so I knew he was joking :P
Joe
Joe
yea your right... my american brain went right to lawsuit
Pip
Pip
13:16
lol
Haha yeah.. He actually wanted me to come to work today because they had some UPS's which needed to be moved, but hell no.
Jon
Jon
@Hjorthenify yep you are right, the original raycast is not needed
however
Jon
Jon
it greatly improves the pathing
because a connection doesn't define the node
so you can't assume a node is valid
but it could be
Uhmm. what?
Jon
Jon
13:18
anyways, it shrank the available moves
oh wait n/m
it has no effect
no it does, i didn't save my change
lol
...
So it does have a purpose?
Jon
Jon
I'm gonna have to revise my code
it does
but it probably shouldn't
Jon
Jon
I can't explain why the behavior changes when I remove that raycast
:\
It shouldn't
user92578
13:28
Yay almost got everything back
Jon
Jon
yeah I know ,trust me this is annoying me
user92578
still need to make wall particles bounce back a little
Jon
Jon
it works fine
its just that it takes weird routes sometimes
it will randomly go up when it should remain down
but if I add that raycast down, it doesn't do that
Erhmm.. What? xD
What do you raycast down to btw?
Just a random distance?
user92578
I have not cast a single ray in my whole life
13:36
@Tyyppi_77 aaah =[
You should write a raytracer, those are fun to make
@Jon Would it be possible to make your setup account for width?
Jon
Jon
width of what?
Well size of the object following the path
Jon
Jon
oh
no
you would have to adjust the sample size
ie. the distance between nodes
as long as the distance between nodes is smaller than your object, you should be ok
errr.. larger
But what if the wall is halfway between the two nodes?
Jon
Jon
13:49
Mine is set to the same size as my circle radius
Jon
Jon
if it is the same size it seems to just work
Hmm
but
your walls are drwn between the nodes, right?
Jon
Jon
walls are drawn first
walls are positioned anywhere.. then the nodes drop down and create a map based on where the walls are
you need to tweak it for sure
works for me
Yeah..
Jon
Jon
13:54
ah.. so I found a bug
Jon
Jon
this path says it is valid when the raycast down is turned off..
not sure why as it is red
but i'm on the right track now
Jon
Jon
found it.
was a directional error
vertical axis was reversed.
ahhhh
much better -- now that raycast is not required for sure :D
Yay!
Is there a GetObjectInRange(int range, int filter) function i nUnity?

« first day (1700 days earlier)      last day (3616 days later) »