Comments (5)
don't have access to push the new change to a new branch
@MrZarfir You don't need push access to collaborate on an open source repository. You typically create a fork, and make a pull request from there. See this github documentation
Hower, in this case, I have created this pull request here: #64
from gamezero.jl.
@MrZarfir good find. Can you try adding a TTF_CloseFont(font)
call after the sf = TTF_Render_Text(...)
call and test if your problem goes away?
from gamezero.jl.
Also, ALSA lib conf.c:4563:(snd_config_update_r) cannot access file /usr/share/alsa/alsa.conf
pops up just before this error is thrown. Note that I have applied the fix as suggested in #42, and audio works well until this error.
from gamezero.jl.
Hi. I'm having the same problem with fonts. It seems like the following function loads a new instance of the same font file every time we create a new TextActor. The second line of the function creates a new TextActor and it never closes the TextActor.
function TextActor(text::String, font_name::String; font_size=24, color=Int[255,255,0,255], kv...)
font = TTF_OpenFont(file_path(font_name, :fonts), font_size)
sf = TTF_RenderText_Blended(font, text, SDL_Color(color...))
w, h = size(sf)
a = Actor(
text,
sf,
Rect(0, 0, Int(w), Int(h)),
[1.,1.],
0,
255,
Dict{Symbol,Any}()
)
for (k, v) in kv
setproperty!(a, k, v)
end
return a
end```
from gamezero.jl.
@MrZarfir good find. Can you try adding a
TTF_CloseFont(font)
call after thesf = TTF_Render_Text(...)
call and test if your problem goes away?
Indeed, my problem goes away after adding a closing call. I don't have access to push the new change to a new branch, but it would be appreciated if you can add this small change (unless you can give me access so I can push it).
Thank you for your quick response.
from gamezero.jl.
Related Issues (20)
- `Circle` does not have same properties as `Actor` e.g. actor.pos, actor.position HOT 2
- Impossible to include other files in the game HOT 5
- Make GameZero types better and more extensible HOT 2
- does not launch game window HOT 3
- UndefVarError: libsdl2_{ttf,image} not defined (Apple Silicon / M1 Mac) HOT 6
- Is GameZero.jl going to get any more updates? HOT 1
- Draw basic forms (Rect, Triangle) with angle
- How to prevent clearing of the screen? HOT 2
- Graphics not properly scaled on high dpi screen on Mac HOT 3
- Gamepad Controller Support HOT 1
- Unicode Chinese Characters (ttf) are not being shown HOT 5
- Unicode Chinese Characters (ttf) are not being shown HOT 2
- Control Render HOT 1
- New Bug HOT 1
- not working on julia 1.9 HOT 1
- This isn't an issue but I though it would be cool to share.
- Will GZ.jl eventually be able to do multiple files in a project? HOT 2
- Attempting to load resource files crashes HOT 1
- Create Actor from pixel data instead of image file HOT 1
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 gamezero.jl.