Couple Noob Questions
by Austin Reynolds · in Torque Game Builder · 03/22/2009 (11:46 am) · 4 replies
Hey all couple noob questions.
I am 100% not a graphics guy which leads to some frustration every now and then. I have the adventure kit and when I try to edit some of the images collision points it keeps complaining its not convex. Is there a way without redoing the graphic to convert it to convex?
Next thing is I have integrated some networking and for the most part works great. Here is how I am doing it any help/suggestions would be wonderfully.
2 clients connect to the server. When 1 client right clicks on the screen to move their player it sends the coordinates to the server which tells other client where to move the "player" on their screen. Problem is AI is not there so player 1 will right click and he will go around the wall. But on Player 2's screen the player will hit the wall then just stop because of the collision.
How would I go about improving this so it was more exactly what the other player is doing?
I am 100% not a graphics guy which leads to some frustration every now and then. I have the adventure kit and when I try to edit some of the images collision points it keeps complaining its not convex. Is there a way without redoing the graphic to convert it to convex?
Next thing is I have integrated some networking and for the most part works great. Here is how I am doing it any help/suggestions would be wonderfully.
2 clients connect to the server. When 1 client right clicks on the screen to move their player it sends the coordinates to the server which tells other client where to move the "player" on their screen. Problem is AI is not there so player 1 will right click and he will go around the wall. But on Player 2's screen the player will hit the wall then just stop because of the collision.
How would I go about improving this so it was more exactly what the other player is doing?
About the author
#2
I want to create a collision structure like pacman. When I do and click save it says "Polygon is not convex, save convex hull instead?" I don't want to save it as a convex hull because that takes my lines and converts them to the pellet.
03/22/2009 (1:25 pm)
The problem with the pacman is this ->I want to create a collision structure like pacman. When I do and click save it says "Polygon is not convex, save convex hull instead?" I don't want to save it as a convex hull because that takes my lines and converts them to the pellet.
#3
So if you want to make Pac-Man and have his mouth hole not collide make two scene objects, one with a collision polygon that looks like his top half, one that looks like his bottom, then mount them, and you have proper collision.
03/23/2009 (2:37 pm)
Since the collision polygon has to be convex one way I've seen to get around this is to use a few different polygons to create a concave type of effect. Basically make a few scene objects with their own collision polygons and mount them to the object. I've never done this, but I've seen it mentioned on the boards. So if you want to make Pac-Man and have his mouth hole not collide make two scene objects, one with a collision polygon that looks like his top half, one that looks like his bottom, then mount them, and you have proper collision.
#4
03/23/2009 (2:57 pm)
I could have swore I was able to make this type of collision befor without having to have anything special like 3 objects.
Torque Owner Deozaan
Yes. Go into the Collision Polygon editor and click the "Replace Points with Convex Hull" button. It looks vaguely like Pac-Man about to eat a power pellet, with an arrow pointing from Pac-Man to the pellet.
Use the AI you use for the player. For example, if you're using A*:
Client 1: Moves his character (using A* pathfinding to navigate past walls) and informs the server.
Client 2: Is informed about the new location/destination of Client 1 and invokes A* pathfinding function(s) to move Client 1's character around the walls to the destination point.