Author Topic: General Discussion  (Read 3821920 times)

0 Members and 24 Guests are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8565 on: October 09, 2016, 08:51:27 AM »
I dunno why _return doesn't work. But I don't really see any attempts to randomly place hidden buttons, so the lack of randomness is not surprising.

... ok, so: # Data is randomized outside of this screen!

Means that you have to randomize it outside of the screen. That's the freedom we talked about, I'll adjust the code accordingly.

I thing _return works but you've called it _result in your code.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8566 on: October 09, 2016, 09:18:42 AM »
I thing _return works but you've called it _result in your code.
Yeap, notepad+ autocorrect  :)

Quote
        # Expects a dict, like: {"hidden_cache_1": ((100, 100), (.1, .5)), "hidden_cache_2": ((50, 50), (.54, .10)), } If cache is found, screen (which should be called) will return: "hidden_cache_1" string. Tuple is the size in pixels.
I don't see a word about coordinates. Only about size. How am I supposed to randomize them?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8567 on: October 09, 2016, 09:21:22 AM »
I don't see a word about coordinates. Only about size. How am I supposed to randomize them?

We don't do coordinates there, it's alignments. I've just pushed a working version of the code, fish is sometimes really difficult to find :D

It should be pretty easy to get them to move around randomly without leaving the screen, I'll look into that as well tonight.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8568 on: October 09, 2016, 11:44:53 AM »
Ok, assuming that all code at the beach screen is correct:
Quote
            fish_list = []
            fish = list(i for i in items.values() if i.slot == "loot" and "Fishing" in i.locations and i.price <= hero.get_skill("fishing")) # Get a list of fishing items player is skilled enough to fish out! We should prolly add some normal items here as well.
            # Also maybe one super, buper item at very low chance of catching :D
            while len(fish_list) < 9:
                fish_list.append(random.choice(fish))
fish list contains all fishable items. Then we randomly pick 8 items from the list and create fish_list from them. This way there won't be all existing items at the same time, and also there will be a chance to have multiple copies of the same item on the screen.

Quote
                for i in fish_list:
                    temp= ((100, 100), (random.random(), random.random()))
                item = renpy.call_screen("fishing_area", temp)
                hero.add_item(item)
                hero.say("I caught %s!" % item.id)
Then we give every element random alignment and send them to the hidden matrix screen. And see one single webm there instead of 8.

Did you coded it to show only one area, by any chance? Because that's not how normal matrix works, it supports as many areas as you need at the same time.

I tested it with static picture to make sure it's not a webm related problem, the result is the same.
« Last Edit: October 09, 2016, 12:52:08 PM by DarkTl »

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8569 on: October 09, 2016, 12:42:47 PM »
I tested the hidden_area screen a bit using fishing code.

By default it shows zero areas for some reason. I used 500x500 buttons, impossible to miss even if it shows just one instead of 8.
Then I changed buttons alpha from .0001 to .01 and it started to show one button in the top left corner, without any randomness.

If I have to guess, 0001 alpha is too small for renpy to work with. Dunno why .01 works like that though.
« Last Edit: October 09, 2016, 12:46:40 PM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8570 on: October 09, 2016, 01:51:41 PM »
I'll make it work tonight, maybe add some movement as well.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8571 on: October 09, 2016, 05:11:53 PM »
I am a bit surprised that so many webs just run on the same channel this well but it seems to be working now.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8572 on: October 09, 2016, 05:52:59 PM »
http://www.netanimations.net/water_waves_ocean_ripple_high_quality_animated_gif.gif

Maybe we should use some animation like this :D

Going to clean up our Events/Quests module tomorrow and port it to BR. Later I'll clear something off pytfall's todo list unless you have something of high priority in mind/
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8573 on: October 10, 2016, 04:19:52 AM »
Lol, those moving webms look awesome  :D

I'm only concerned about hidden_area screen which will be needed for the city, without visible buttons. One thing is to show one area instead of eight, and another is
 
I tested the hidden_area screen a bit using fishing code.

By default it shows zero areas for some reason. I used 500x500 buttons, impossible to miss even if it shows just one instead of 8.
Then I changed buttons alpha from .0001 to .01 and it started to show one button in the top left corner, without any randomness.

If I have to guess, 0001 alpha is too small for renpy to work with. Dunno why .01 works like that though.
even though fishing screen at least showed one area randomly with the same code.
« Last Edit: October 10, 2016, 04:23:04 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8574 on: October 10, 2016, 04:33:20 AM »
I'll take a look at that tonight, we'll get it to work in the end :D

But city... it will be weird because random position in the water is fine but city is very different, unless you're looking for a bird or something.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8575 on: October 10, 2016, 04:57:21 AM »
It depends on the background.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8576 on: October 10, 2016, 05:14:26 AM »
http://www.netanimations.net/water_waves_ocean_ripple_high_quality_animated_gif.gif

Maybe we should use some animation like this :D
I found very good animated water textures. However, we probably will need a custom class for them. I'm talking about a list of 250 jpg images, 256x256 each. So in order to show it full screen we need to multiply them to cover the whole area. Doing it manually for all 250 images is a very bad scenario.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8577 on: October 10, 2016, 05:27:15 AM »
Are they? Animated I mean? We do not have a working OpenGL shared in Ren'Py that would reliably work on all or even most PCs...

NM, I've downloaded one. We have a class, we even have a system to load stuff like this automatically... you should know it by now :) I'll add one later.
« Last Edit: October 10, 2016, 05:29:57 AM by Xela »
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8578 on: October 10, 2016, 05:31:13 AM »
You download there an archive with 250 jpgs which become an animation after
Quote
    image water:
        "water1.jpg"
        pause 0.1
...
        "water250.jpg"
We never tried to multiply animations before though, as far as I know.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8579 on: October 10, 2016, 08:29:32 AM »
Thats not it. We have auto animations folder, you don't even need to declare the image. I'm on android atm, gonna do that when i get back.
Like what we're doing?