devolution

Author Topic: General Discussion  (Read 3821246 times)

0 Members and 39 Guests are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7335 on: May 04, 2016, 04:20:49 AM »
Depends on how the function is used. It's game over if you jump during a job, it should be ok in most cases for interactions.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7336 on: May 04, 2016, 05:05:53 AM »
I think I'll try to use small, simple functions inside the big function to avoid repeating the same code.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7337 on: May 04, 2016, 06:08:00 AM »
I think I'll try to use small, simple functions inside the big function to avoid repeating the same code.

Your approach is fine if it manageable. Functions have overhead, it isn't much but if we're gong to be calling them a lot, in loops, it sometimes makes sense not to separate them into smaller funcs. If it's not, readability/maintainability should come first.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7338 on: May 04, 2016, 06:12:51 AM »
Not sure how else to make it work and look good...
I have
Quote
if location in ["beach", "park", "forest", "room"]:
    <many checks>
    else: # all checks failed
        <show simple bg picture>
else:
    <show simple bg picture>
Normally such things are handled by a single jump. Another option is to make <show simple bg picture> a function.
I really hate the idea to use try except to mimic jumps, like they suggest in some places.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7339 on: May 04, 2016, 06:41:14 AM »
The db system is lightning fast, I've tested it + we are not using it a lot in next day. I am also not aiming those comments at you, they are my problem. There is a very obvious path of speed optimization to current look-up algorithm but it might not be worth the effort.

The only way to do it right now is to search the whole database (all chars/images) for every single variant. Smarter way might be to "slice" the database (for very complex and precise lookups only). First we could get image pool for the character along, filtering out the rest of characters. Then "main action" tag. Then location tags. Then mood tag. Then bg tag. (or keep hitting the first pool with combinations, but we don't have a single case where step one would not be desirable).

Or that in some other order, working with reduced base. It should be faster with complex look-ups. The problem is that we prolly don't need it at all cause database speed is already really great so as I've said before, ima prolly overthinking it.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7340 on: May 04, 2016, 06:57:10 AM »
If you willing to make a slicing function, it just as well can be integrated into my function instead of if char.has_image.

Then again, I'm not trying to show the best picture by discarding less suitable one by one. It will give the best result for a pack which already has all needed combinations of tags, and you just have to find them.
For real packs you have to consider many has_image options to show the best picture.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7341 on: May 04, 2016, 07:01:45 AM »
Once it's ready, I'll time the function during the next refactoring/optimization phase. If we're talking nanoseconds again, np. If the improvement is worth it, we'll make slices the most convenient/logical way.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7342 on: May 04, 2016, 08:49:37 AM »
Phew, the new function removed about 500 lines due to combining everything but strip and mast into one algorithm  :)

I have some ideas for new interaction options that don't require rewriting interactions from the issue 85, gonna do it next.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7343 on: May 04, 2016, 01:40:00 PM »
Removed old fg object from the game... I really want to do drag and drop thing for fg and maybe some other buildings. It was really difficult the last time and Gismo destroyed all screen code prior to us switching to Git (don't want to revive mercurial repo cause recording will likely be faster) but if I can pull it off, it'll prolly come out nicer. Maybe even extending it to other businesses will work (for job assigning inside of a building for once).

It'll prolly take a long time to even try to setup with so much logic at play... I'll start by hooking up the business to the building and try a simple Drag/Drop setup tomorrow/the day after.

Edit: You'll need to grab my testing file again or remove all references to fg object from yours (I think it's just the 3 characters being assigned to it).
« Last Edit: May 04, 2016, 01:44:14 PM by Xela »
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7344 on: May 04, 2016, 01:59:01 PM »
I'm not sure I can imagine how to properly use drag and drop there. It's different for items screens, they have a big list of unique and sortable, thus recognizable items icons. Characters portraits are much less sortable and recognizable. And dragging big pieces of gui with portrait+name+class is weird.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7345 on: May 04, 2016, 02:04:28 PM »
I'm not sure I can imagine how to properly use drag and drop there. It's different for items screens, they have a big list of unique and sortable, thus recognizable items icons. Characters portraits are much less sortable and recognizable. And dragging big pieces of gui with portrait+name+class is weird.

