Author Topic: General Discussion  (Read 3821808 times)

0 Members and 25 Guests are viewing this topic.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6030 on: October 09, 2015, 10:19:09 AM »
Matrix is a very sensitive thing, I already know that I should always keep default size of window to write correct coordinates, so it's not surprising that it might have issues when the game for example scales down the window.

I tried to write matrix at work, a pc had 1280x1024 resolution, a laptop had 1280x720.
At home I have 1920x1080 for pc and 1360x768 for laptop, and matrix coordinates still work as intended for them. So I suppose big screens and resolutions are must have for making matrix. At least atm.

It's not a problem for players though. Once written correctly, matrix works everywhere. I think  :D
« Last Edit: October 09, 2015, 10:28:47 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6031 on: October 09, 2015, 11:08:34 AM »
I'd expect it to work on any computer and with any window size once it was setup properly. There are also normalization options in newer Ren'Py versions that I haven't looked into yet. It's odd that there are machines that mess up your mapping effort while Ren'Py reports true window size, that shouldn't be possible with sound code.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6032 on: October 09, 2015, 11:36:41 AM »
I've noticed that coordinates were a bit odd. Currently max x is 1279 and max y is 719, as expected. But at pcs where I couldn't write correct matrix max values were much less, even though the window had default size in theory.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6033 on: October 09, 2015, 11:43:03 AM »
Actually, it's very simple to emulate on any pc. Just tried to set low resolution, and max matrix coordinates decreasing depending on how low it is. And it effectively kills any attempts to write correct matrix.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6034 on: October 09, 2015, 12:33:45 PM »
Ok, but you did name one resolution that was lower than the true size of 1280x720. If the res of your monitor is smaller than that, there could be issues.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6035 on: October 09, 2015, 12:52:23 PM »
Not exactly. If you have 1280x720 or slightly more, you have to use full screen mode, otherwise it still won't be enough to get true coordinates.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6036 on: October 09, 2015, 01:53:12 PM »
You can push the game outside of the screen, it should still report proper coords, but fullscreen/window on large res is definitely more convenient.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6037 on: October 10, 2015, 04:59:18 AM »
I don't know why you told Pseudo back then that we have enough gifts, we have only 20, and many of them are general, ie cannot be very positive or negative (like rings). It's not nearly enough for the system to work as intended. MPtraits alone require 20-30 different gifts to be interesting and complex enough, and there are other traits too.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6038 on: October 10, 2015, 01:06:53 PM »
I thought that tasks given to him were more important, we have a good amount of icons of all kinds to make more gifts (I think).
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6039 on: October 11, 2015, 11:05:29 AM »
Xela, I need a function that organizes random fights using mobs from a list of mobs that you can set somewhere, with mobs levels of course.
It should randomly select how many mobs there will be (from 1 to 3) and which mobs there will be (using the ones from the list).

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6040 on: October 11, 2015, 12:04:35 PM »
Do we really need functions for things like these? It's one or two extra lines of code in addition to normal combat setup, I can write you example of the code if you like but this is something you should be able to do on your own if you went through the python academy (you never said if you finished that btw.).
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6041 on: October 11, 2015, 12:27:08 PM »
I'm not asking you to write a function, I would prefer an example indeed  :D

I finished the academy. It's not as good as you may think, since we work not with a pure python, but also with renpy.

I have a huge book about Delphi with 1,5 thousands pages that covers most of its aspects. Compare it to academy, where they give a few dozens simple, similar tasks.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6042 on: October 11, 2015, 01:30:38 PM »
Well, you know how to create mobs and setup a combat scenario, so the only thing you need is a list and two or three random elements from it:

Code: [Select]
rand_mobs = ["Goblin", "Giraffe", "Slimeball"]
enemy_team = Team(name="Enemy Team")
for i in range(randint(1, 2)):
    mob = build_mob(id=choice(rand_mobs), level=randint(50, 55))
    mob.controller = BE_AI(mob)
    enemy_team.add(mob)

Something like this should work...
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6043 on: October 11, 2015, 01:47:29 PM »
I wanted to quickly use a mob portrait in dialogue without making an npc, and wrote it like
Quote
init
    $ enemy_soldier = Character("Guard", color=white, what_color=white, show_two_window=True, show_side_image="content/npc/mobs/ct1.png")
...
enemy_soldier "Who the hell are you?!"
Surprisingly, the game did not resized his portrait to fit into the portrait window (it's too big for the window), so I had to use  show_side_image=ProportionalScale("content/npc/mobs/ct1.png", 120, 120) instead.
Is it a normal behavior? Shouldn't the game resize them by itself?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6044 on: October 11, 2015, 01:58:47 PM »
I wanted to quickly use a mob portrait in dialogue without making an npc, and wrote it likeSurprisingly, the game did not resized his portrait to fit into the portrait window (it's too big for the window), so I had to use  show_side_image=ProportionalScale("content/npc/mobs/ct1.png", 120, 120) instead.
Is it a normal behavior? Shouldn't the game resize them by itself?

That's perfectly normal, we did have automatic re-sizing in the past but that was commented out:

Code: [Select]
    if side_image:
        # We supply this here since it's always the same value for all characters. This can easiely be moved to the declararion of classes.
        # add ProportionalScale(side_image, 120, 120) xalign 0.138 yalign 0.968 #1.0
        add side_image xalign 0.138 yalign 0.968
    else:
        add SideImage() xalign 0.0 yalign 1.0

I don't remember why but there was a reason, most likely we show none-image like displayable as portraits somewhere which will crash the game with the commented out code. It wouldn't be hard to write a transform resize than can resize anything but that's prolly an overkill.
Like what we're doing?