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 / Problem with a method

Author
Message
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 5th May 2008 22:45
I am using a method of stopping an object from going through walls, and I think that method works fine- The prolem is that when I set up an object using sparky's collision-- it goes all wacky.

For some reason the computer scences the collision when I am not even touching the object, because it is a maze-- and it thinks it is one big box....

Does any one know the solution? Thanks!

~~Its not about what you know, its about how you figure it out.~~
draknir_
17
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 6th May 2008 00:12
if your whole maze is one object, you will have to use polygonal collision to get the right effect. Sparkys command set has three options: sphere, box and polygon collision, you need to set the last one.
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 6th May 2008 03:43
Hm....... Didn't realize that that would make a difference. Wow. Well thanks like crazy, that helps me and wil probobly help me in the future.

~~Its not about what you know, its about how you figure it out.~~
Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 6th May 2008 05:22
If you have collision set to box or sphere, an imaginary square will be present extending from the centre of your maze... The collision then is not with the person to the maze walls it's from the person to the imaginary box...

~~It's not who you are underneath, but what you do that defines you.~~
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 6th May 2008 21:23
you make the imaginary box or sphere visible to help debugging.... look in the sparky header file SC_COllisions.h, there is something akin to "Show Object Bounds" or something.

programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 6th May 2008 23:40
ok, thanks

~~Its not about what you know, its about how you figure it out.~~
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 6th May 2008 23:41
now, another problem, when I try to scale an object, nothing happens, it is teh same size...... is there another method of resizing an object?

~~Its not about what you know, its about how you figure it out.~~
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 7th May 2008 00:15
Yay! I got It!!!!!!!!!!!! Never mind about the other question, figured it out, but I got it all worked out! Now on to finishing the game. Ps-- How would I post the game? Could I post it on this site or what?

Oh, and for the people that don't know the game I am making-- it is a multiplayer hide and go seek game. -- If you don't like teh idea, I don't blame you. Lol!

Thanks to everyone that helped, Have a penguin- or . Lol.

Sorry, I get really hyper when i get something that has been troubling me for a while.......

~~Its not about what you know, its about how you figure it out.~~
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 7th May 2008 00:51
Actually, I got an error message for a syntax error, easy fix right? Well, if I could find it.....

I know in python there is a line finder, is there one in c++ too? I mean, I know the error is in line 128, but I am not going to start counting!

I tried looking around, but I found nothing.

