Official MICRO-blog THREAD for "Finish Your Damn Game Engine"

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Yes, you would be able to do that. Displaying slices during battle will be easy once we actually have battlescripting.
----

Well, turns out there was a nasty bug (my fault of course) in nightly builds for the whole last month, where pressing [ or ] in the spriteset editor would overwrite one palette with another. This is fixed in nightly builds, so make sure you download the fixed version if affected.

Time for a small update (better small and boring than put off forever). Battles used to look like this at higher resolutions:
Image
I fixed this to draw the battle as normal in the center of the screen, still 320x200, surrounded by black bars. But that still looks pretty bad so I wondered if I could do better without converting the whole battlesystem to slices.
But ti seems there's much more work required than just support for backdrops larger than 320x200 and changing the limits in the formation editor to allow placing enemies over the larger area. The menus at least ought to be moved; running animations, attacks flying on/off screen, and the Jump animation all need to be updated. So, later.

Anyway, I spent a couple of days on, you guessed it, a whole lot of code cleanup. (I'll throw in a few technical details today.) I don't know why.
I've been upset for a long time that we had a lot of code like

Code: Select all

edgeprint gam.hero(sp.hero).name, xstring(gam.hero(sp.hero).name, 206), 31, uilook(uiText), sp.page
which draws the name of a hero so that it's centered about x = 206 and at y = 31. xstring() calculates the correct position.
I wanted a way to set anchor and alignment points for text and other stuff without having to convert to slices, so I came up with a system where a single number encodes the offset, anchor point, align point, and other flags. For example "rRight - 20" ('r' for relative) means 20 pixels from the right edge of the screen, and "rCenter + ancCenter" means anchor the center of the object to the center of the screen... basically I've reimplemented part of the slice system :/

Code: Select all

edgeprint gam.hero(sp.hero).name, ancCenter + 206, 31, uilook(uiText), sp.page
About 5 hours into this cleanup I had my doubts about the whole thing, because I'd added a lot of code and complication and hadn't really cleaned anything up. I was seriously considering throwing away most of my work. But then I added even MORE complication, and suddenly I could clean up nasty stuff like the following:

Code: Select all

edgeprint RIGHT(cost_caption, 30), vpages(dpage)->w - textwidth(RIGHT(cost_caption, 30)), vpages(dpage)->h - 10, uilook(uiText), dpage
 ... becomes ...
edgeprint RIGHT(cost_caption, 30), pRight, pBottom, uilook(uiText), dpage
(Where pRight = rRight + ancRight, places the text against the right edge of the screen)

That was yesterday. Today, I've instead been working on the OHR Archive website (or whatever we will call it) that was discussed here. It's more or less the same "better gamelist" project that Spoonweaver and Chronoboy tried to start years ago. I've only spent ~3 days on it in total so far, but hit some real milestones today: displaying gamelists and game entries and downloading the whole CP and SS gamelists. I've written a totally dynamic website in Python from scratch.
Last edited by TMC on Mon Jan 30, 2017 1:59 pm, edited 2 times in total.
User avatar
marionline
Metal Slime
Posts: 673
Joined: Sat Feb 26, 2011 9:23 pm

Post by marionline »

That was yesterday. Today, I've instead been working on the OHR Archive website (or whatever we will call it) that was discussed here. It's more or less the same "better gamelist" project that Spoonweaver and Chronoboy tried to start years ago. I've only spent ~3 days on it in total so far, but hit some real milestones today: displaying gamelists and game entries and downloading the whole CP and SS gamelists. I've written a totally dynamic website in Python from scratch.
Python, nice! :)
Are you using a Framework like flask or something?
Would it be possible for me to take a look at the source code and maybe the web page as well?

Downloading the CP and SS Data ... wow! :o
Will there be statistics on the games next?
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