It used to work fine + we can tooltip as well (partly at least, prolly will not work for drags). Honestly, I am not completely sure how to build teams without drag and drop so it doesn't look completely shitty... I had to comment out that part of Gismo's interface but he didn't have any bright ideas either and the who thing was limited to a four buttons and three portraits, I have no idea what to do with those :(
« Last Edit: May 04, 2016, 02:21:26 PM by Xela »
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7346 on: May 05, 2016, 01:56:19 AM »
I'm not sure I can imagine how to properly use drag and drop there. It's different for items screens, they have a big list of unique and sortable, thus recognizable items icons. Characters portraits are much less sortable and recognizable. And dragging big pieces of gui with portrait+name+class is weird.

Oki, so I've done some thinking about the interface...

Ideas :

- Leaving the right frame in the normal business name/buttons/tooltip mode.
- Midframe:
*Bottom = 8 to 12 frames (best fit) with all portraits of workers in the building with paging. Name/base traits reported to tooltip. Maybe also some basic data like assigned jobs.
*Top = Teams (for Guild) or Frames representing available jobs.
- Left Frame:
*Maybe some general stats (amount of workers for buildings/active teams) overview.
*Maybe addition filters to be used in midframe.

It could/should turn out ok, any thoughts?
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7347 on: May 05, 2016, 02:52:51 AM »
The tooltip at the right panel does its job, but looks bad. It's the only (properly interfaced) place in the game where we use a simple black background for text.

Bestiary button should be either moved to the guild, or be at the both arena and guild screens if you want to keep it at arena. Or maybe even moved to MC screen. Anyway, leaving it only at arena, a third party building, makes little sense.

I suppose there should be access to characters profiles if you need full info about the character. I'm not how to combine it with draggable portraits though.

Pictures that you use atm inside the guild look good, but take quite a lot of space. Maybe they should be smaller, or even cut off a bit.
« Last Edit: May 05, 2016, 03:02:08 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7348 on: May 05, 2016, 03:39:04 AM »
The tooltip at the right panel does its job, but looks bad. It's the only (properly interfaced) place in the game where we use a simple black background for text.

I'll ask Gismo to take a looksie at stuff like this before the release. If he has time and feeling up to it. We'll have to improve on smaller details later, right now layout and logic are more important.

Bestiary button should be either moved to the guild, or be at the both arena and guild screens if you want to keep it at arena. Or maybe even moved to MC screen. Anyway, leaving it only at arena, a third party building, makes little sense.

There is no reason that it cannot be at two or even three places. We have place for it in the Arena and the Guild, mc profile I am not so sure about.

I suppose there should be access to characters profiles if you need full info about the character. I'm not how to combine it with draggable portraits though.

...? Did you not see or forget our older, fully functioning guild logic with interface? You already could enter chars profile from there, it was done in this way:

- Single click on portrait: Menu with actions appears in form of a dropdown (or "up", depending on cursor pos) screen (one of those was profile, we had items transfer and set to jobs in FG there as well, prolly more).
- Click + Hold down mouse button = Dragging.

Pictures that you use atm inside the guild look good, but take quite a lot of space. Maybe they should be smaller, or even cut off a bit.

Gismo's idea... I am just rolling with that. In my own interface, I managed to stuff everything on one screen, now we have like 5... so there is a lot of "extra" space we can use to add moar stuff in the future to it :D

===========
I've reread Ren'Py docs on screens yesterday, loads of new stuff there that I am not using, it's definitely worth the effort to update some screens and code all new once these new possibilities, I especially like the return of common scope for screens (our top stripe stopped reporting to tooltips, now it can be easily restored and loads of code in it simplified) Edit: Screen variables declared with define statement are still not passed to the use screen, pity :( LMAO, Edit 2: No... it is working, just not as I expected. Also the new "transpose" statement or something like this has a lot of potential... New faster and better vpgrid is also worth some attention, we can prolly use it for bestiary and in many other places as well.

Some other stuff as well like style prefix/suffix (latter is new) but that will require some getting use to.
« Last Edit: May 05, 2016, 04:05:17 AM by Xela »
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7349 on: May 05, 2016, 05:05:24 AM »
Yeap, it's been awhile since I used the old guild... As a side note, does it take additional efforts to use more than one mouse button in renpy?

I'd like to have a special, good looking frame for teams, with place for all three portraits, name, maybe something else. Just like the frame that I added for character profile where we inserted MPTrait icons. But I haven't found anything suitable yet.