Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - alexgleason

#76
Your scripts / Re: Enemy that runs away from you
October 24, 2018, 11:10:29 PM
Haha this is awesome!
#77
Development / How do PNG fonts work?
October 24, 2018, 10:03:38 PM
I noticed the docs say that .png fonts are supported. I'm hoping I can get clarity on what this means exactly.


  • Is the PNG font a recognized standard? Eg do multiple programs use the same format
  • Is it just a row of characters in a specific order?
  • Are only monospace fonts supported?
  • Does it have to be 8px?
  • Are there any examples?

Thanks!
#78
Development / Re: Stopping a sound effect
October 21, 2018, 07:39:05 PM
Quote from: llamazing on October 21, 2018, 07:35:09 PM
If your sound has a short loop then it should simply be a matter of having a timer looping continuously until stopped that plays the sound over and over.

If the sound has a long loop this could be problematic because once you stop the timer the sound would still continue playing until the end of the loop.

It's a vacuum sound, with multiple phases as the power of the vacuum increases the longer you hold the button. Guess I'm gonna try breaking my sfx into tiny pieces and use timers. Thanks!
#79
Development / Stopping a sound effect
October 21, 2018, 07:17:12 PM
Hi all, wondering if there's any way to do this or any plans to add it? I have an item that should make a continuous sound until stopped.
#80
General discussion / Re: Installing Solarus in ubuntu
October 21, 2018, 05:54:26 PM
You don't need to compile it. See this thread for instructions on using the PPA: http://forum.solarus-games.org/index.php?topic=1002.msg7162#msg7162

In short, it's these 4 commands, run one at a time:


sudo echo "deb http://download.opensuse.org/repositories/home:/nate-devv:/solarus-debian/xUbuntu_16.04/ ./" > /etc/apt/sources.list.d/solarus.list
wget -qO - http://download.opensuse.org/repositories/home:/nate-devv:/solarus-debian/xUbuntu_16.04/Release.key | sudo apt-key add -
sudo apt update
sudo apt install -y solarus solarus-quest-editor


If the first command complains about the path, try `sudo mkdir -p /etc/apt/sources.list.d/`
#81
So, I've been learning Lua. For a while I was using pairs() to loop over an array, but later learned that ipairs() is actually the behavior I want. So I went back and edited my game's scripts, and wound up with this totally incoherent commit message: https://gitlab.com/voadi/voadi/commit/22885ca8e0ba0e1ab68a07422163f56b0b8e1048

I had written "Always use ipairs!! Now that I know the difference", but Bash interpreted my double exclamation points as a bang command. Geez... maybe I'll just write my commit messages into nano from now on instead of using the git commit -m <message> syntax.
#82
Your projects / Re: Ocean's Heart
October 20, 2018, 08:14:35 PM
Quote from: Max on October 20, 2018, 06:35:07 PM
that is what copywrite protection is designed to prevent

Oh I forgot to address this one part. The original purpose of copyright law was to benefit society as a whole. The deal was that authors would receive protections for their work, which would incentivize them to write more books, which would mean that society as a whole would receive more books. It was a good deal, at the time. Printing machines were large and expensive, so normal people couldn't copy books. Therefore, the "don't copy" rule applied only to print manufacturers.

These days we have computers with high-speed internet. Everyone has the capacity to distribute works of authorship, not just print shops. We have the ability to educate the world for free, but we keep research papers and textbooks locked up, and we have the police raid people's homes and imprison them for sharing. So, I argue that copyright law is no longer serving its original purpose of improving the greater-good of society. In fact, it's Orwellian and oppressive more than it is liberating.
#83
Your projects / Re: Ocean's Heart
October 20, 2018, 08:05:56 PM
Quote from: Max on October 20, 2018, 06:35:07 PM
Haha, post away. And yeah, I figured you weren't against selling anything.

So, to ask you the cliche "would you still be vegan even on a desert island" type question, what about the idea of someone taking your unprotected work and as a whole game, or a loosely reskinned one, and going and selling it? Maybe it's unlikely, but that is what copywrite protection is designed to prevent, and it does happen.

It's a good question. The simple answer, in theory, is that the exposure you gain from releasing a freely-licensed work will counteract any perceived loss in sales. For example, if someone else is honestly able to market and sell your game better than you are, they will have broadened the game's audience beyond your own capacity, which will drive a fraction of these people back to you.