I'm not using any framework (I don't know any), or any Python library not in the standard library at all, aside from the OHRRPGCE nohrio and rpgbatch libraries. I'm using Python's standard wsgiref module to act as the server (I was also using apache+mod_python on CastleParadox, but that caches the .py files, and I don't know how to force a reload), and 'pickle' instead of a database. It really is written from scratch as a WSGI application. However, I've been looking into databases such as pyzdb, tinydb, buzhug, pydblite, or just SQL. For now though, loading all the data into memory only takes ~16MB, and I don't yet have any web interface to modify the data, so "pickle" is fine and quite fast.

The source code is public, and available here: https://bitbucket.org/rbv/ohr_archive/ It's not very well written, since I'm just making a first pass. (PM'ed a link to the live site.) src/website.py is the main file. You can just run web/local_server.py to run the site. Try running pull_googleplay.py beforehand to generate a database (since that only takes a a minute or two to download).

There will be a great deal of statistics and cross-referencing.
Last edited by TMC on Tue Jan 31, 2017 2:07 pm, edited 3 times in total.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Aside from some small bugfixes (and more code cleanup), I haven't made progress on the OHR in a week... instead I've been working on the archive. It's been really addictive, since progress is (mostly) easy, although extracting the downloads information from SS was a bit of a nightmare, as was extracting the data off Op:OHR while dealing with all kinds of corrupt data which caused the server to return infinitely large HTML pages, and up to 4 layers (strangely varying by game) of escaping of game names which when removed leads to multiple games with identical names.

Here's a very different kind of before and after:

Before:
Image

After:
Image

It turns out (due to all those bugs) that there are many games with broken download links and missing screenshots, which do actually exist amongst the website's files. In fact I rescued 23 downloads and 43 screenshots, such as the example above (however, many of the screenshots are just duplicates). Also note that you can see the contents of the zip right on the game page, and even the longname and about-line for the .rpg (which are blank in this case) using NeoTA's nohrio library.

So way too addictive, so I'm going to try to ban myself from working on it again this month. But that's what I said yesterday, and it didn't prevent me from working on it again today...
Last edited by TMC on Wed Feb 08, 2017 2:11 pm, edited 1 time in total.
User avatar
guo
Metal Slime
Posts: 749
Joined: Fri Dec 04, 2009 9:12 pm

Post by guo »

In fact I rescued 23 downloads
That sounds interesting. Could I trouble you for a list of what game files you found? I'm sure I had some old stuff on there.
vvight.wordpress.com
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Code: Select all

 Aquarius: Has a broken download link
 Chibi World: Has a broken download link
 Dino Park: Has a broken download link
 Eternal Flame: Status 'No demo' but game has a download
 Eternal_Flame: Status 'No demo' but game has a download
 Fate of Xynn: Has a broken download link
 Flute: Has a broken download link
 Krapper: Has a broken download link
 Last Legacy: Has a broken download link
 Neké The Woman of Mystery: Has a broken download link
 Project Ascension: Has a broken download link
 Ruins: Has a broken download link
 SECRET MILKSHAKE: Has a broken download link
 Shaglers Adventure: Has a broken download link
 Sigmar the Downtrodden: Has a broken download link
 Stick Death RPG: Has a broken download link
 Stickmen Adventures: Has a broken download link
 The Adventures of Bill The Smiley: Has a broken download link
 The Game: Has a broken download link
 WTF Halloween contest entry: Has a broken download link
 card RPG: Has a broken download link
 maxs adventure: Status 'No demo' but game has a download
You can access the downloads from http://www.castleparadox.com/archive/op ... /gamelist/
Plus http://www.castleparadox.com/archive/op ... name=%253F which doesn't appear on the game list.
Last edited by TMC on Mon Feb 13, 2017 2:20 pm, edited 1 time in total.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Hmm, what have I been up to...

I noticed that you get interesting patterns when you overlay a chequer pattern with a fuzzy rect and played with that; quite a waste of time...
<img src="http://tmc.castleparadox.com/pics/ohrblog/7_fuzzing.gif" width="360">
(Can you spot HOHOHO?)

I spent time cleaning up the menu code (and didn't really succeed; it's probably the part of the source code I fear the most), cleaning up audio backend code, cleaning up the NPC editor, cleaning up the screenshot code, cleaning up the backdrop menu, and even wasted a whole evening creating the graph for this article. And I spent a lot more time on the Archive website, collecting game reviews and adding search and tabulating features.

These cleanups were not for the sake of cleanup, but because they were more-or-less needed to implement some feature. In particular the audio backend code was so confusingly organised that each of the many times over the last years that I've considered adding sound effects volumes I was turned away from it.
But in many cases I didn't get around to working on the actual feature that required these cleanups...

I'm currently working on sound effects volume settings.
I'm very unhappy that sound effects play at double the volume that music does, and would love to retroactively halve the sfx volume in existing games, but well-polished games have already compensated for this long-standing engine bug. But the most common way to do this is to do "set music volume(255)" in the new game script.
One option might be to tweak the default music starting volume to something like 70% instead of 50%. Not such a big difference, but reduces the gap.
Of course, there should be settings for the initial music and sound effects volumes.

I got a good chunk of work done on the new file format and browser for backdrops of unlimited sizes:
Image (That's with the default master palette)

And I also started writing the animation editor. And I finally decided to give backdrops animations just like sprites, which will have a number of uses. Except that there's no point allowing multiple series of frames in a single spriteset; a linear sequence. So backdrop animations will be the simplest place to start.
Last edited by TMC on Fri Feb 17, 2017 7:29 pm, edited 2 times in total.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

oooh! Big backdrops look super cool :)
User avatar
Taco Bot
Meat, Cheese, and Silicon
Posts: 484
Joined: Fri Jul 18, 2014 12:15 am
Location: Santa Cruz
Contact:

Post by Taco Bot »

I'm a little confused as to what big backdrops are for. Are they going to become more of a general "image" format used for scripts and slices and stuff, and less of a "full-screen background"?
Sent from my iPhone
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

The main use would be for actual backdrops in games that use a screen size larger than 320x200.

Textboxes and battles don't have built-in support for larger screen sizes, but someday they will.

But of course yes, people will be able to do clever scripty-slicey-things with them :)
User avatar
Foxley
Metal Slime
Posts: 832
Joined: Sat Nov 09, 2013 5:54 pm

