hello, a new user
hi
i was looking for a cross-plattform (mac/win) game library that is nice to use. c# would be nice too. now i found it. your lib looks very nice and well designed.
and it seems you are still working on it (but the website is very out of date and not so good documented but svn is very new).
i havent tried a lot yet (just found it), but already one question occured.
is there any easy way to load a fontfile? i found FontSurface.BitmapMonospace() which can help but it would be easier if i can load a ttf directly. is there a way or do i have to convert it to a bitmap font?
thanks for the answer in advance and i hope i will use your library a long time (im sick of searching).
No, there is no way to load a ttf directly. There are several problems with this approach, the foremost being that .NET has no way to do that. On top of that, different OS's have different font rendering code, so patching into native methods to render fonts would give platform-dependent results. Otherwise, one needs a dependency on an external library like FreeType, which I don't really want. So the current solution, which provides perfectly platform-independent results (ie. glyph metrics and appearance are 100% identical on different platforms) is to use bitmap fonts. The drawback is one has to create a bitmap for every font size and style required.
If your font needs are simple, there are some built-in fonts listed as static members in the FontSurface class, like FontSurface.AgateSans14 for a 14-point sans serif (if you're using the SVN).
There is a font creator application in the Tools directory (build it with the AgateTools solution) that you can use. To do this, install the font on your computer, and then use the FontCreator to convert it to a bitmap font with a resources file. Then load the font from the resource file with
You can store multiple fonts in the same resources file.
thanks, thats easy enough
hi again
i cant build the font creator because i get an exception that the drivers folder in AgateLibSource\Binaries\Debug cant be found.
this was (i guess) because this line
AgateFileProvider.Assemblies.AddPath("../../Drivers");should be
AgateFileProvider.Assemblies.AddPath("../../../../Drivers");but then i get the message "no display drivers registered" so i had to add a reference to agateotk myself.
im not sure if this was on purpose, but i thought i let you know.
You need to compile the drivers, too.
If you use the svn trunk you can open the VS solution file and build all sub projects like AgateLib, drivers and the tools.
Ok, the build issues for tools should be fixed in rev. 1184.
hi
i dont want to make a new thread for this.
is there any possibility to add a common interface to sprite and surface? they have basicly the same methods but some differ which is quite annoying. for example there is no sprite.draw(x,y,rotationcenterx,rotationcentery).
how would i set the sprite rotationcenter?
btw: sprite.ColorGradient seems not to work correctly. the sprite will have the top left color only.
Can you file a bug report on the sprite.ColorGradient, and a feature request on the sprite.draw method? I will get to it.
ok. i now tried to use agatelib on mac osx but there are some issues:
- fullscreen does not work (the mac top bar is still there) or when using a resolution other than the current, the screen will go black but nothing else will happen
- when in fullscreen, input (Keyboard) does not work
- although AgateSDL is referenced, the log says
No audio driver found. Audio will not be heard.
No input driver found. Joysticks will not work.
here is the full log: http://cl1p.net/agatelibmac/
maybe i did something wrong. i used the same project as on windows.
i build the dlls from the current svn version and with the AgateLib.sln file.
but actually this seems very low level so it could be a problem of opentk and sdl..
would be great if you answer fast as im deciding which library to use at this weekends game jam and it should run on linux/mac/windows. i really like agate and want to use it, but i need it running on my macbook.
i dont know if you have a mac to test, but if you need some testing, you can contact me, i help.
cheers
Ok, I will try and check this tomorrow. I don't recall if I tested SDL on the Mac. There may be an easy fix for that.
Ok, you also need SDL_mixer as well as SDL for AgateSDL to work.
i copied SDL_mixer.dll and SDL.dll to the bin/debug folder but it still does not change. i tried copying libogg,libvorbis and libvorbisfile too, but thats not helping.
what did you meen by "need" ? why would i need to copy them on the mac and on windows it works without?
Ok, I have committed some fixes for fullscreen on Mac OS X in rev. 1195 & 1196. Full screen support is not very well tested, especially on the Mac so I expect there are still some bugs. Let me know if you find any (filing issues is best)
SDL.dll and SDL_mixer.dll are Windows binaries. You need to get the Mac-specific binaries SDL.framework and SDL_mixer.framework. Those folders can just be dropped into the same folder as your binary.
Edit: you can also put them in the /Library/Frameworks folder, you just need to remember to include them when you distribute your game.
hi
just checked the new svn version
- fullscreen on mac, i still have the topbar
- fullscreen on windows: cant quit the game with
if (Keyboard.Keys[KeyCode.Escape])
Quit();
- sdl still does not work on mac
maybe im doing something wrong on mac. could you tell me your agatesetup?
but the null pointer is gone ;)
How are you going fullscreen? I don't experience the topbar problem on my mac. Can you run the Full Screen test and see if you get the same results? This is the code in Tests/DisplayTests/FullScreen.
mac:
test works fine
win:
cant quit with ESC
i go fullscreen with the AgateGame. i override the Fullscreen property.
btw. sdl on mac does not work with the tests either
Ok, that is a weird bug with the escape key. Other keys seem to be fine. Just escape isn't generating a keydown event with a fullscreen window. I've committed a hack to work around this, but checking Keyboard.Keys[KeyCode.Escape] is unreliable. Use the KeyDown / KeyUp event to check the status of the escape key.
For SDL, did you download SDL.framework and SDL_mixer.framework and put them in the directory with your binaries?
yeah i did just now (did not have this idea before xD) but it did not help. i even pasted them io the libcode and tried to run the tests. no results.
btw. just want to thank you for your great work on this library ;)
Well, that should work. Can you zip up what you have and post it so I can take a look?
http://www.2shared.com/file/10974147/7cd7a2f4/trunk.html
its 20mb, and the dl is not very fast. you have to click bottom rights "Save file to your PC: click here".
i added the beginning of my own extension lib lichtspiel with the class "LichtspielGame : AgateGame" to make it easier for me. just for your information if you care for the code.
im using snow leopard, maybe thats an issue?
Snow leopard shouldn't be an issue, unless maybe you are using the 64-bit kernel. My mac mini is snow leopard, but it only has a 32-bit CPU. But from your debug log, it looks like you are not running 64-bit.
When I try your files on my mac, I see a black screen and the music plays in the background. Is this what you are seeing?
no i see moving test.png and i dont her sound. as you see in the log, sdl is not loaded.
btw, i have the latest macbook pro, so i think im running 64 bit but maybe mono only supports 32 bit so the log message?
And it's the same if you run it windowed?
yes, the same