Comments (15)
@shayneoneill I've created a Tilengine Homebrew Tap that solves this problem.
from tilengine.
Thanks for checking it! The error you see is because I have installed the official SDL2 framework from their website, which goes to /Library/Frameworks. Its path seems to be hard-coded into the final executable by the linker when using the -framework SDL2
switch, so it expects to find it there. As I don't know if end users running tilengine have SDL2 as a macOS framework or as a unix shared library in /usr/local/, there must be a way to make the library search on both places, and not to force people to have an explicit version. I'll done a bit of research about this
from tilengine.
Yep, looks like your right about the official distro putting it in a different place than homebrew.
Ok looking here:
https://ubuntuforums.org/showthread.php?t=1573787
It seems that it might be possible to specify multiple rpaths. Thats a linux link, but the wording of install_name_tool man page seems to imply that it might be the case also for osx..
Off topic, I note that the examples seem to show significant tearing on my mac, even with the vsync hook turned on. Does the library have any facilities for double buffering or anything like that?
from tilengine.
After reading this SDL section, it's clear that one must choose between the macOS path (link against Framework) or the unix path (link against a .dylib). It's not possible to have both at once.
Homebrew looks like a great idea, as Darwin is a heavily stripped-down unix that lacks so many standard components. But if I link against the .dylib, I'll force users to install a package manager and then install a package, whereas if I link against the framework, users will just have to download and install a friendly .dmg file that weights one mb. I don't know how fragmented is the developer community in Mac, the amount of devs that just work with frameworks vs the ones using (or willing to use) Homebrew. Maybe I should release both versions, and let the end user choose...
In regard to the screen tearing, I'ts the SDL and video driver that manages this. Tilengine itself just sees an array of pixels. This is the source code of the windowing component, you can bypass the built-in one and use the source as a basis to implement your own, changing function names of course so they don't clash.
from tilengine.
Thats a fantastic solution. Good work
from tilengine.
Hi everyone!
After running
install_name_tool -add_rpath /usr/local/lib /usr/local/lib/Tilengine.dylib
...I get this error:
python [master●] % python test.py
Traceback (most recent call last):
File "test.py", line 1, in <module>
import tilengine as tln
File "/Users/tasillo/Dev/Tilengine/samples/python/tilengine.py", line 567, in <module>
_tln.TLN_EnableInput.argtypes = [c_int, c_bool]
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 378, in __getattr__
func = self.__getitem__(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 383, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(0x7fada7f053c0, TLN_EnableInput): symbol not found
Any ideas why this symbol is not found? Thanks!
PS: I've also installed the Homebrew version but did not fix it.
from tilengine.
It seems that the tilengine.dylib binary is not up to date; the python binding is looking for a function that was recently added but can't find it. I'll check that everything is up to date in the repository.
Have you downloaded the whole project from GitHub, or one of the packages from itch.io?
from tilengine.
Thanks for checking it @megamarc!
I've used the whole project from Github.
Thanks!
from tilengine.
Hey @megamarc,
Any luck with that function on the Python binding?
Thanks!
from tilengine.
Sorry for the delay, I've been busy last week. I've clean rebuilt and commited the binary library, size is different now so I suspect last build was broken. I've tested inside my virtual machine environment and everything seems ok now. Can you please confirm this?
from tilengine.
Thanks a lot @megamarc! Worked like a charm.
I'd like to make an Axelay fan game and your library is perfect for that. You even added an example in Python on how to do the vertical levels sky effect. Brilliant!
Moltes gràcies!
from tilengine.
De res :-)
Despite popular belief, 3D levels in Axelay didn't use Mode-7 at all, they used just raster effects altering vertical start position to fake the rolling effect. That's why the scaling was only in vertical direction and not in horizontal, but it gained two parallax layers that was not possible with regular mode-7. It's the same technique used in MegaDrive's Sonic 3D Blast bonus levels:
https://www.youtube.com/watch?v=RFx1XFzbICg
from tilengine.
Amazing! Thanks for the video and the explanation @megamarc ! Really appreciate it.
I wanted to assist to the latest RetroGaming BCN event where you did a presentation but unfortunately I couldn't. Maybe next time!
Thanks for your help man
from tilengine.
Thanks for your interest and enthusiasm! I appreciate it. I hope there will be future retrogaming events where I can participate again.
By the way, we're both catalan, feel free to PM me and see if we can collaborate in your project!
from tilengine.
Thanks a lot @megamarc , dully noted! :)
I will keep you posted on the progress. Thanks!
from tilengine.
Related Issues (20)
- Sprite rotation capabilities HOT 1
- Memory corruption in "shooter" example HOT 3
- Crash when resuming animation HOT 1
- Unable to build on MacOS HOT 1
- non-initialized blinking borders when switching to fullscreen HOT 2
- V bindings HOT 1
- Tileset ordering in tmx file causing exception HOT 1
- Get tile returns incorrect tiles info type HOT 1
- Unable to build Tilengine HOT 1
- Actor.c from Samples dir, doesn't work HOT 1
- libretro port HOT 2
- Sprite not drawn after calling TLN_SetNextSprite HOT 2
- Tiled integration HOT 2
- real game source code HOT 1
- Getter for Layers, Tilemaps, Sprites, Tiles, ..., user data for callbacks, palette tile attribute, multiple tilesets per tilemap, and bug with TLN_SetTilemapTile()
- Pausing Specific Animations HOT 3
- Issues with custom overlay HOT 5
- Steps to reproduce the crash on exit in TLN_DeleteTileset
- Map layer with multiple .tsx files causes memory issues HOT 1
- TLN_GetTilemapTileset2 returns None/NULL HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tilengine.