Missing Squally/SquallyResources?
bronikowski opened this issue · 11 comments
I tried to build this project for fun but grabbing submodules throws an error:
fatal: clone of 'git@github.com:Squalr/SquallyResources.git' into submodule path '/home/emil/tmp/Squally/Resources' failed
I checked manually and well enough there's no repository named like that. Working of 20c5a6d committed to develop branch.
We're unfortunately not able to make the resources public:
We could not include the Resources folder in this repository, because a lot of the art in this game comes from asset stores. This means we have non-exclusive rights to the art, and cannot redistribute it for free. This means the Resources must be copied from a legally purchased copy of the game.
I'm open to suggestions for how we might resolve this -- perhaps we can make a repository with the art blurred/obfuscated in some way, so that people can at least run it
perhaps we can make a repository with the art blurred/obfuscated in some way,
@zcanann I don't believe we could get away with that legally.
My suggestion would be that we shouldn't add the resources as a submodule for now, as it yields the above error if you clone Squally with git clone --recurse-submodules git@github.com/Squalr/Squally or git submodule update --init.
If we do want to ship some kind of resources so that people who didn't purchase the game can run it in some capacity, we should first separate the assets we actually have exclusive rights to from the assets that we don't. We should distribute the assets we own publicly on Github and write a script or something that generates some temporary textures with the correct attributes and format for the rest.
@teknoman117 I think it's too difficult to account for licenses on a resource by resource basis, @zcanann had also suggested maybe some flat or striped colored texture replacements, we would need a thick outline so you could at least see the shapes though. We'll need some filler sound files as well though.
I'm just spit-balling here, and I do understand why it's not published, I just must have missed that part and went directly into bootstraping. The flat textures is a very good solution, but it might become time consuming depending on your resources sizes.
Maybe some kind of specs?
person.png, 32x32, alpha-channel
explosion.png, 20 frames, 32x32
etc.
@zcanann hmm I think @bronikowski might have a point here, maybe the resources file could include some metadata that allows us to generate this filler data on the fly as a fallback if the sprite fails to load. This would have the added benefit of preventing a crash in the event a sprite isn't included in the build for some odd reason.
Could we generate this in the GenerateResources.py file based on the actual included resource?
If you write up some spec format I'd would be willing to give a generator a go.
I have set up the repository structure as follows:
Resources/Public/
<--- assets we can releaseResources/Private/
<--- assets we cannot release, private repository
The details of how to move forward are quite tricky. Some factors to consider:
- Github LFS bandwidth limits (this repo is at 50GB/mo). The owner is responsible for all bandwidth, so one bad actor can kill the bandwidth entirely. Currently, the Resources are about 1.2GB.
- Github does not make it easy to make a private, read-only, invite-only repository. This would cost either $9/person, OR every person would have full repository access. Horrible.
- Users should be able to run the
GenerateResources.py
with or without thePrivate
folder. Currently, this iterates over all resource files and generates a C++ variable referencing the asset. (See:Source/Resources/*
)
These constraints make it very difficult to give people an obfuscated copy of resources. This is easy to do for those who had paid for the game, as we can just release the files through Steam as we are currently doing.
Possible solutions:
- Blur/obfuscate the
Private
repository, and figure out how to distribute it. - Generate fallback shapes to be drawn if the sprite cannot be loaded. Currently, the generated C++ files look like this:
Header:
#pragma once
#include <string>
namespace HexusResources
{
extern const std::string AvatarFrame;
}
CPP:
#include "HexusResources.h"
#include <string>
const std::string HexusResources::AvatarFrame = "Private/Hexus/AvatarFrame.png";
This could be changed from a string to a struct:
struct ResourceData
{
std::string path;
std::vector<Point> fallbackPolygon;
cocos2d::Color4B fallbackColor;
cocos2d::Size fallbackImageSize;
};
If the sprite fails to load, the fallback polygon can be rendered to a DrawNode
to approximate the original object. fallbackPolygon
and fallbackColor
could be generated in the GenerateResources.py
script. A little bit of image processing would be needed here.
Annoying side effect: If we went this route, we'd have to redo how Spriter loads animation files.
Even though it's a bit annoying, I like the idea of generating meta-data for the Resources. This solves any bandwidth/distribution problems, and makes it easier for people to pick up the game and compile it.
The less steps needed to get started, the better imo
As for sound, I'd rather not get too fancy -- no Private
resources folder? No sound.
Step 1)
I'll get it working with:
struct ResourceData
{
std::string path;
cocos2d::Size fallbackImageSize;
};
No image processing needed. Just generate a rectangle with a random color. Once this works, it'll be easier to move to polygons instead of rectangles.
At that point, we'll need to solve the image => color
and image => polygon
problem, ideally with python
👆 I'm open to help on this one
Edit: I've been fairly busy and this is a non-priority for me. My biggest focus is just finishing the game, these sorts of details are an after thought for me. For that reason it'll be awhile before I revisit this.
Would be glad to help if you want some. I usually do simple tutorial stuff in C++ and primarily use python for exploit development. But honestly I like your game's concept of teach game hacking which is something I've been interested in but never end up getting far cause let's face it reading boring tutorials on how to use cheat engine are annoying. Not to mention big difference between using a debugger on a simple console program versus using cheat engine or even a debugger on a game god it's a pain. But I got off topic I would gadly help you guys in anyway I can cause it be nice to be able to play this game without the art. I mean it won't look great but hey I'll at least be able to play and learn.