This function is a specific case. In my game movement happens in 8 direction.
When this function is called, step_x and step_y will be -1, 0, or 1. These basically define which direction the movement happens. dist is the total desired movement distance.
For the entire desired distance I move 1 unit (sort of like map pixels) at a time. I check to see if the next coordinate is open, and move one unit if it is.
If the next coordinate is blocked, and I'm moving diagonally, I try "sliding" along the wall. This means instead of checking in the (step_x,step_y) direction, I check (step_x,0) and (0,step_y) to see if those spaces are open. If so, just move in either X or Y instead of both.
TL;DR: if I can't move in the desired X,Y direction, try moving in just X or just Y.
In a time-based game, your Distance input will be variable based on delta_time since the last frame. That will be calculated before calling a function like this.
--
More thoughts:
This function returns False if it wasn't able to move the full distance. The calling code will change the entity's state from Running to Standing when this function returns false.
CruzR, that's definitely the core of the situation. If game data is a Collection, then I don't think it's possible for a copyleft art license to dictate the terms of the entire collection. With Share-Alike, you could still share the SA parts of a collection but not share the non-SA parts.
Contrast to CC-BY-NC. If you use the NC work in a collection, you can't charge for the entire collection (because you're charging for the NC work).
If this is definitely the case (game data is usually a Collection), I think we'd all like to know. We probably have plenty of closed game creators skipping BY-SA art because they're afraid it's "viral". Also we probably have some closed game creators using BY-SA art, and contributing artists not realizing that is possible.
--
Regardless: on these Wyverns I can offer a separate/specific license that removes the Attribution and Share-Alike requirements.
It's generally agreed that art and source code can be licensed separately. If you use CC-BY-SA art, your code doesn't need to be CC-BY-SA.
Example 2:
If a screenshot contains a CC-BY-SA work mixed with other works, the entire screenshot must be released CC-BY-SA.
Most likely this means you should not mix CC-BY-SA art with proprietary art. (Edit: at the very least, it's a grey area). But the code license is not affected either way.
I wouldn't count Flare in for non-iso games for the Liberated Pixel Cup. I doubt I can make that a priority betwen now and July 1.
However, I might decide to use Flare to make a contest entry. If so, Flare could end up having ortho support by the end of the contest. Depending on how ambitious I want to get with the contest.
People who see this art and can only think of "RPG" are underestimating things!
Examples:
Sticking closer to the standard RPG fare, we could make a regular JRPG. Or we could make a Tactics game. Or a multiplayer deathmatch action RPG.
Look at the indie game Wizorb. it's got old top-down RPG art but it's a Breakout game.
Let's get some nice creatures and we can do a vertical scroller "shooter" type game (ala Galaga or Galaxian) but with goblins or skeletons marching in weird formations.
Make a medieval Sim City with the town tile set, or Sims with the interior tile set
Make an anti-RPG where you lampshade all sorts of RPG tropes. You're a mayor who must protect his town from Adventurers/Heros. Put traps in the town barrels. Hire the heros to kill rats in your basement (oops, we keep the Arch-lich down there).
Additionally, we might not need to make "medieval" art to follow the spec? E.g. can I submit an office/cubicle tile set?
Chair fun! (use arrowkeys) http://clintbellanger.net/chair/
I wrote up this tutorial, hope you find it useful:
https://github.com/clintbellanger/flare/wiki/Tile-Set-Definitions
killinghurts, the art is released under CC-BY-SA 3.0 (or later).
As always though, drop me a private message and we can talk about alternate terms.
This function is a specific case. In my game movement happens in 8 direction.
When this function is called, step_x and step_y will be -1, 0, or 1. These basically define which direction the movement happens. dist is the total desired movement distance.
For the entire desired distance I move 1 unit (sort of like map pixels) at a time. I check to see if the next coordinate is open, and move one unit if it is.
If the next coordinate is blocked, and I'm moving diagonally, I try "sliding" along the wall. This means instead of checking in the (step_x,step_y) direction, I check (step_x,0) and (0,step_y) to see if those spaces are open. If so, just move in either X or Y instead of both.
TL;DR: if I can't move in the desired X,Y direction, try moving in just X or just Y.
In a time-based game, your Distance input will be variable based on delta_time since the last frame. That will be calculated before calling a function like this.
--
More thoughts:
This function returns False if it wasn't able to move the full distance. The calling code will change the entity's state from Running to Standing when this function returns false.
Acorn, the credits for that Grassland Tile Set show where the trees are from (OGA and Blendswap).
CruzR, that's definitely the core of the situation. If game data is a Collection, then I don't think it's possible for a copyleft art license to dictate the terms of the entire collection. With Share-Alike, you could still share the SA parts of a collection but not share the non-SA parts.
Contrast to CC-BY-NC. If you use the NC work in a collection, you can't charge for the entire collection (because you're charging for the NC work).
If this is definitely the case (game data is usually a Collection), I think we'd all like to know. We probably have plenty of closed game creators skipping BY-SA art because they're afraid it's "viral". Also we probably have some closed game creators using BY-SA art, and contributing artists not realizing that is possible.
--
Regardless: on these Wyverns I can offer a separate/specific license that removes the Attribution and Share-Alike requirements.
If you use CC-BY-SA art with other works, the resulting work must be CC-BY-SA.
http://wiki.creativecommons.org/Frequently_Asked_Questions#Can_I_combine...
Games are a weird corner case.
Example 1:
It's generally agreed that art and source code can be licensed separately. If you use CC-BY-SA art, your code doesn't need to be CC-BY-SA.
Example 2:
If a screenshot contains a CC-BY-SA work mixed with other works, the entire screenshot must be released CC-BY-SA.
Most likely this means you should not mix CC-BY-SA art with proprietary art. (Edit: at the very least, it's a grey area). But the code license is not affected either way.
proteinbeer,
Sometimes I change my oldest models from CC-BY-SA to CC-BY, and then to CC0.
But copyleft is important to me. I give this work freely because I want it to be used in free (as in freedom) works.
I do sell separate licenses for "closed" games.
I wouldn't count Flare in for non-iso games for the Liberated Pixel Cup. I doubt I can make that a priority betwen now and July 1.
However, I might decide to use Flare to make a contest entry. If so, Flare could end up having ortho support by the end of the contest. Depending on how ambitious I want to get with the contest.
People who see this art and can only think of "RPG" are underestimating things!
Examples:
Additionally, we might not need to make "medieval" art to follow the spec? E.g. can I submit an office/cubicle tile set?
Pages