Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / ascii maps

Author
Message
boonsy
14
Years of Service
User Offline
Joined: 8th Aug 2010
Location:
Posted: 12th Aug 2010 16:17 Edited at: 13th Aug 2010 07:47
hey, i have to make a 2.5d platformer for school and am using the game creators tutorial out of their magazine issue 62. im trying to implement sparkies collision to the cubes that make up the platforms in the ascii map. im having trouble understanding some of the code. if anyone could give me heads up on how to setup collision for the objects that would be great or explain what this line of code means.

curobj= ((y*(map_x+1))+x)+1000

the rest of the code is

boonsy
14
Years of Service
User Offline
Joined: 8th Aug 2010
Location:
Posted: 13th Aug 2010 07:42 Edited at: 14th Aug 2010 05:31
i think 'curobj' is the variable for the cloned object, if i apply SC_setupObject to object 31 once its loaded will the cloned objects have the same collision setup???.

can anyone help?

Attachments

Login to view attachments
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 15th Aug 2010 00:53 Edited at: 15th Aug 2010 23:45
Not at my computah right now. Anyway, curobj is the variable that is used to create the cloned objects in the 'world'. Object 31 is a simple cube that is used like a master object when cloning. The objects that are created using the Curobj variable are setup for Sparky's collision in the code and are all put into group #1. This way, you can check against group #1 with Sparky's for all of your collisions without checking each individual object.

I will plan to run the code tomorrow and see if I can provide more details/info.

EDIT: I ran the code, but a separate function has been written for collision and Sparky's is not being used for that, even though the objects have been setup for Sparky's. Did you want to convert it to use Sparky's instead? It works great for me as is.

So many games to code.......so little time.
boonsy
14
Years of Service
User Offline
Joined: 8th Aug 2010
Location:
Posted: 16th Aug 2010 02:38
i want to use sparkys collision instead of the tutorials collision function. i have tried to use a ray cast and remed out the collision function but my guy just keeps falling.

if you could help me convert it into sparky's that would be great.

cheers
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 17th Aug 2010 00:57
I tried to get Sparky's working with what you had and it was not doing well, so I started over and patched in your map. Also, I noticed the Schlump was not exactly on top of the boxes and adjusting the radius made it go into boxes on the side, so I re-rigged and animated it so it worked okay (the file is attached).



Hope this helps. It was more work than I expected.

So many games to code.......so little time.

Attachments

Login to view attachments
boonsy
14
Years of Service
User Offline
Joined: 8th Aug 2010
Location:
Posted: 18th Aug 2010 07:30
your an absolute legend, if you lived in australia i would buy you a beer. thanks alot for your help.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 18th Aug 2010 17:53
You are welcome.

Good luck on the school project.

So many games to code.......so little time.

Login to post a reply

Server time is: 2024-09-28 20:33:54
Your offset time is: 2024-09-28 20:33:54