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.

Dark GDK / sparky fed up//serious problem

Author
Message
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 9th Jul 2009 01:47
i've been tryna to make even the absolute most basic collision, i have looked at the sliding demo and all that, i've tried to put it in my program but the way it's layed out is different from that demo, i tried changing the format of my work but still no joy. can any1 PLEASE help me make the most basic collision, if not sparky's i would even settle for the default/built in collision. here is how my code is layed out.
the sliding demo is layed out differently and i have a tough time converting mine to that and implememnting the collision. PLEASE any help is good help
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 9th Jul 2009 03:59
What youve described is the layout of an average GDK program.

The sliding demo uses some functions, which are prototyped at the top of the program and defined and the bottom, the functions are called from within the actual program, inside the "void DarkGDK()" block...(which is the main program block)..

The While loop, is a part of the main program block, and is generally referred to as "the game loop" or "the main loop", basically that loop is where your program sits while its running, it will loop through that while loop over and over once it gets there.

A program executes its main code block in a top to bottom order, although functions that are defined and prototyped can be called from anywhere inside the main block.

C++ itself though is a powerful programing language and being able to structure a basic program is something that you would need to know to have much success in GDK. If you are a flat beginner to programming, perhaps starting on DarkBasic might be a better idea.

If it ain't broke.... DONT FIX IT !!!
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 9th Jul 2009 11:26
It's impossible to know what the problem is if you don't post your code.
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 13th Jul 2009 23:58
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 14th Jul 2009 02:08 Edited at: 14th Jul 2009 02:12
What is it that you want to collide with what ?

Your code has no reference to anything collision related at the moment, but by the looks of it, there are a few things in there that could use collision detection to operate.

Im guessing that bullets would be one of the things that you want to collide with other things ?

Perhaps the actual player colliding with the ground/walls etc aswell ?

Im sorry to ask seemingly silly questions, but without the specifics of what you are after its hard to tell you what you need to do, as the collision for a player's movement would be slightly different to that used to calculate bullets collisions.

EDIT : One piece of advice I can give though, is to start simple, figure out HOW collision works and the different kinds of collision detection that can be used and what they are for. Make a small example, with just a couple of primitive objects and try to get them colliding with each other as you move them. Once you understand how it all works, its quite easy to apply in different situations like your more involved code above.

If it ain't broke.... DONT FIX IT !!!
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 14th Jul 2009 03:54 Edited at: 14th Jul 2009 23:42
ok... i wanted the player not to be able to walk through fy_snow.x and some gravity, lol really thats all i want to learn right now but i just cant grasp the way sparky's collision works(even after playing with the sliding demo code).
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 27th Jul 2009 05:55 Edited at: 23rd Aug 2009 21:29
yea, i give up.. screw collision
Edit: NVM i will keep at it
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 23rd Aug 2009 21:28 Edited at: 23rd Aug 2009 21:30
ok new developments:::

whole code


the problem now is that when i substitute
for
i get an Object (2) does not exist error.. i know for sure i have the gign model in my project folder.
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 23rd Aug 2009 22:11
Make sure that the object gign.x is actually being loaded. If the file isn't found or is corrupted or something along those lines then nothing will occupy object 2 therefore giving you the sparky's error.

Games are like life, they should never stand still.
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 23rd Aug 2009 22:39
the object is there, everything it needs to work is there too. but still i get the error
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 23rd Aug 2009 23:05
Does they error occur when you try to set the object up or update it?

Games are like life, they should never stand still.
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 24th Aug 2009 00:24
it occurs durimg debug in the setup phase
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 24th Aug 2009 01:11
Hmmm, I don't see anything wrong Can you post your full source including media, so I can try it out? It might be a strange problem with sparky's itself.

Games are like life, they should never stand still.
Juggalo Memnoch
16
Years of Service
User Offline
Joined: 22nd Apr 2008
Location:
Posted: 24th Aug 2009 01:17
is your gign.x model in the media folder?
in the makeLevel function you changed the current directory
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 24th Aug 2009 01:29 Edited at: 24th Aug 2009 01:31
i would but its like 332MB's.. BTW it was because it wasnt in the "media" folder... duh!!! how freakin dumb am i?

Login to post a reply

Server time is: 2024-10-01 12:24:05
Your offset time is: 2024-10-01 12:24:05