Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Collision Question? (http://www.alice.org/community/showthread.php?t=4416)

 Watsamax1 05-13-2010 06:44 PM

Collision Question?

First off I know how to make a collision method. But Im making a medieval RPG style game and I'm using old-western terrains I have two of them. I'd like to add collision to them but not have a million squares,cones,boxes or whatever. My game is already like 75mb so the easiest efficentes way should be good.

 Watsamax1 05-15-2010 12:58 PM

C'mon 43 view no post :(.

 Watsamax1 05-15-2010 12:59 PM

Also for forest is there a collision way but still able to enter the forest.

 Dameria 05-15-2010 01:03 PM

I would really have to see your program in order to determine the best collision for you. Forest? Well you could put a square in the trunk of every tree near where eye-level is of the person walking. Then you can put them in a group and just say "If(person is within 'x' meters of item_from_treetrunks), person move backwards 0.5 meters" or something like that. Thats the best way I can think of for being able to go through the forest but not through the trees.

 Watsamax1 05-15-2010 04:36 PM

Would that make m game lag its like 82 mb already. But ill try it.

 Watsamax1 05-15-2010 05:18 PM

I got a idea for the western. I use forest and plant them outside the terrain. i make collision on them. Also the box idea i think id save space just using the trees.

 Dameria 05-15-2010 05:26 PM

Just using the trees would save space, but only do that if the root of each individual tree is near eye level, because the further up or down it is, the harder it will be to make an accurate collision detection. Also, cubes are only about 3 kb, so it would barely take up any space, thats why I use cubes all the time in my programs for placeholders (I hate using dummies because you can't move them manually by dragging).

 Watsamax1 05-15-2010 05:30 PM

I just whish there was a group if near group move away.

 Dameria 05-15-2010 05:51 PM

Well, someone would have to create that. You just want the Alice team to do most of the work for you by creating methods for you to use. They have already created most of the methods for you, like moving and turning, its up to you to figure out how to do the rest. Plus, collision really isn't too difficult. Just put them into a group yourself and create a method to push the person away.

 Watsamax1 05-15-2010 08:00 PM

Its not hard but its just when you get 50 something forest with 28 trees to each forest. And well now i have to redo my world i lost like 2-4 hours.

All times are GMT -5. The time now is 09:16 PM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.