[TynesideLUG] C++ Links

Ian Bruntlett ian.bruntlett at gmail.com
Mon Mar 6 21:57:28 UTC 2023


Hi Casey,

On Mon, 6 Mar 2023 at 21:02, Casey Earnshaw <casey at linuxmail.org> wrote:

> Thank you very much for the links. I've been doing some C++ today and
> trying to get the SQLite plug-in to work. Progress is very slow though
> because we kind of have to treat it as a black box then compile it over
> to the Godot engine and see if the engine can handle it. I don't know
> enough yet to debug efficiently and I was wondering if maybe you could
> give us some advice?
>

One way of getting the most benefit out of asking questions on forums and
email mailing lists is to read this article:-
http://www.catb.org/~esr/faqs/smart-questions.html

Being able to narrow down the scope of a question to actual specific points
will encourage people on mailing lists/forums to answer your questions (I'm
thinking of accu-general in particular).

Do you have a data design/structure? If so, look at it and consider
"Couldn't I just read this all into some vectors of PODs ("Plain Old Data
Structures", aka structs in C++,). Having a good idea of the data you're
going to handle will help you in the long run. It might even be practical
to store your data in simple text files and read the data into GDScript (
as done in this example:
https://godotengine.org/qa/57130/how-to-import-and-read-text ) stored in an
array or other container object or even in C# if you prefer that.

The difference in intent to using the struct keyword and the class keyword
is that by using a struct you intend to have plain old data that does not
have a "class invariant" associated with it. In C++ the keywords struct and
class have almost identical meaning.

I know next to nothing about the Godot engine (
https://godotengine.org/features/ ). It looks interesting and GDScript has
the advantage of being the "native tongue" of Godot. I did find something
about debugging GDScripts (
https://docs.godotengine.org/en/stable/tutorials/scripting/debug/overview_of_debugging_tools.html
).

So, to recap:-
1. Read the smart questions FAQ I linked to.
2. Have a really good think about your data and how you intend to use it in
the future.
3. Something to consider: Look at GDScript and see if you can access text
files from it on your system.
4. Something else to consider: There appears to be an SQLite wrapper for
Godot. Can you get it to work: https://github.com/2shady4u/godot-sqlite

A lot really depends on what you want to get from your game project. Would
you mind sharing that with me, so I can try to advise better?

HTH,


Ian

-- 
-- ACCU - Professionalism in programming - http://www.accu.org
-- My writing - https://sites.google.com/site/ianbruntlett/
-- Free Software page -
https://sites.google.com/site/ianbruntlett/home/free-software


More information about the Tyneside mailing list