The Daily Click ::. Projects ::. Paper Kart
 

Project: Paper Kart
Project Started: 29th September, 2010 Last Update: 8th October, 2010
Project Owner: Strife Project Members:
Project Type: Racing Project Progress:

Rough Bumps in the Road
Posted 8th Oct 10, by Strife  
Up until now, only the player's kart has existed, so I've been trying to place multiple karts on the track. Of course, due to the way MMF2 handles multiple instances of the same object, I've been forced to make each kart have a unique set of objects for the time being. (i.e. Racer 1, Racer 1 sprite, Racer 1 movement controller, Racer 2, Racer 2 sprite, Racer 2 movement controller, etc).

If possible, I'd really like to move away from this system since I'd have to create many duplicates of the code (Qualifiers present me with the same issues I had with a single Kart object). But even with fastlooping tricks, the karts don't want to behave independently from one another. <_< And for some reason, the Layer object isn't sorting the 3D sprites like it should.

Basically, this is the system I'm aiming for: I'd want a single object containing all of the racer sprites, along with a single Kart object that can be used for every racer on the track and a single Clickteam Movement Controller to handle the vector movement of every single kart. Afterwards, I'd want the game to be able to detect which of those Kart objects is controlled by which player (including CPU opponents) and have them read control input from the corresponding player or AI.

It's quite a tall order... but I'm wondering if there's any tricks I can use or third-party extensions that would help make this less of a headscratcher.

Posted by Sumo148 8th October, 2010

spread values aren't working?
 
Posted by Jon Lambert 8th October, 2010

He said spread values won't work because they are all the same object, and so you can't properly do collision between two of the same object.

A workaround I would use requires one of those fastlooping tricks and also turns all kart collision boxes into uniform squares (squares that don't rotate) if you don't use sin and cos. You would simply run a fastloop that records the X Left, X Right, Y Top, and Y Bottom positions of each object in a list with the individual kart's spread value, then use another loop to run through the list calculating the area overlapped by each kart and from there determine which karts are in the same area.

Or something.
 
Posted by OMC 8th October, 2010

There is a simpler way to separate collisions between two of the same object.

Unfortunately, I forget what it was.
 
Posted by Strife 8th October, 2010

That's certainly something to try, Jon. ^^ I'm not certain how much success I'll have, though.


Also, it's not just collisions between two of the same object that I'm having trouble with. The Clickteam Movement Controller is also having issues unless I create a unique CMC object for each kart. I think the issue arises because the CMC object needs to set itself to work with a particular kind of object, so I'd need to fastloop an entire group of kart-related events or something, which would lead to fastloops within fastloops and... well, yeah, I'm really scratching my head over this.
Comment edited by Strife on 10/8/2010
 
Posted by OMC 12th December, 2011

I STILL WANT THIS GAME.
 
Posted by OMC 29th June, 2012

I STILL STILL WANT THIS GAME.
 


 



Project Forums


Favourite

Advertisement

Worth A Click