~~Its not about what you know, its about how you figure it out.~~
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 7th May 2008 00:51
We like enthusiasm! So don't apologize... And for the record I like your game idea.. and another thing... My Wife plays a lot of games I think are DUMB... BORING.. and she plays some I love... (rare though) ... But they are great games .. and people tastes vary... so... My judgement for game is simple... Do people play it once in a while? and do they have fun when they do? That IHMO is the true scale of coolness!

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 7th May 2008 00:52
(Double click the line of text with the error message on it... and then there is always CNTL-G (go to line #) I double click the error messages - much easier! LOL

programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 7th May 2008 00:54
c:\users\byron\documents\visual studio 2008\projects\hide en go seek final\hide en go seek final\main.cpp(135) : fatal error C1075: end of file found before the left brace '{' at 'c:\users\byron\documents\visual studio 2008\projects\hide en go seek final\hide en go seek final\main.cpp(14)' was matched

I also got this message and I don't exactly know how to solve it.

~~Its not about what you know, its about how you figure it out.~~
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 7th May 2008 00:55
Quote: "(Double click the line of text with the error message on it... and then there is always CNTL-G (go to line #) I double click the error messages - much easier! LOL"


Yeah, that is a lot easier then counting-- I actually started and got to 50 but then I gave up. thanks

~~Its not about what you know, its about how you figure it out.~~
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 7th May 2008 01:14
Ok... start at line 14... and make sure your code is indented properly... only chance you have of finding this (almost the cruelest) compiler issues you can have! You're missing a "}" Curly!

Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 7th May 2008 07:18 Edited at: 7th May 2008 07:20
I get that error a lot... It's easy to miss curly braces...

Instead of combing through thousands of lines of code to find one freakin' missing brace, JUST CHECK BACK TO THE LAST PLACE YOU MADE CHANGES TO OR ADDED STUFF TO... Chances are, if the error wasn't there before some modification or addition you made to the code, just before the complier issue came up, you messed up there... Trust me, it's way easier...

Even though it says line 14 the error maybe down at around line number 2564... The reason it says 14 is because that is where the compiler can't make sense of it anymore...

~~It's not who you are underneath, but what you do that defines you.~~
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 7th May 2008 07:57
Here's a hint to help debug the curly braces. Place the cursor next to a questionable curly brace and press Ctl+]. The cursor will jump to the curly brace that pairs up. You can narrow down what doesn't match up until you locate the problem.

BTW, this works for parentheses also as well as square brackets.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 7th May 2008 08:44 Edited at: 7th May 2008 08:47
Indeed, it does...I was going to say the same thing. Here is another that occurred to me while reading down this post...
You can open include files that are in your project, but that you can't see (They are too far into the include file chain to be visible.), by moving the mouse i-bar cursor to the thing you want to examine, and right clicking when the tooltip comes up. On that menu, select "Go to definition", and VS will open the file it is defined in....very handy. This doesn't work for library functions. If no tooltip comes up, the thing is not defined at that time.

The status bar at the bottom has the cursor information, including the line number. (At the bottom right) You can navigate into the file by keeping an eye on that, too. You've never had to count lines in any MS IDE I've ever used, including PWB and Edit.

In my experience, the compiler is either spot on, or one line off of the true FIRST error. Any error related to that error is usually meaningless. In fact, fixing the first error often eliminates the others, especially when the first error is a definition, or declaration error.
Juggalo Memnoch
16
Years of Service
User Offline
Joined: 22nd Apr 2008
Location:
Posted: 7th May 2008 20:36
When you have your Editor open if you go to
"Tools\Options\Text Editor\All Languages"
There's a section named "Display" if you check the box named
"Line Numbers" it will number the lines for you just to the left of your code
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 8th May 2008 01:06
Yeah, I figured out my problem, now I got this error message-
Embedding manifest...
Project : error PRJ0003 : Error spawning 'cmd.exe'.

My code is this-


I looked over it, but I can't find anything wrong. Oh, and when the window opens where you play, it doesnt work and is frozen.
This wasn't happening before so I am confused....

Thanks for all the help-- I just have way too many questions...

~~Its not about what you know, its about how you figure it out.~~
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 8th May 2008 01:14
Wait, I got it, I just needed to change the directory properties-- problem solved.

When I still debug the file, it still is frozen and takes a long time to load. Did I do something wrong?

~~Its not about what you know, its about how you figure it out.~~
Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 8th May 2008 05:50
Does it finish loading... Or does it not load at all?

~~It's not who you are underneath, but what you do that defines you.~~
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 8th May 2008 23:36
It finishes loading after a long time, but then it freezes, could it be because my map is too big? I sit having a hard time loading it?

~~Its not about what you know, its about how you figure it out.~~
Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 9th May 2008 01:24
Did you just introduce your map into the game and then started having this error or did you have it from before and the error just popped up now?

What do you see after it finishes loading... send a screenie if you can...

~~It's not who you are underneath, but what you do that defines you.~~
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 9th May 2008 03:49
Well, I just put in the new map, and it started happening, -- I put back the old map, and I think it is working.......

~~Its not about what you know, its about how you figure it out.~~
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 9th May 2008 03:50
It works now, thanks!

~~Its not about what you know, its about how you figure it out.~~
Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 9th May 2008 04:46
Quote: "
Here's a hint to help debug the curly braces. Place the cursor next to a questionable curly brace and press Ctl+]. The cursor will jump to the curly brace that pairs up. You can narrow down what doesn't match up until you locate the problem.

BTW, this works for parentheses also as well as square brackets.
"


Very useful Lilith do you have any more of these quick tips?
Does anyone know a way how to set the debugger to stop at the 1st error?

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 9th May 2008 05:06
these are all good tips... I read the error, and it tells you line # of the unmatched curly... I personally start there and work my way down. If you're RIGOROUS in your formatting... indenting, unindenting... its helps ya find it...

jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 9th May 2008 05:22 Edited at: 9th May 2008 06:08
I'm not sure that I understand your question, but breakpoints can be set by placing the cursor on the line you want to break at (provided the debugger can stop it there), and pressing F9. You can examine variables then. Also, you can step into and over functions when stopped using F10/F11. you can also set a breakpoint condition, which is very nice. Assert is also a method for controlling the debugger. Assertions are automatically not included in release versions.

Be advised that the debugger does not consider most things errors, until the program makes an access violation, or otherwise loses its mind because of stack corruption. Failed function calls are not considered errors by the debugger. Exceptions are a better method of checking for failed function calls. (For one thing, they retain the error information, and are part of C++ proper.) Exceptions do not require debug builds, but they will slow the application somewhat.

When the program is stopped in the debugger, you can go to a variable that is currently in scope, and iirc, pressing SHIFT+F9 will open the Watch Window, with its value in there. You can change the value, too.

It helps the debugger alot if you will set options for creating a PDB.

If you use enumerations, the symbolic value will be listed, as well.

Basically, the more information you give to the compiler, the better the debugger works.

Real time apps are difficult to debug using this system, however. Some years ago, you could output debug strings to either a window, or the serial port. Also, there was an option to use a Hercules graphics card as a second display, and dump debug output to that. I am not sure which of those options are still available, but the window ouptut should still be there.

I put debug specific dump routines in my code for this purpose when developing realtime code.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 9th May 2008 13:44
good stuff Jenzai... I think preparing for debugging and doing stuff to help you accomplish it is very import.

I always make a "global" logging method that allows me to dump stuff to a file... like I use a "code" which is yyyymmddhhmm in each one so I can easily search for the "code" if it shows up in the log file... and find it in my source quickly. I usually dump code, and description, pertinant variable names and their values etc. Especially because the debugger doesn't ALWAYS help... or your in a loop and debugger is to slow to step through when you just want something like a watch/break to report stuff if the criteria is correct but the program can still keep running its its not as you say .. losing its mind LOL

Login to post a reply

Server time is: 2024-09-29 19:16:49
Your offset time is: 2024-09-29 19:16:49