devolution

Author Topic: General Discussion  (Read 3821280 times)

0 Members and 40 Guests are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5460 on: August 12, 2015, 07:45:38 AM »
I have to use labels most of the time only to jump to the beginning of the current menu in order to select something else. If only renpy had something like "jump current_menu"...
Code: [Select]
label main_label:
    $ show_some_menu = True
    while show_some_menu:
        menu:
            choices...

Code: [Select]
label main_label:
    texts...
    call my_menu #(or jump to it, you can return here if label was called)

label my_menu:
    menu:
        choice 1:
            jump my_menu

    return
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5461 on: August 12, 2015, 08:27:20 AM »
What is the meaning of while? You propose to make it false when we need to exit the menu?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5462 on: August 12, 2015, 08:36:41 AM »
What is the meaning of while? You propose to make it false when we need to exit the menu?

Yeap, it is useful for one off choices, like in our explanation of Arena. If you flip it to false, it will continue with the script, if you jump away, the loop will be broken, if you call another label, you will return to the next iteration after returning from called label.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5463 on: August 12, 2015, 08:42:37 AM »
I just leaned to name sh!t correctly and delete the variables after they are no longer in use at the end of events.
You can delete them? How?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5464 on: August 12, 2015, 08:58:09 AM »
Code: [Select]
$ del var_name
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5465 on: August 13, 2015, 12:45:55 PM »
Can't we do pixel hunting minigames for quests without bothering with gimp and hotspots? Like, I don't know, just read cursor coordinates or use transparent buttons?
In delphi we used shaped buttons components, ie transparent irregular polygons defined by coordinates of vertices.

I want to make an investigation-like minigame, and with menu, when you already see all possible options, it's just not good at all.
And cutting images like we do with maps is a lot of work, especially with complex bgs.
« Last Edit: August 14, 2015, 06:29:50 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5466 on: August 14, 2015, 08:14:25 AM »
You can do the same but I don't understand what you mean to use this for...
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5467 on: August 14, 2015, 08:31:18 AM »
Well, an example: a wardrobe with drawers. Player clicks on every drawer and MC checks what's inside it. Now imagine if we have to cut every drawer in gimp, like with maps.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5468 on: August 14, 2015, 08:35:48 AM »
What makes you think that it'll take less time to write matrix with coordinates for complex shapes?
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5469 on: August 14, 2015, 08:43:41 AM »
If you mean coordinates themselves, then there are rectangles with irregular angles most of the time, it's very simple to find coordinates of vertices since we already display cursor coordinates in dev mode.
And if you mean coding, I dunno, you tell me  :)

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5470 on: August 14, 2015, 08:54:34 AM »
Can you make a json with a full matrix for some picture, preferably at least two different objects? I need to see what we work with.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5471 on: August 14, 2015, 01:12:01 PM »
For that we need to display cursor coordinates everywhere in dev mode. The moment you leave building/city screens and go to VN mode coordinates disappear too.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5472 on: August 14, 2015, 01:39:43 PM »
For that we need to display cursor coordinates everywhere in dev mode. The moment you leave building/city screens and go to VN mode coordinates disappear too.

No, they shouldn't, it's just a screen that is shown on top of all others. Maybe you're testing vn stuff before it is shown? Also you can resize the image to bg size and any decent viewer will display the coords as well.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5473 on: August 14, 2015, 03:48:21 PM »
Yeap, I run it via pregame menu because otherwise some elements of gui will remain on the screen if I run it from GMs for example.
I pushed coordinates json in library/events/StoryI. If you run intro_story label, you'll see a room bg. I used coordinates for the top drawer and the basket in the corner.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5474 on: August 14, 2015, 05:14:17 PM »
I'll try to take a look at it tomorrow.

Edit:

Code: [Select]
+    "id": "Drawer_1",
+    "xy": [[868, 286], [1021, 263], [1020, 312], [867, 327]]

What do these coordinates represent?
« Last Edit: August 14, 2015, 05:16:19 PM by Xela »
Like what we're doing?