[Ohrrpgce] New feature: Achievements

Ralph Versteegen teeemcee at gmail.com
Fri Nov 19 05:25:21 PST 2021


On Sat, 20 Nov 2021 at 02:11, Ralph Versteegen <teeemcee at gmail.com> wrote:

>
>
> On Fri, 19 Nov 2021 at 04:14, Mike Caron <caron.mike at outlook.com> wrote:
>
>> > there are still lots more things that can be done after this is merged
>> (you didn't really list them so I will), including our own non-Steam
>> display of achievements, an editor, script commands (as an alternative to
>> toggling tags), and debug facilities.
>>
>>
>>
>> Yes, you are correct. As it is right now, you have to manually construct
>> the achievement lump to get it to work. I figured that this is the absolute
>> minimum amount of work to make it viable to merge.
>>
>>
>>
>> > but I did notice that Steam.run_frame still contains ACH_WIN_ONE_GAME
>> test code
>>
>>
>>
>> Whoops!
>>
>>
>>
>> > and a lot of commented out C++ that probably doesn't need to be there
>> anymore
>>
>>
>>
>> That was left on purpose, but I suppose it doesn’t really need to be
>> there now that we’re sure the signatures are correct.
>>
>
> Aside from the comments, it's all duplicate to the FB code. But there
> should definitely be a comment that 703 is
> SteamAPICallCompleted_t::k_iCallback, if there's no constant defined for it.
>
Oh, SteamAPICallCompleted_t.k_iCallback is actually defined in
steam_internal.bi

>
> Also, all that commented C++ code uses mixed tabs and spaces.
>
>
>>
>>
>> > and also run_frame is not really being called from the right place: it
>> will be called from 0 to 200 times a second depending on how much idle time
>> is available. Should it be called more often than whatever the game's
>> framerate (likely 18fps) is?
>>
>>
>>
>> Really? I put it there since that’s when we invoke the graphics backend.
>> Is there a better place to put it?
>>
>>
>>
>> (I don’t think it needs to be called all that often, but this is the
>> closest thing we have to a main loop, as far as I can tell)
>>
>
> I think dowait is the best place to call run_frame since it is called
> everywhere (except when a script is stuck), but the problem is that
> io_waitprocessing (and Steam.run_frame as it is now) is only called when
> there is idle time, but not when there isn't (if the process hits 100%
> CPU). So if being called at only 18fps or less is OK you could call outside
> the loop instead (and otherwise can call it twice).
> (That call to io_waitprocessing there is not that well thought out anyway;
> I don't think io_waitprocessing actually has any purpose anymore in any
> backend, as io_pollkeyevents (misnamed, actually all events) is also called
> to ensure that backends get a chance to process events even on the one or
> two screens that just pause waiting for a key without redrawing the screen.)
>
>
>>
>>
>> --
>>
>> Mike Caron
>>
>>
>>
>> *From: *Ralph Versteegen <teeemcee at gmail.com>
>> *Sent: *November 18, 2021 8:58
>> *To: *ohrrpgce <ohrrpgce at lists.motherhamster.org>
>> *Subject: *Re: [Ohrrpgce] New feature: Achievements
>>
>>
>>
>> Great, at last!
>>
>> I can't believe that I thought (long ago) that this would be a
>> straightforward thing to add since it's "just" calling an external API...
>> there are still lots more things that can be done after this is merged (you
>> didn't really list them so I will), including our own non-Steam display of
>> achievements, an editor, script commands (as an alternative to toggling
>> tags), and debug facilities.
>>
>>
>>
>> One thing it would be good to get other people's opinion on: there's
>> currently a global flag to switch between permanent achievements (the only
>> sort supported by Steam) or per-game/save ones. Would anyone ever want to
>> mix the two? Consider that non-permanent ones won't be shown with the steam
>> overlay.
>>
>>
>>
>> I didn't have time tonight to look over and write comments on the code,
>> but I did notice that Steam.run_frame still contains ACH_WIN_ONE_GAME test
>> code, and a lot of commented out C++ that probably doesn't need to be there
>> anymore, and also run_frame is not really being called from the right
>> place: it will be called from 0 to 200 times a second depending on how much
>> idle time is available. Should it be called more often than whatever the
>> game's framerate (likely 18fps) is?
>>
>>
>>
>> On Thu, 18 Nov 2021 at 18:35, Mike Caron <caron.mike at outlook.com> wrote:
>>
>> Naturally, I forget to include a link to the Pull Request. I have been a
>> professional for a decade now 😄
>>
>>
>>
>> https://github.com/ohrrpgce/ohrrpgce/pull/1229
>>
>>
>>
>> Mike Caron
>>
>>
>>
>>
>>
>> *From:* Ohrrpgce <ohrrpgce-bounces at lists.motherhamster.org> on behalf of
>> Mike Caron <caron.mike at outlook.com>
>> *Sent:* November 18, 2021 5:33 AM
>> *To:* ohrrpgce at lists.motherhamster.org <ohrrpgce at lists.motherhamster.org>
>> *Subject:* [Ohrrpgce] New feature: Achievements
>>
>>
>>
>> Hello friends,
>>
>>
>>
>> As I mentioned a few weeks ago, I was working on support for Steam
>> achievements in the OHRRPGCE. Well, the fateful day has come when I think
>> it's ready to release to the wild.
>>
>>
>>
>> But, that said, I haven't contributed anything for a while, so I wanted
>> to give you guys a chance to review my work before merging it in. So, I've
>> opened up a Pull Request on GitHub and I would welcome any feedback that
>> anyone would like to provide. Don't hold back! I can take it!
>>
>>
>>
>> Cheers!
>>
>>
>>
>> Mike Caron
>>
>>
>>
>> _______________________________________________
>> Ohrrpgce mailing list
>> ohrrpgce at lists.motherhamster.org
>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>
>>
>> _______________________________________________
>> Ohrrpgce mailing list
>> ohrrpgce at lists.motherhamster.org
>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20211120/29f65d58/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: E7789D4F42224BE399CD92EF35D928FD.png
Type: image/png
Size: 144 bytes
Desc: not available
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20211120/29f65d58/attachment.png>


More information about the Ohrrpgce mailing list