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.

AppGameKit Classic Chat / Opening Old Project on Linux

Author
Message
Laughing Coyote Software
5
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 18th Jun 2023 00:50 Edited at: 18th Jun 2023 00:53
Hi, this is more of a Linux question, and my knowledge is very limited. I finally got ARCH Linux working after following this guide: https://itsfoss.com/install-arch-linux/

I was able to download AppGameKit on Steam, and now I want to open my old project. I copied the folder over to the "Desktop" folder under my username, but nothing is there when I try to open a project in AGK. It says I am on the Desktop of the same user, but clearly it is a different user as there are no files there. I was able to just copy and paste the text and it's running smooth with blank assets, but I can't find the folder to copy over the assets.

Happy that AppGameKit can compile Linux programs, but I really have no idea how to open/find my old project from file --> Open Project. I missing something simple? Thanks.

EDIT: I also can't find the new project I created using the GNOME file explorer to put the media in that way.
Laughing Coyote Software
5
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 20th Jun 2023 06:11 Edited at: 20th Jun 2023 06:12
The clarify the question:

Is there some way to switch users or something when opening a project in AppGameKit on Linux? I only have 1 user login and it says I am looking at the right directory on that user's profile, but it's not there. I also logged in as root user and I can't find anything. I am running AppGameKit from Linux Steam. Hope that helps. Thanks.
jsheedy
5
Years of Service
User Offline
Joined: 29th Aug 2018
Location:
Posted: 29th Jun 2023 05:00
Not sure I follow the question, but here are some thoughts
1. Do you see the folder from a console? Ls -la
2. Linux is case sensitive e.g. Documents and documents are two different folders
3. A. .foldername would make it hidden.

Don't know much about Arch Linux, but. It does not seem like it would be a different user issue. Seems more like a hidden issue, or permission issue on the folder. May need to run a chgrp / chown on your folder recursively
Josh
Laughing Coyote Software
5
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 29th Jun 2023 19:34 Edited at: 29th Jun 2023 19:36
Nice! I will definitely try that when I get back home to my Linux burner laptop August 3rd and get back to you. Thanks.

EDIT: It was working great when I just copy/pasted the code into a new project. I just could not figure out how to open a project I moved over to the hard drive or do the Open With... thing that you can do in Windows.
Laughing Coyote Software
5
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 9th Jul 2023 12:44 Edited at: 9th Jul 2023 13:00
Was able to load the project on a different computer with Ubuntu Mint in AppGameKit and compile it, but unfortunately it won't run. A black window loads and I get a popup saying Force Close or Wait, then eventually it crashes. Probably has to do with loading the assets. I'll test it out more tomorrow.

Also, I'll get back home early August to try loading the project on the ARCH Linux computer. The code I copy/pasted ran fine on that one, but all the assets were blank due to unresolved issue in original post. I'll post here when I get back.
Laughing Coyote Software
5
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 14th Jul 2023 05:28 Edited at: 14th Jul 2023 05:29
I still haven't gotten back to the ARCH Linux computer, but I'm trying to run it on Ubuntu with less success. On ARCH, the code was compiling fine, but I couldn't find the project folder to use graphical assets, possibly because I installed Linux wrong. I won't get back to work on that till August.

Meanwhile, I have access to two Ubuntu computers and I'm compiling it from AppGameKit on Steam. It always compiles, but it crashes about half-way through my function that declares variables, and it brings up a Close or Wait prompt. The crash happens around the objParent declaration, so I'm guessing it just can't handle that many variables. That sucks, because my DarkBASIC Pro game is running fine on Linux using Steam Proton. I switched to AppGameKit for the Linux compatibility. The tragic irony.