I don't have any case studies and I'm not an economist, but for an indie creator I think this makes intuitive sense. Let them sell it, just ask them to give you attribution (CC-BY does legally require this, so you could sue if they didn't attribute you). Giving attribution is a pretty small ask, and I often wonder how things could have been different if Urban Outfitters would have just given credit for the indie designs they reused.

As a side note, I have mixed feelings about Nina Paley's commitment to "legal nonviolence." I think using CC-BY-SA and GPL to stand up to corporations and force them to share is a good thing.

Feel free to keep sending question, counterarguments, what have you. :) PM me if you don't want to continue in the thread. I'm having fun with this.
#84
Your projects / Re: Ocean's Heart
October 20, 2018, 03:39:49 PM
Sorry for quadruple post, but I wanted to clarify that I'm not saying don't sell it. I'm planning to sell VOADI, and I ask for money on Patreon. All I'm saying is, I am encoraging people to copy and share my work and I won't threaten to sue them. I think this is better for the game dev and better for society.

(Also the bit about "being burned for giving" had nothing to do with intellectual property. I was just ranting a bit, whoops. :P)
#85
Quote from: Phygelius on October 20, 2018, 02:00:08 PM
Okay, thank you for your reply =)
Where can I find the quest data? I downloaded the full game, but I can't open it in the editor...
I managed to fix the gaps with new tiles, but I think it would be much better with overlapping tiles ;)

Direct download for latest version: https://gitlab.com/solarus-games/zsdx/-/archive/zsdx-1.11.0/zsdx-zsdx-1.11.0.zip

Repo is here: https://gitlab.com/solarus-games/zsdx
#86
Your projects / Re: Ocean's Heart
October 19, 2018, 12:38:33 AM
#87
Your projects / Re: Ocean's Heart
October 18, 2018, 08:31:34 PM
Quote from: Max on October 18, 2018, 03:31:33 AM
Anyway, I've definitely gotten a wonderful dose of having to reassess my preconceptions from talking about you, so just know I appreciate that

I know! Orange you glad we had this conversation??

Quote from: Max on October 18, 2018, 03:31:33 AM
I really like the way you think, Alex : )

Likewise!

Quote from: Max on October 18, 2018, 03:31:33 AM
I think the stance I've been taking in my head- that it's possible my game would do so well that the value of my assets would be considerable- is less optimistic, and honestly more egotistical. So thanks for bringing it up, because that attitude, even when not consciously embraced, hurts the potential value of what I create as a shared resource, so I'd like to let it go. Maybe the individualistic mindset of valuing one's own creations as personal brand assets above the value they have as a shared resource is probably symptomatic of undervaluing our community, and that's a shitty thing to realize about myself. But realizing it is necessary to addressing it! And will help me be more compassionate toward my community going forward.

I agree, this is the same realization I came to. I started out as an artist, and the open source software thing really shook up my ideas about intellectual property. Now I mostly write code, but I always feel really satisfied to share my other creations. I have gone through great lengths to reorganize my life around giving. And I've been burned by people many times who want to take advantage of that, but I try to focus on the people who are giving back.

We've built a society where the default option is to not give. You quite literally have to go against the grain of society and become a "free thinker" or whatever to see an alternative path. But maybe if we all gave, we'd all have so much more.

Even though some people will burn me, I'm still indebted to all the people - dead or alive - who gave me things I didn't ask for. To Bach, da Vinci, Linux, Solarus, and now you. Nintendo never game me anything that didn't come with a price tag and a EULA, but I don't live for them. I would choose for Ocean's Heart and Children of Solarus to become notorious even at the cost of A Link to the Past being totally forgotten.

On that note, I'd like to introduce you to Nina Paley. She's a professional artist and copyright abolitionist:


Needless to say, she's a personal hero of mine, lol. If you click any of these links and ignore the rest, please choose the first one.

Quote from: Max on October 18, 2018, 03:31:33 AM
I still think about the potential negative impacts of releasing assets designed around a specific scenario and setting.
Quote from: Max on October 18, 2018, 03:31:33 AM
And I'm not a teacher, trying to nourish and refine some creativity muscle.

