Recent

Author Topic: Castle Game Engine (Cross Platform) - Need Help with Drawing a Raycast Vector  (Read 10647 times)

vfclists

  • Hero Member
  • *****
  • Posts: 1013
    • HowTos Considered Harmful?
I can't help myself, but this thread is comedy gold ;D ;D

Dude wants to develop a FreePascal program without learning FreePascal itself or even bothering to study the error messages.

Hopefully some nice guys here will be extremely patient and help him out.
« Last Edit: February 20, 2024, 01:34:51 am by vfclists »
Lazarus 3.0/FPC 3.2.2

Joanna

  • Hero Member
  • *****
  • Posts: 798
I can't help myself, but this thread is comedy old ;D ;D

Dude wants to develop a FreePascal program without learning FreePascal itself or even bothering to study the error messages.

Hopefully some nice guys here will be extremely patient and help him out.

Does anyone remember that old Colombo tv series where the protagonist was always pretending to be confused ... 
https://en.wikipedia.org/wiki/Columbo
If he wants to roleplay Columbo what does that make us ?

If he was actually using Lazarus ide it would be very obvious where the left gutter is..
« Last Edit: February 20, 2024, 01:58:44 am by Joanna »
✨ 🙋🏻‍♀️ More Pascal enthusiasts are needed on IRC .. https://libera.chat/guides/ IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channel #fpc  Please private Message me if you have any questions or need assistance. 💁🏻‍♀️

dbannon

  • Hero Member
  • *****
  • Posts: 2844
    • tomboy-ng, a rewrite of the classic Tomboy
I'm really sorry but I'm such a newbie when it comes to directions like "left gutter", even though I know how to code very well.

Can you show me using a screenshot or similar what the left gutter actually is?

Look at https://wiki.freepascal.org/IDE_Window:_Editor_Options_Display_Gutter the fist image, the gutter is, as I said, to the left of the text area, in this image, it has two blue circles with '1' and '2' in them.  Another way ?  Click around the line numbers ...

Honestly, you do need to try to find these things for yourself. You will lean faster and more effectively that way.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2216
  • Fifty shades of code.
    • Delphi & FreePascal
Please make no joke out of the OP.
If you have no constructive help to say, do like I do and skip  :-*
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

JPF12141999

  • Jr. Member
  • **
  • Posts: 88
Yeah, you guys have to understand I am coming at this with no insider knowledge of lingo or anything like that, a total 100% newbie to this particular language.

And again, I am not an idiot who doesn't pay attention or refuses to learn like some may imply, but rather I just get confused because the error messages don't make sense when you read them at face value, and I don't understand that something else I am missing is also implied.

For example, when I am told to read the "left gutter" it isn't obvious it means the left gutter in the IDE specficially, and it is very easy for me to misunderstand it as the left gutter in the scene graph, which is what I did as you guys can tell.

It helps when help is given, to be specific about more exactly what I should do, rather than just having me guess everything myself based on very specific and obscure resources that I need to shift through hundreds and hundreds of pages to find.

JPF12141999

  • Jr. Member
  • **
  • Posts: 88
Now that that is out of the way, I left clicked on the line I want to start debugging at, clicked "debug", and got a drop down/pop up menu with multiple options, in particular "Toggle Breakpoint", "Add watch", "Data/watch breakpoint", "Run to cursor", and finally "Call stack."

I guessed "Run to cursor" would be my best option, but that didn't work correctly and just got an error message about not having the package "castle_window" which is required, and tried "Call stack" but got a pop up window of the call stack, rather than actually calling/launching the stack from that point like I thought might also happen.

Does anyone know how I should correctly launch the debugger and debug the code in this case?

dbannon

  • Hero Member
  • *****
  • Posts: 2844
    • tomboy-ng, a rewrite of the classic Tomboy
I left clicked on the line I want to start debugging at, clicked "debug", and got a drop down/pop up menu with multiple options, in particular "Toggle Breakpoint", "Add watch", "Data/watch breakpoint", "Run to cursor", and finally "Call stack."
Did you left click or right click ?  As long as  have been using the Lazarus IDE, a left click inserts a break point, a right click gets you a menu. Either way, you you want to set a breakpoint.

"Run to cursor" would also work although you need to be sure the cursor is on the line of interest.

If that is not working, then the debugger does not sound like it likes your installation. Why ?

Quote
error message about not having the package "castle_window" which is required

Sort of sounds to me like you don't have the castle_window package installed and it is required. If you try to debug into the castle code, you will need that package. If you stay in your own source, perhaps not. So, don't press F7 when on a call into castle, just press F8 to step over.

If, when you did 'run to cursor' maybe you had the cursor on a different spot than you thought ?  (Thats why I suggested the left click, bit more dependable.)

It really does sound to me like you have not used an IDE before (the term gutter is widely used) nor an integrated debugger. You do really need to get some experience doing something a bit less challenging that working with Castle Engine. Make some simple shape or word puzzles, maybe you need a contacts database etc - until you reash he point where you have a feel for the syntax and IDE. You are trying to run before you can crawl IMHO. And is going to lead to frustration and disappointment.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

