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 / SC Collision problems

Author
Message
Mystic Monkey
11
Years of Service
User Offline
Joined: 8th Jun 2012
Location:
Posted: 24th Jul 2012 18:14
I am trying to work on a standard adventure/platform genre game engine that if sucsessful I can use it for future projects. I had intentions to share it on the codebase but despite following the tutorials on DarkBASIC page on the site, I can't set collisions right and hearing about Sparky's Collisions downloaded it. Maybe it's still sharable if possible afterwards.

Problem is I just can't set collisions right, whenever addon or not. First my pointer (object 1) kept phasing through the walls (object 2) and now "Error During Set Scaling: Object (1) Not Setup".

Can someone please help me with this in what I am doing wrong?



It's all copy and paste. The codes I set with ` are for later use such controlling the character with gamepad.

I am new to all this and my education is the tutorials provided on the DarkBASIC and DarkBASIC Pro Product pages.
Mystic Monkey
11
Years of Service
User Offline
Joined: 8th Jun 2012
Location:
Posted: 28th Jul 2012 19:39
I attached a picture of the error if it helps.

Attachments

Login to view attachments
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 29th Jul 2012 02:40
Mystic Monkey,

I think the error your showed was to do with the order in which you are putting sparky's collision commands for pointer object.

Change this:



To this:



Also, have a look at this thread by TheComet.

http://forum.thegamecreators.com/?m=forum_view&t=187644&b=6

It's a platform demo using Sparky's collision.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 29th Jul 2012 16:02
As 29 games said, you have to have the object set up before you can do any other collision commands involving the object. See your code on these two lines?



It fails because you try to update the object before it's setup. Swapping those two lines will fix your problem.

TheComet

Mystic Monkey
11
Years of Service
User Offline
Joined: 8th Jun 2012
Location:
Posted: 5th Aug 2012 02:16
Wow! Sorry I haven't replied in awhile just last time I checked there was no replies and thought my thread was ignored and gave up hope. But it wasn't. thank you for replying 29 and Comet!

I still got TONS to learn on making my first game. Which I hope it be a MLP fan game.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Aug 2012 13:00
Unhelpful Titles

Please do not simply write "Noob Question", "I am a newb", "One Noobie Question", "A question", "Please help", "This isn't working" or anything similar as the title of your post. We have a search facility, and meaningless titles do not help others find answers to their questions. It will also help you to get quicker responses if people have an idea of your thread content.

Mystic Monkey
11
Years of Service
User Offline
Joined: 8th Jun 2012
Location:
Posted: 5th Aug 2012 22:24
Selecting a title was hard, I didn't exactly knew what to write at the time. If I cold go back I'd write "SL Collision problems" or something. Sorry if this has been trouble.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Aug 2012 18:50
Quote: "If I cold go back I'd write "SL Collision problems" or something"


done

Mystic Monkey
11
Years of Service
User Offline
Joined: 8th Jun 2012
Location:
Posted: 7th Aug 2012 19:00
Magic!
Mystic Monkey
11
Years of Service
User Offline
Joined: 8th Jun 2012
Location:
Posted: 11th Aug 2012 23:07
Still having a bit of struggles here and there.
Mystic Monkey
11
Years of Service
User Offline
Joined: 8th Jun 2012
Location:
Posted: 15th Aug 2012 21:37
[quote]
http://forum.thegamecreators.com/?m=forum_view&t=187644&b=6
[quote]
So subroutines are like the details of the game like enironments, props and things like that while the above script is the main code that says where everything goes?
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 16th Aug 2012 09:38
Quote: "So subroutines are like the details of the game like enironments, props and things like that while the above script is the main code that says where everything goes?"


Not really. A subroutine is nothing more than a way to insert code at the label. For example, both of these do the same thing:





It's a way to make your code more structured.

TheComet

Your mod has been erased by a signature, please reduce him [overall] to no larger than 120 kg please.
Mystic Monkey
11
Years of Service
User Offline
Joined: 8th Jun 2012
Location:
Posted: 17th Aug 2012 23:21
So either method of coding is OK and I am not foing anything wrong?
Mystic Monkey
11
Years of Service
User Offline
Joined: 8th Jun 2012
Location:
Posted: 18th Aug 2012 02:05
Quote: "Not really. A subroutine is nothing more than a way to insert code at the label."


So either way is fine?
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 23rd Aug 2012 11:19
Both ways work, yes. The way with subroutines is more structured and allows you to re-use code without much fuss.

TheComet

"if you don't understand recursion than you probably don't understand recursion." ~Jerico2day

Login to post a reply

Server time is: 2024-05-02 03:43:21
Your offset time is: 2024-05-02 03:43:21