2 players collision

Minor

Member
hi!
When i play the following stage with 2 players at the same time, my sprites are too big and overlapped each other.
i know it's "normal" for a beat em up, but in this case, it's very uncomfortable.




I saw this topic too as the beginning of an answer but nothing specific http://www.chronocrash.com/forum/index.php?topic=3018.msg41202#msg41202

What's the best way to prevent this overlapping? any script out there? thank you in advance  ;)
 
There is a shunting feature coming soon that will allow you to designate bboxes for hit detection, shunting, or both (and you'll also have access to the already existing multiple bboxes so you can set up different ones for different purposes.). Until that's available though, you can do this already with script, and it's not too difficult. I don't have time at the moment to write it for you, but look at Bloodbane's antiwall. You can adapt it to shunt entities away from each other based on whatever criteria you feel best with. 
 
The sprite overlapping issue i see on the images is caused because of wrong offsets positioning on the sprite. So keep the players on some distance from each other with script, may will still not solve this if you will keep having wrong placed offset on the sprites.
And to be more clear, the Y offset should be on the very bottom of the bicycle tyres and not someware on the midle of the sprite like you probably have it right now.
 
magggas said:
The sprite overlapping issue i see on the images is caused because of wrong offsets positioning on the sprite. So keep the players on some distance from each other with script, may will still not solve this if you will keep having wrong placed offset on the sprites.
And to be more clear, the Y offset should be on the very bottom of the bicycle tyres and not someware on the midle of the sprite like you probably have it right now.

thank you magggas,

maybe is an optical illusion, but here's my offset right now, believe it was good like that, is it wrong?



Damon Caskey said:
There is a shunting feature coming soon that will allow you to designate bboxes for hit detection, shunting, or both (and you'll also have access to the already existing multiple bboxes so you can set up different ones for different purposes.). Until that's available though, you can do this already with script, and it's not too difficult. I don't have time at the moment to write it for you, but look at Bloodbane's antiwall. You can adapt it to shunt entities away from each other based on whatever criteria you feel best with. 

thank you damon,

i'm going to search the bloodbane's antiwall. but if i understand, i must create wall on the entity and put a antiwall script to detect the x,y from the wall?
 
No, you don't create a wall. Just adapting the concept to push entities away from each other using a bit of math work.

DC
 
Minor said:
...maybe is an optical illusion, but here's my offset right now, believe it was good like that, is it wrong?

From this image i can't say for sure. I mean, i now know the offset is 101 but what is the actual sprite size?
 
Hmm.. The offset must be okay then. The last thing i could think to explain your problem is if your caracters are having sone "setlayer" setup. If not, then what we see on your first screenshot this is an engine bug!
I mean, this overlapping should not happen no matter how big the sprites are.
 
magggas said:
Hmm.. The offset must be okay then. The last thing i could think to explain your problem is if your caracters are having sone "setlayer" setup. If not, then what we see on your first screenshot this is an engine bug!
I mean, this overlapping should not happen no matter how big the sprites are.

the 2 characters have the same setlayer (5). thank you for pointing this by the way.

I try for now to understand and find the antiwall script to avoid the 2 players overlapping each other.  :)
 
OH! I totally misunderstood the question... yeah, this has nothing to do with the kind of overlap I am thinking of. You have a layering issue. Please send us your model text files.

DC
 
Before of anything else you should remove the Setlayer command from your characters, because it's not meant for such use and it will cause you more weird overlappings with other entities on the level as well, depending of the players Z position on it.
 
Damon Caskey said:
OH! I totally misunderstood the question... yeah, this has nothing to do with the kind of overlap I am thinking of. You have a layering issue. Please send us your model text files.

DC

i believe you understood perfecly my question DC...but apparently, there is another problem :D
Sorry my english is not very good, maybe there was a misunderstanding.
my real question were:" how to avoid the 2 players passing through each other in this stage?"
(kind of collision box).

Nevermind, here's my models.txt
Code:
spdirection 1 1 
maxfreespecials 99
maxfollows 50
maxattacks 99
maxattacktypes 99
versusdamage 0
nodropen

# List all character models to be loaded.
# Syntax:
# load		[name]		[path]		// Load on startup
# know		[name]		[path]		// Load when needed
# 

# Required objects. These must always be loaded.
load	flash		data/chars/misc/flash.txt
load	hitf		data/chars/misc/hitf.txt
load	hitff		data/chars/misc/hitff.txt
load	obfla		data/chars/misc/obfla.txt
load	ablood		data/chars/misc/ablood.txt
load	soryaf		data/chars/sorya/soryaf.txt
load	godarmy3f	data/chars/godarmy3/godarmy3f.txt
load	colonelf	data/chars/colonel/colonelf.txt
load   flashken           data/sprites/flashken.txt
load   flashtoki           data/sprites/flashtoki.txt
load   flashrei           data/sprites/flashrei.txt
load   flashshu          data/sprites/flashshu.txt
load   flashjuza          data/sprites/flashjuza.txt
load   flashryu        	data/sprites/flashryu.txt
load	hit		data/chars/misc/hit.txt


# Players must also be loaded.

load    mzedf 		data/chars/mzed/mzedf.txt
load	bikejuza	data/chars/juza/bikejuza/bikejuza.txt
load	bikeryuga	data/chars/ryuga/bikeryuga/bikeryuga.txt
load	bikeshu 	data/chars/shu/bikeshu/bikeshu.txt
load	biketoki 	data/chars/toki/biketoki/biketoki.txt
load	bikerei 	data/chars/rei/bikerei/bikerei.txt
load	bikeken 	data/chars/kenshiro/bikeken/bikeken.txt
load	tokiview	data/chars/toki/tokiview/tokiview.txt
load	reiview		data/chars/rei/reiview/reiview.txt
load	juview		data/chars/juza/juview/juview.txt
load	shuview		data/chars/shu/shuview/shuview.txt
load	ryuview		data/chars/ryuga/ryuview/ryuview.txt
load	Kenshiro	data/chars/Kenshiro/Kenshiro.txt
load	sdken		data/chars/kenshiro/sdken/sdken.txt
load	motoken		data/chars/kenshiro/motoken/motoken.txt
load    Kenshirof 	data/chars/Kenshiro/Kenshirof.txt
load	Kenview		data/chars/Kenshiro/kenview/kenview.txt
load	toki		data/chars/toki/toki.txt
load    tokif 		data/chars/toki/tokif.txt
load	sdtoki		data/chars/toki/sdtoki/sdtoki.txt
load	mototoki	data/chars/toki/mototoki/mototoki.txt
load	rei		data/chars/rei/rei.txt
load	sdrei		data/chars/rei/sdrei/sdrei.txt
load	motorei	        data/chars/rei/motorei/motorei.txt
load	shu		data/chars/shu/shu.txt
load	sdshu		data/chars/shu/sdshu/sdshu.txt
load	motoshu		data/chars/shu/motoshu/motoshu.txt
load	juza		data/chars/juza/juza.txt
load	sdju		data/chars/juza/sdju/sdju.txt
load	motojuza	data/chars/juza/motojuza/motojuza.txt
load	ryuga		data/chars/ryuga/ryuga.txt
load    ryugaf 		data/chars/ryuga/ryugaf.txt
load	sdryu		data/chars/ryuga/sdryu/sdryu.txt
load	motoryuga	data/chars/ryuga/motoryuga/motoryuga.txt

# Items and other objects can be loaded when needed.
know	Apple		data/chars/misc/apple.txt
know	p100		data/chars/misc/p100.txt
know	Meat		data/chars/misc/meat.txt
know	1up		data/chars/misc/1up.txt
know	oneup		data/chars/misc/oneup.txt
know	end		data/chars/misc/end.txt
know	Money		data/chars/misc/money.txt
know	Gold		data/chars/misc/gold.txt
know	Time		data/chars/misc/time.txt


# Obstacles (item containers)
know	drum2		data/chars/misc/drum2.txt
know	bzdrum		data/chars/misc/bzdrum.txt
know	crusher 	data/chars/misc/crusher.txt
know	croc		data/chars/misc/croc.txt
know	croc1		data/chars/misc/croc1.txt
know	pic		data/chars/misc/pic.txt
know	pac		data/chars/misc/pac.txt
know	pac1		data/chars/misc/pac1.txt
know	pac2		data/chars/misc/pac2.txt
know	trap		data/chars/misc/trap.txt
know	trap1		data/chars/misc/trap1.txt
know	gtrap		data/chars/misc/gtrap.txt
know	jeep		data/chars/misc/jeep.txt
know	caisse		data/chars/misc/caisse.txt
know	Box		data/chars/misc/box.txt
know	Crate		data/chars/misc/crate.txt
know	Trash		data/chars/misc/trash.txt
know	bar		data/chars/misc/bar.txt
know	Fence		data/chars/misc/fence.txt
know	Drom		data/chars/misc/drom.txt
know	page		data/chars/misc/page.txt
know	page1		data/chars/misc/page1.txt
know	gpage		data/chars/misc/gpage.txt
know	Trolly		data/chars/misc/trolly.txt
know	roll		data/chars/roll/roll.txt


# Enemies

know    letter 		data/chars/misc/letter.txt
know	brion		data/chars/brion/brion.txt
know    ozed 		data/chars/ozed/ozed.txt
know    ozed1 		data/chars/ozed/ozed1.txt
know    mmzed 		data/chars/mmzed/mmzed.txt
know    mzed 		data/chars/mzed/mzed.txt
know    mzedf 		data/chars/mzed/mzedf.txt
know	zeed		data/chars/zeed/zeed.txt
know	heart		data/chars/heart/heart.txt
know    eath 		data/chars/eath/eath.txt
know	bikezed		data/chars/zed/bikezed.txt
know	zed		data/chars/zed/zed.txt
know	zed2		data/chars/zed2/zed2.txt
know	zed3		data/chars/zed3/zed3.txt
know	motozed		data/chars/motozed/motozed.txt
know	motocrad	data/chars/motocrad/motocrad.txt
know	motopic 	data/chars/motopic/motopic.txt
know	motopac 	data/chars/motopac/motopac.txt
know	colonel		data/chars/colonel/colonel.txt
know	shin		data/chars/shin/shin.txt
know	hugo		data/chars/hugo/hugo.txt
know	godarmy		data/chars/godarmy/godarmy.txt
know	godarmy2	data/chars/godarmy2/godarmy2.txt
know	godarmy3	data/chars/godarmy3/godarmy3.txt
know	sorya		data/chars/sorya/sorya.txt
know	duck		data/chars/duck/duck.txt
know	jack		data/chars/jack/jack.txt
know	mot		data/chars/mot/mot.txt
know	mat		data/chars/mat/mat.txt
know	abo		data/chars/abo/abo.txt
know	butcher		data/chars/butcher/butcher.txt
know	bikerduck	data/chars/bikerduck/bikerduck.txt








# Not a real enemy... ;)
know	Ramon		data/chars/ramon/ramon.txt

# Other stuff
know wall0 	 data/chars/misc/plat/wall0.txt
know wall1 	 data/chars/misc/plat/wall1.txt
know wall2	 data/chars/misc/plat/wall2.txt
know wall3	 data/chars/misc/plat/wall3.txt
know wall4	 data/chars/misc/plat/wall4.txt
know wall5	 data/chars/misc/plat/wall5.txt
know wall6	 data/chars/misc/plat/wall6.txt
know wall7	 data/chars/misc/plat/wall7.txt
know plat0 	 data/chars/misc/plat/plat0.txt
know plat1 	 data/chars/misc/plat/plat1.txt
know plat2 	 data/chars/misc/plat/plat2.txt
know plat3 	 data/chars/misc/plat/plat3.txt
know plat4 	 data/chars/misc/plat/plat4.txt
know plat5 	 data/chars/misc/plat/plat5.txt
know plat6 	 data/chars/misc/plat/plat6.txt
know plat10	 data/chars/misc/plat/plat10.txt
know plat11	 data/chars/misc/plat/plat11.txt
know jump 	 data/chars/misc/plat/jump.txt
know plat8 	 data/chars/misc/plat/plat8.txt
know plat9 	 data/chars/misc/plat/plat9.txt
know	nb		data/chars/misc/nb.txt
know road	 data/levels/moto/road/road.txt

know sel1 	 	data/levels/sel/sel1.txt
know	Steamer		data/chars/misc/steamer.txt
know	retrib		data/chars/misc/retrib.txt
know   flashken         data/sprites/flashken.txt
know   flashshu         data/sprites/flashshu.txt
know   flashtoki        data/sprites/flashtoki.txt
know   flashrei         data/sprites/flashrei.txt
know   flashjuza        data/sprites/flashjuza.txt
know   flashryu         data/sprites/flashryu.txt
know	ticon		data/sprites/ticon.txt
know	decide		data/chars/misc/decide.txt
know	spawnshin	data/chars/misc/spawnshin.txt
know	sac		data/chars/misc/sac.txt
know	p00		data/chars/misc/p00.txt
know	p01		data/chars/misc/p01.txt
know	p02		data/chars/misc/p02.txt
know	p03		data/chars/misc/p03.txt
know	helico		data/chars/misc/helico.txt
know	pflag		data/chars/misc/pflag.txt
know	pylon		data/chars/misc/pylon.txt
know	pilone		data/chars/misc/pilone.txt
know	pilone1		data/chars/misc/pilone1.txt
know	Knife		data/chars/misc/knife.txt
know	Shot		data/chars/misc/shot.txt
know	Steam		data/chars/misc/steam.txt
know	pneu		data/chars/misc/pneu.txt
know	corbac		data/chars/misc/corbac.txt
know	corb		data/chars/misc/corb.txt
know	skel		data/chars/misc/skel.txt
know	skel1		data/chars/misc/skel1.txt
know	Furnace		data/chars/misc/furnace.txt

@edit magggas: yes i removed the setlayer, it was a copy paste from another entity.
 
magggas said:
Before of anything else you should remove the Setlayer command from your characters, because it's not meant for such use and it will cause you more weird overlappings with other entities on the level as well, depending of the players Z position on it.

I second that. Don't use setlayer on those characters. They aren't meant to be used that way, only in specific  cases.
 
Back
Top Bottom