JPF12141999

  • Jr. Member
  • **
  • Posts: 88
But why? Why give me unnecessarily complicated steps I have to do and guess the answer all by myself, when all I wanted was to fix one or two simple lines of code that I was using trusted examples from?

For example, I don't need to know the ins and outs of an IDE to point out that if I follow the given syntax to type a procedure and its arguments, I should expect it to work without a problem.

Sounds like you guys don't actually want to help, but rather want me to teach everything myself, which is not helping at all, period.

And yes, I left clicked specifically on that particular line and got that menu in my copy of the Castle Game Engine, and it's the latest download from the downloads page.

If you really wanted to help, you would have given all the directions I needed, like explaining I need castle_window package first if you knew that already, rather than just telling me only a small part and having me guess everything else by myself.

cdbc

  • Hero Member
  • *****
  • Posts: 1157
    • http://www.cdbc.dk
Hi
You're working within the 'Castle Game Engine'.
I tried to follow @Michalis' advice and I can see where he's getting at, but I ain't gonna download 800 and something MB of engine, just to prove him right!!!
You cite the example, but you yourself CHANGED that, i.e.: You're now "beating a dead horse"!
So, please stop whining about examples(they work until you change them), get real about the situation you're in and solve it by FOLLOWING MICHALIS' ADVICE!
...And no, I slowly can't see it your way, it's time for you to step up and learn something  8-)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

JPF12141999

  • Jr. Member
  • **
  • Posts: 88
I get that I changed the example, but that's not the point - my point has always been that if I follow the directions of what the code says verbatim for adding a new line of code, like defining a new procedure that wasn't there before, I should expect it to work perfectly if I follow the same exact syntax as the older procedures.

Again, I understand that in many of the cases there is something else missing, but the point is for a newcomer like me I won't magically understand what this "extra something else" is, because the compiler is never specific about it - for example, I was told the code was an invalid expression, but it was never explained to me it was invalid because it was not included in the correct order, I had to somehow guess that myself.

It would be very helpful for the compiler as well as you guys to actually explain every detail necessary, rather than just forcing me to guess by myself what the real problem is.

JPF12141999

  • Jr. Member
  • **
  • Posts: 88
And that has always been my point in both that thread I linked in my first post and this one - if you are going to stop posting then I will, and just seek help on other forums.

TRon

  • Hero Member
  • *****
  • Posts: 2645
And that has always been my point in both that thread I linked in my first post and this one - if you are going to stop posting then I will, and just seek help on other forums.
I have not followed this thread (only skimmed through it) and I can at least make some conclusions/advise (you can take my comments as you prefer):
- Michalis is the authority when it comes to the castle game-engine so any advise coming from him is golden
- you might be (or get) confused by compiler messages but be warned that the messages that the Free Pascal compiler produces are much more informative then those of most other compilers (usually they are far more cryptic and not even directly associated by the error that was made)
- In light of the previous point, it is advisable to get yourself more familiar with the compiler and the Pascal language (Free Pascal dialect in particular)
- It is never advisable to go in deep using 3th party implementations/libraries without having at least some basic (Pascal) language knowledge/skills
- Seeking help on other forums can be an (perfect valid) option but be warned that unless you are able to find someone that is able and willing to invest time in trying to learn you some basic language skills in order to get yourself acquainted to/with the compiler then it most likely will end up in a similar manner as this thread

There is some nice expression in the English language that says: never try to run when you can't even walk.

Whether or not that applies to your (current) situation I am unable to tell for sure but it sure looks (a lot) like it. And there is no shame in that in case it is.... it just requires a bit of patience and the willing to take the time to learn some basic skills.

And you do not have to take my word for it but we've all been there on time or another and it can get quite frustrating if you are fighting the language/compiler instead of taking a deep breath and try to come up with another approach. You might even come to the conclusion that the Pascal language is perhaps even something you do not wish to pursue.

2 cents.

JPF12141999

  • Jr. Member
  • **
  • Posts: 88
I get that, and I get that I need to follow the very specific rules, but I need someone to explain what the rules actually are, rather than telling me to teach myself everything from the ground up, because that's essentially just telling me for lack of a better way of saying it to go screw myself.

With my invalid expression example, I got a helpful post explaining what the rule was that I could follow in the future and I am grateful for it.

However, most other posts are "teach everything to yourself, cause we certainly don't want to spell out anything for you", and they say that very strongly, even if it's not the exact words.

At that point, there is no reason to ask for help because clearly they don't want to actually offer it.

JPF12141999

  • Jr. Member
  • **
  • Posts: 88
So I know I can't run without being able to walk, but what if no one is willing to actually show me how to walk correctly?

JPF12141999

  • Jr. Member
  • **
  • Posts: 88
And before I leave for good, I have an official sarcastic comeback for some people, you know who you are:

If you're not willing to download 300 MB of data to actually understand my problem, then I'm not willing to read 300 MB of data in hopes of finding a small obscure piece of code that will help my problem.

 >:D

 

TinyPortal © 2005-2018