Welcome, Guest. Please login or register. Did you miss your activation email?

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.


Messages - tuckerlein

Pages: [1]
1
SFML projects / Re: Squatbot: A Mobile Platformer
« on: September 02, 2018, 10:22:29 pm »
Few updates for Squatbot:

We've released an update with integration with Zapic which lets you challenge your friends to various challenges in Squatbot.



And I'm excited to say we've been selected for Boston FIG's indie showcase September 29th!
https://www.bostonfig.com/exhibitor/squatbot/

I think our whole team will be there, so if you're at the convention stop by and say hi and we can talk SFML!

2
SFML projects / Re: Squatbot: A Mobile Platformer
« on: June 30, 2018, 06:31:37 pm »
I'm happy to say that Squatbot has now been officially released on both iOS and Android!




3
SFML projects / Re: Squatbot: A Mobile Platformer
« on: May 02, 2018, 06:29:34 pm »
Thanks! We're evaluating a release on PC after we get the mobile release sorted. Our current plan is to launch a free ad-supported version and a pro paid version to remove all ads side-by-side on iOS and Android. After the launch we're going to look into maybe a cheap or donation-incentive release on itch.io and other similar markets. Our build system we wrote for this can distribute to all 3 major PC OSes so at this point it's just porting over all the features optimized for mobile to a controller based input scheme (mainly menus).

This has been the first mobile game we as a team developed, so the lessons learned are almost wrapped up into the whole experience of getting it to build, getting it on the app stores, and currently how to market it. I'm the lead programmer and I can lay out a lot of the technical stuff that has been helpful for us.

A few things off the top of my head I really valued:
1. Instead of building our dependencies once or including prebuilt libs we built a C++ build system that automatically pulls down the source code from our dependencies, applies any patches we need to them, and builds them. This allowed us, on several occasions, to quickly fuzzy search for SFML symbols in our IDE to see how SFML implements something, check if a perceived problem might come from SFML, or even fix up SFML to our liking and make a patch out of it (always tried to give back with a PR into SFML when it was wise to do so). Most of our patches related to Android and iOS bugs or CMake configuration that didn't play nice with our methodology of CMake.

This didn't just extend to SFML, but rather any of the dependencies Squatbot had. We used rapidjson for JSON parsing, SFML for all the SFML-y stuff, and then our engine Ancona is pulled down and built in the same way as the other dependencies. Parallel work on the engine + game was incredibly easy with this tactic.

You can find our build system source here: https://github.com/ild-games/Raft. An example command would be something like
raft build -r -p iOS -a x86_64
which would build our game & dependencies in release mode for iOS with an architecture of x86_64 to test it out in the simulator.

2. Instead of OS compiler directives all over the code we utilized a common pattern for OS specific code using CMake and multiple source files, 1 for each major OS. To take an example, our logging macro needs a different implementation on Android and iOS then it does on PC, so we have one header defining the macro, and then folders named after all the implemented OSes. Within each folder is a source file that implements the header in whatever way is necessary. Then finally we have a CMake file alongside the header that picks the correct source file based on the current platform chosen for the build. You can see this exact sample in our engine here:
Header
Android source
iOS source
CMakeLists.txt next to the header

3. Mobile development with one codebase is hard... but CMake can do it! I don't recommend this approach, but we actually setup CMake to create a fully loaded Xcode project every time you rebuild the game when building for iOS / macOS. This is a lesson in how powerful CMake customization is, because we can set nearly all required Xcode attributes needed for a released iPhone app. It was incredibly difficult, and not 100% there yet. Most people would make their Xcode project once and have it look towards the build folders for stuff like your dependency libs (in fact, this is the exact approach we used for Android).

4. Test early, and often, with as many phones as you can get your hands on. I have an iPhone 4 & 6, and a Motorola X4 for testing, but I've been able to utilize friends and family for testing on a wide array of modern devices. This has let us catch some problems before release. (The Samsung Galaxy line of devices seems completely broken with SFML RenderTextures in a lot of weird ways. See this thread for details: https://en.sfml-dev.org/forums/index.php?topic=23083.msg160350#msg160350)


4
SFML projects / Squatbot: A Mobile Platformer
« on: May 01, 2018, 10:04:13 pm »


Squatbot is a mobile platformer made by ILD Games using SFML, released on iOS and Android.













