Development Log for Magic Pixel, a game maker using Love2d

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Re: Development Log for Magic Pixel, a game maker using Love2d

Post by milon »

I'm glad you've got it working now. In case this is useful to you, or anyone else, I believe Windows is still POSIX compliant. At the very least, it used to be. That means basic shell commands like `ls` and `cp` should work when called through os.execute() and you can hook the return values to do error-checking. It's a bit hacky this way, of course, but I haven't tested it. (I'm a Linux Mint user myself.)
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
User avatar
zorg
Party member
Posts: 3436
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Development Log for Magic Pixel, a game maker using Love2d

Post by zorg »

What part of windows was ever POSIX compliant? even linux isn't completely.
Before win10 or so added the linux subsystem, you only had cmd.exe (and powershell later), and neither supported commands like "ls", because "ls" in windows was always "dir".
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: Development Log for Magic Pixel, a game maker using Love2d

Post by pauljessup »

I did know about that, and was also pleasantly surprised in Win 11 when I types in ls in the command line and it actually gave me a directory. Still not sure why it won't run commands in os.execute on windows, and runs fine on others (doesn't give me an error either). I'm guessing that it's probably an antivirus style issue, or a permissions issue, or something like that. I tried running as admin, but still nothing. Very confusing. At least nativefs stuff is working just fine.

Though I am glad I got the other stuff working. I'm still working on this, mostly deep in the weeds of the lower end stuff, so there's nothing to show just yet.
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: Development Log for Magic Pixel, a game maker using Love2d

Post by pauljessup »

Aha! I figured out the os.execute issue. In case anyone else comes across this- I was using single quotes around file names with spaces in them, which is fine on OSX and Linux, but Windows does not like that. So my nested quotes had to use double quotes to get it to work, and now it works fine.

Ah well, no big. I still consider my original version a very messy prototype with speghetti code. What I'm doing now is much better. The code is by far way cleaner and easier to follow. And I like being able to edit in game, too, which this will now do. So while you're playing it, if it's in a debug build, you can hit escape to edit the map you're on/scene you're on, etc, or hit f1 for debug, etc.
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: Development Log for Magic Pixel, a game maker using Love2d

Post by pauljessup »

Moving ahead pretty quickly and smoothly now. It's got live editing, so that while playing the game you hit a hotkey (esc, etc) to bring up the scene editor for the scene you are on, or another hot key to bring up the settings editor, etc. I've mucked about and figured out a way to get SLAB to work with the editor/camera system I've been working on (main problem was scaling- since this is supposed to be hibit pixel art, it's mostly scaled up to fit the screen- slab ignored scaling so it looked word. But when I rendered it to a canvas, and then scaled the canvas, the mouse was obv wrong because it wasn't scaling the mouse cords...anyway, I figured out a way around it...just having the font larger for SLAB and rendering the GUI without scale, and it looks fine and works well).

Getting some traction now, since most of the lower level stuff is finished.
Screen Shot 2022-02-23 at 10.40.30 AM.png
Screen Shot 2022-02-23 at 10.40.30 AM.png (271.19 KiB) Viewed 6179 times
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: Development Log for Magic Pixel, a game maker using Love2d

Post by pauljessup »

(btw, working on this on both Windows 11 (and 10), OSX, and Linux, and testing on each as I go along...just so there aren't any surprises like before, when I'd done months of work on what I consider the prototype, only to find out it didn't work on Windows. That won't be the case now)
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: Development Log for Magic Pixel, a game maker using Love2d

Post by pauljessup »

And now everything will be scriptable by an in-engine script
Screen Shot 2022-02-24 at 2.38.32 PM.png
Screen Shot 2022-02-24 at 2.38.32 PM.png (186.8 KiB) Viewed 6107 times
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 44 guests