Post by Foxley »

Mmm, pre-rendered backgrounds are now possible... My 90's kid sensibilities are pleased.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Since backdrops will no longer be restricted to the size of the screen I guess there should be an option for where to position them behind textboxes. Titlescreens and battle backdrops should just be centered.
I don't see any reason to limit the size of a backdrop at all; use them as map layers :)

---

The NPC Editor has grown over the years without ever being cleaned up, so I rearranged it into a sensible order with sections, and added the Ignore Passmap setting which Foxley requested for his multicart game. This lets an NPC walk through regular walls without allowing it to ignore zones or walk off the map. Using zones alone you can only restrict the NPC to a smaller space than the player; this allows giving it fewer restrictions (use zones instead of walls).

Still, I regret adding this feature because it took far more work than expected (though half of which was just improving the plot dictionary to avoid confusion) for not much benefit. I should know by now how long these things take!

Before:
Image

After:
Image

While I was at it I made the textbox preview show more than just one line:

Before:
Image

After:
Image

OK, back to sound effect volume.
Last edited by TMC on Sat Feb 18, 2017 10:04 am, edited 1 time in total.
User avatar
Pepsi Ranger
Liquid Metal Slime
Posts: 1457
Joined: Thu Nov 22, 2007 6:25 am
Location: South Florida

Post by Pepsi Ranger »

Ah, I love that extended textbox preview. I've needed something like that for a long time.

Because I know how much you love to get derailed, you should consider adding one more NPC definition parameter to your fancy new organized menu there:

NPC Naming.

Yep, you should allow designers to name that particular NPC, right up there with appearance. We can name everything else, like heroes, villains, attacks. Let's name NPCs, too.

See what happens when you broadcast your progress?

Of course, SFX volume will be fantastic. Keep it up!
Place Obligatory Signature Here
User avatar
Taco Bot
Meat, Cheese, and Silicon
Posts: 484
Joined: Fri Jul 18, 2014 12:15 am
Location: Santa Cruz
Contact:

Post by Taco Bot »

I'd just like to say how awesome this thread is. You're making so much progress on the engine in such a short period of time, and frankly it's making me giddy. Keep up the good work, TMC! :)
Sent from my iPhone
User avatar
Taco Bot
Meat, Cheese, and Silicon
Posts: 484
Joined: Fri Jul 18, 2014 12:15 am
Location: Santa Cruz
Contact:

Post by Taco Bot »

Obligatory request, if someone hasn't already said it: ability to set animation speed of players/npcs. Would make running at higher framerates way easier.
Sent from my iPhone
Post Reply