jsheedy
5
Years of Service
User Offline
Joined: 29th Aug 2018
Location:
Posted: 14th Jul 2023 18:45
I am not really sure, I have never had that many variables defined before. I usually use Types (sometimes nested) in larger projects with the newer array definition (https://www.appgamekit.com/documentation/guides/12_array_changes.htm). I have also never used DB(P), so I am not sure there. I have been using both AppGameKit and Studio for years now under different versions of Ubuntu without issue. I guess you could try to debug it? I have also run steam from a shell terminal to see what type of errors pop up, not sure if you want to do that as well.
Josh
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 14th Jul 2023 22:58
Those are some HUGE arrays
Laughing Coyote Software
5
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 15th Jul 2023 02:43 Edited at: 15th Jul 2023 02:44
I recently increased the max number of maps from 100 to 999 in case modders wanna make huge open worlds. I don't really need that many cause I'm making NWN1-style chapters, but I'll test out 100 maps tonight, and also try types.
Laughing Coyote Software
5
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 15th Jul 2023 08:36
I decreased max maps down from 999 to 30 in the DIM arrays. The program is then just a blank screen, but it's not crashing.

Now I'm trying to use the new array declaration method without using types, like so: mapNumObj as integer[999]
It should work, but it's saying I haven't defined those arrays yet and won't compile.
laughingcoyote.net
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 15th Jul 2023 15:35
The error message would help
Laughing Coyote Software
5
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 15th Jul 2023 19:28 Edited at: 15th Jul 2023 19:37
"Blabla has not been defined as an array" (when I try to compile on Windows)
laughingcoyote.net
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 15th Jul 2023 19:51 Edited at: 15th Jul 2023 19:55
Quote: "new array declaration method"

i think you mean the examples HERE, none of which include Scope so are LOCAL by Default while DIM'd arrays are GLOBAL by Default (i think i just learned this. i never use DIM). So:

...is Local &

i believe is what you're looking for?
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 15th Jul 2023 20:18 Edited at: 15th Jul 2023 20:22
meanwhile, either open taskmanager and run this while watching memory usage change pre-DIM to post-:


or trust my findings that you are allocating up to ~4GB of RAM doing it this way. it cripples my laptop (and crashes).

Consider sizing arrays dynamically and Type-ing as much of that as possible
Laughing Coyote Software
5
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 15th Jul 2023 21:05
Thank you. It is compiling. Unfortunately, it's still not running on Linux, so I guess I need to use types and resize the arrays. Gonna take a long time.
laughingcoyote.net
Laughing Coyote Software
5
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 15th Jul 2023 21:20 Edited at: 15th Jul 2023 21:40
OK, so using the updated array syntax and also lowering max maps from 999 down to 30 got it past the declarations function on Ubuntu, but now it crashes when trying to load music. If I comment out all the music lines, it actually runs with all the images.

I get a window saying, "Error: Could not find file music/intro.ogg" and the file is there.

P.S.: Also, I have to disable the Steam plugin for achievements. Is that normal?

P.P.S.: I'm gonna try just having adjustable array sizes and not using types. Is there any advantage to using types besides OOP-style organization? Does it save more memory than if I just used arrays with adjustable sizes?
laughingcoyote.net
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 15th Jul 2023 22:15 Edited at: 15th Jul 2023 22:27
Quote: "Could not find file music/intro.ogg"

i believe linux is case-sensitive (while Windows doesn't care). ie:
music/intro.oggMusic/Intro.OGG
so, make sure the file path/name cases are correct/match.

dunno about the Steam plugin and don't believe using Typed arrays would affect memory usage but someone else might have actual insight, there. i prefer Types for organizational purposes but if this is a large project you're working on (which i believe it is), i wouldn't consider converting to a Type'd system since you're already familiar with your current structure.

with v2 arrays (again, i never used v1), the ability to sort and search were added (i dunno if you can do this with DIM?). with that, note: only the first variable in a type'd array is used. yes, we can code our own sort and search, swap, .insert/.remove, but they won't be as fast as the built-in system.

there are other reasons i'd get used to v2 arrays including .json functions that may prove a boon to your large-ish inventory project, as well, so up to you if/when you want to look into converting.
Laughing Coyote Software
5
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 16th Jul 2023 00:46 Edited at: 16th Jul 2023 02:23
Working on the new array system now. But first, is there any way around the case sensitivity in Linux? I have thousands of assets, and I like to keep each word capitalized in the filenames but without spaces. It will take forever to change all the filename cases. I don't wanna have to change everything to lower case because they will be hard for modders to read, but I will if I have to. Thanks.
laughingcoyote.net
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 16th Jul 2023 02:08 Edited at: 16th Jul 2023 02:19
i could probably knock up a tool that reads a folder's filenames, finds them in source(s) and replaces them with actual filenames. find me on discord to discuss if interested (If you have WIN machine, would make it easier for me since i could use a plugin to help).

otherwise, manual Find/Replace might be your only option.
Laughing Coyote Software
5
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 16th Jul 2023 05:49 Edited at: 16th Jul 2023 05:50
I'm just gonna make all the resources lower case, but thanks.

For now, how can I adjust array length if it's more than one dimension? For example, I have this declaration: global objName as string[10000,30]

That means there can be 10k objects on one map, and 30 maps max. If you want to make more than 30 maps in the world editor, I need a way to adjust the size with the length command, but I don't know how to do it with more than one dim. Thanks.
laughingcoyote.net
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 16th Jul 2023 06:16 Edited at: 16th Jul 2023 06:28
i'm not confident trying to explain as i struggle with it myself (i know i did do it in 1 or 2 instances) but IronManhood response on Discord might help?

eejit wrote: "
Hmm ok so with a 2 dim array, can one add and remove elements to it dynamically ? Tired brain
I mean with x, y .insert seems to work with y part, but how do I specify the x part ?"

IronManhood wrote: "
array.length = length of 1st dimension
array[0].length = length of 2nd dimension of element 0 of first dimension
array.insert() = inserting into 1st dimension
array[0].insert() = inserting into 2nd dimension of element 0 of first dimension
array[0,0].insert() = inserting into 3rd dimension etc..."


meanwhile, i'd gone ahead and started on the tool which was going well until i found that ReplaceString() is case-sensitive.

i'm out too far to turn around and had already considered writing similar so i'll go at rebuilding each affected line manually... will keep you posted.

Attachments

Login to view attachments
Laughing Coyote Software
5
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 16th Jul 2023 12:25 Edited at: 17th Jul 2023 02:06
I already made all filenames lower case. It's not a big deal, just a little harder to read for modders. It might just be better to keep it simple like that. The good news is that it's now working fine on Linux with the 30 map limit. I'll post again when I try out the array expansion stuff tomorrow. Serious thanks for that.

EDIT: And I probably don't need to get AppGameKit working properly on my ARCH computer back home, as long as I can compile it on this new Ubuntu computer and it runs on ARCH. I'll post if it works on ARCH in August when I get back home.
laughingcoyote.net
Laughing Coyote Software
5
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 19th Jul 2023 21:28
Still gonna be a while before I implement adjustable arrays, but meanwhile, I'm wondering if there's an easy way to only add plugins and their functions if a variable is set to 0 or 1. I want a variable at the beginning called LinuxVersion = 0. If 1, it doesn't import windows-only plugins like Steam. The problem with this is that to compile I would have to comment out the commands it uses. Not a big deal as I could just comment out all plugin commands whenever I compile for Linux, but I want a easier way.
laughingcoyote.net

Login to post a reply

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