Myself and a friend started working on a game engine using SFML a few years back as a hobby project. This engine set out to be suitable for 2D cross platform games targeting Windows, macOS, Linux, iOS, and Android. We chose SFML due to its simplicity in API design and cross platform capabilities for all platforms we desired. The engine is open source and can be found here:
https://github.com/ild-games/Ancona

Alongside the engine we developed an editor using web canvas technologies and Electron. The goal was to build an engine agnostic base for a game editor and then write necessary modules to make it compatible with our Ancona game engine. The editor is also open source and is available here:
https://github.com/ild-games/duckling-legacy

Eventually another friend approached us with the idea for a unique control scheme for a mobile platformer. Joined by that friend and another we decided to use the idea as an opportunity to actually build a game with our engine and that project became Squatbot.

Game Description
Squatbot brings tight, momentum-based platforming to mobile phones, with a control scheme designed specifically for touch screens. By tying the player's acceleration to their jump, Squatbot only requires two inputs - A tap on the left side of the screen to hop left, or a tap on the right side of the screen to hop right.

These minimalist controls open the door to challenging, kinetic level design, with Squatbot hopping, skipping, and jumping through exciting challenges.

Features
  • Tight, momentum-based platforming controls
  • Challenging, hand-crafted levels
  • An endless mode where the focus is on executing just one more perfect jump
Videos



We're putting the finishing touches on it and getting more levels done for a full release in the coming months. SFML's been a great library to work with, we've learned a lot and I wish I had the time to start fresh with the engine with all the lessons learned. Our biggest challenge has been mobile integration, but SFML is quickly nearing the point where it is definitely viable (hoping for a bump from OpenGL ES 1.1 soon!). SFML 2.5 will be a great release for mobile and I hope to see more mobile games on the market made in SFML in the near future!

EDIT: The game has been released and the links to the stores above have been updated!

5
Yes, I mean Android devices. Specifically I've seen it on Galaxy Note 5 and a Galaxy S6. Other Android devices such as Moto X4, Pixel 2, and Moto X Pure do not have this problem. iPhone also works as expected.

6
Hello,

Note SFML version I'm on is commit 013d053 (https://github.com/SFML/SFML/commit/013d053277c980946bc7761a2a088f1cbb788f8c), which is only a handful of commits behind master at the time of writing this. On this version because of a few key iOS features.

I'm seeing behavior that is causing absolute corruption of the window's rendering when on Samsung devices (any other mobile device renders as expected, including all desktops (Windows, Mac, and Linux) that I've tested it on). The problem only happens when I use a RenderTexture to render onto, and then finally render that RenderTexture to the window. Sometimes, the output simply appears flipped, other times it's completely broken. Here are a couple of examples:



And here is the code used to render:
_renderTexture->clear(sf::Color(255, 255, 255, 0));

for (auto & camera : _cameras) {
    camera->Draw(*_renderTexture, delta);
}

_renderTexture->display();
_windowSprite->setTexture(_renderTexture->getTexture());
_window.setView(*_renderView);
sf::RenderStates states(sf::BlendNone);
_window.draw(*_windowSprite, states);

A few things to note:
  • The RenderTexture is being cleared with white clear color (saw the clear color suggestion here: https://en.sfml-dev.org/forums/index.php?topic=9350.msg83986#msg83986)
  • I am calling RenderTexture::display before actually rendering it to the window.
  • This does work as expected on almost all devices, just seems to be the Galaxy line of mobile devices that definitely don't work

It's also worth mentioning that I used to not do this and instead drew everything individually to the RenderWindow instead. This caused a weird visual problem when rendering textures that had setRepeating(true) called on them in certain scaled windows. At certain window scales you would see the repeating texture repeat 1 pixel too much and render where it shouldn't be rendering. You can see an example here: (note the thin green lines under the platforms, these lines are actually the top of the green ground being repeated in the Y direction)


These textures do not have setSmooth(true) called on them, so the OpenGL clamping should prevent this. Rendering out to a RenderTexture like my code example above does indeed fix this problem (maybe some auto sampling done by SFML when rendering to a non ideal window size?).

I've currently reverted since having this repeating texture visual bug is a lot better than the Samsung RenderTexture problem. Does anyone have any ideas on how to potentially address this?

Pages: [1]
anything