Kinda seems like you addressed your own point. I get your concern, especially because throughout the creation of my game I've been repeatedly making stupid novice mistakes. And I realize these things, and ask myself, "hasn't someone already figured this out before?" But unless you want to be a teacher, I wouldn't worry too much about this. I think it's a separate problem. My concern with freely-licensed assets is that people have been deprived the freedom to copy and share, and I want to take steps to counteract that. To hopefully foster a culture around giving.

But if you wanted to, you could be a teacher. Why not? Include some advice with your assets, or write some blog posts about things you learned about game design. People who are eager to learn will learn. For the rest, we might just have to accept they will be creating mushroom forests.

There are multiple ways you could present your game assets. If you present them all in the context of "Ocean's Heart graphics" rather than "generic zelda-like tileset" then at least people can recognize it as a part of a whole project, which might make them more considerate of the way the use it.

Quote from: Max on October 18, 2018, 03:31:33 AM
Anyway, thanks for having a real discussion on the internet! You've actually changed my mind on a lot of things.

Totally, and likewise! I feel kinda hopeful for humanity now, hooray!
#88
Your projects / Re: Ocean's Heart
October 18, 2018, 07:18:24 PM
Quote from: Max on October 18, 2018, 03:31:33 AM
A full half of them have weird sidequest about finding a stolen orange with just the peel as a clue, or a specific NPC that only eats oranges. After some thought... this alternate timeline has almost no measurable downsides. The people of the alternate future have you to thank, Alex.

Glad we're finally on the same page. ;)

https://vimeo.com/295845034 password: naranja

Vegan on a Desert Island officially takes place in the same fictional universe as Ocean's Heart! This is canon.
#89
I created a far superior version. It's encapsulated entirely within the custom entity script itself:

Code ( lua) Select

-- ♡ Copying is an act of love. Please copy and share.

local entity = ...
local game = entity:get_game()
local map = entity:get_map()
local hero = game:get_hero()

-- Name of the savegame variable for this map and model
local valname = string.format("entitystate__%s__%s", map:get_id(), entity:get_model())

-- Takes in a trash_state and converts it to a string for
-- storage into a savegame variable
local function state_tostring(state)
  local chars = {}
  for i, v in ipairs(state) do
    table.insert(chars, tostring(v))
  end
  return table.concat(chars, "")
end

-- Takes a state string and returns a table
local function state_fromstring(str)
  if str == nil then return {} end
  local state = {}
  for i=1, #str do
    local n = tonumber(str:sub(i, i))
    state[i] = n
  end
  return state
end

-- Event called when the custom entity is initialized.
function entity:on_created()

  -- Initialize the properties of your custom entity here,
  -- like the sprite, the size, and whether it can traverse other
  -- entities and be traversed by them.
  entity:set_traversable_by("hero", false)

  -- Initialize some variables in the map
  if map._trash_count == nil then map._trash_count = 1 end
  if map._trash_state == nil then
    map._trash_state = state_fromstring(game:get_value(valname))
  end

  -- Add an ID to this entity by the order it was created
  self._id = map._trash_count
  map._trash_count = map._trash_count + 1 -- increment counter

  -- Initialize the trash state
  if map._trash_state[self._id] == nil then
    map._trash_state[self._id] = 1
  end

  -- Remove this if it was already sucked up
  if map._trash_state[self._id] == 0 then
    self:remove()
  end
end

-- Like remove(), but not called when the map ends
function entity:destroy()
  if self.on_destroyed ~= nil then
    self:on_destroyed()
  end
  self:remove()
end

-- Update the trash state table and save
function entity:on_destroyed()
  map._trash_state[self._id] = 0
  local state_string = state_tostring(map._trash_state)
  print(state_string)
  game:set_value(valname, state_string) -- Save the trash state
end


This custom entity can now be placed in any map, and calling entity:destroy() will cause it to save the state of that entity for that map.

Best of all, it requires not a single loop over the map entities!
#90
Development / Re: Multi-events as the default?
October 17, 2018, 09:56:13 PM
I was able to achieve what I wanted by manipulating the map from the context of an item script. I ended up with way less code (and cleaner code), so I'm wondering if my suggestion here is bad practice? I'm not really sure.