Mini LD #17: Retro engine released!
Since several persons on the compo blog and the IRC channel seemed interested in my original idea, despite the closeness with the previous Mini, I am hereby releasing the aforementionned Retro engine!
Weee!
Source code, Linux binaries, Windows binaries
As you can see, it lacks terribly of Windows binaries. I’m terribly sorry, but couldn’t get my cross compilation thingy to work. It usually goes flowlessly, but here I’ve been battling for an hour, and I gave up.
EDIT: Thanks to Sos, we now have Windows binaries. Yepee! Thanks a lot to Sos. All hail Sos!
If someone with a good heart would like to, it can be built as follows: compile io.c retro_lua.c and lua_api.c into retro.exe. That’s all. But you’ll need dev libs for SDL, SDL_Image, SDL_Mixer and Lua 5.1
First one to publish a windows binary will win my eternal gratitude, and a cake*
Both source and Linux distribution contain full documentation (I hope), and an example game to help you get started.
And, as promised also, there is (a bit more) than a week before the actual Mini LD, which will therefore be held on the week end of the 20-21 of March 2010. No worries though, we’ll have the usual “take 48h when you want” policy, or even more if you like.
Okee. I hope I didn’t forget anything. Of course, don’t hesitate to ask questions on IRC and in the comments. Meanwhile, I’m gonna catch some z’s (I just love this expression, sorry).
Yours truly,
Tenoch
* The cake is a lie.
Great! I have no idea what I’m going to make yet, but I guess that’s a good thing.
Sadly, I don’t think I’m going to be available for the official weekend, but I’ll be sure to do something soon after that.
The engine looks great, looking through the source now. I might compile it for Windows tomorrow, if nobody else beats me to it. Looks very simple and manageable and I applaud you for that.
Heeeeeeeeeeeeeeeeeeeeeeeeeeeeeerewe go
Windows Binaries
MinGW32 only, I couldn’t do VC ones, because VC express can’t produce .libs.
Checked and working.
Lua runtime binary included.
Also, I’m startiing to like this and I might push myself to participate.
Thank you so much! This is great! You have my eternal gratitude.
And cake:
http://img.timeinc.net/recipes/i/recipes/oh/08/chocolate-cake-oh-1727433-x.jpg
And yes, do participate =)
I hope it’s gonna be fun.
Thanks, but what makes you think VS Express can’t do libs?
Choose Win32 project, on the next dialog in Application-Setting choose “Static Library”.
Man I’m dumb
Should I make one?
I’m using 64bit Ubuntu 9.10 and get the error “./retro: error while loading shared libraries: liblua5.1.so.0: cannot open shared object file: No such file or directory” when I try to run retro. This is especially odd since /usr/lib/liblua5.1.0 clearly exists. I can also enter the Lua interactive interpreter just fine where it says I have version 5.1.4 installed. I’m not sure what to do to get this to work.
Yeah, that’s the problem with ditributing binaries for Linux. It never works…
You will need to recompile it.
The easiest way is:
sudo apt-get install libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev liblua5.1-0-dev scons
And then run “scons” in the source directory. This will build the retro executable. I hope
If you make one succesfully, don’t hesitate to make a zip of it and I can add it to the download page. Good luck
It works fine if you include required libraries in the download, like you’d do for Windows. Just set rpath on the executable or use LD_LIBRARY_PATH to set the path to the libs, and voila.
Rebuilding it worked. Thanks.
Is using this library required, or can we simply use some ‘retro’ design restrictions?
As I wrote, it’s recommended to use it, to ensure that everyone starts at the same level. But if you can’t (for technical reasons) or don’t want to, no one will blame you
As long as you stick to the same constraints, your entry will be “valid”, whatever that may mean for MiniLD.
Well, late to the party, but I have another option as well.
I have created an exe using visual studio 2008 that has ALL dependencies statically linked (ok, that was a huge pain and way more work than I thought it would be). But now with this version there is just one exe and no dlls required to run! (I don’t know why I do these things, but figuring out dependencies and compiling issues is kinda like my version of doing the crossword puzzle I guess).
It is compiled in Release Mode with all speed optimizations turned on, so it should be pretty fast as well. It is actually reasonably sized as well.
Also, I added some argument passing, so you can create shortcuts to the exe to control window or fullscreen mode and control the amount of scaling (I like my game huge and pixellated on my gigantic screen). Just look at the existing shortcuts for details.
Anyway, now I just have to learn lua!! This should be fun!
http://www.bitjets.com/RetroEngine.zip
Oh, can I have some of that cake too then??
Here is one more version.
This one has uses LuaJIT instead of standard lua, which is supposed to provide a near-c speed for lua scripting.
The only drawback is the LuaJIT only works on windows as a DLL, so there is now one dll required. Might be worth the trade though, if the speed is substantially improved though. Hard to tell just from the demo app.
Anyway, here it is – have fun:
http://www.bitjets.com/RetroEngine-LuaJIT.zip
Anyone been able to get this up and running on a Mac yet ?
Kind of. The loadMusic doesn’t seem to work. I’ll see what I can do to clean things up and post a patch tonight or tomorrow.
Hi Reid,
Did you manage to get any further with this ?
I’ve had little luck at my end, but I’m not too familiar with SDL.
Thanks
-Mic
On top of my head, I can’t remember any “known” bug for SDL_Mixer on the Mac. Maybe it’s related to the .xm format? Does it work with an mp3 or ogg?
Ok guys, sorry about this. I was just able to get around to doing this and it’s almost 4:30am. So, this is a tomorrow thing. I’ll post a patch set (it’ll be /small/, I think I might have unintentionally implied that it’s more work than it is) tomorrow and make sure it’s the first thing I do when I sit down at my computer.
Regarding the music, it definitely won’t play the xm. But, I did attempt to play the wav without success. I’ll try substituting an mp3 (and an ogg if I can find one) and report back the results with the patch set. If it doesn’t work, this might just have to be something we live with.
Till tomorrow. Again, sorry about the lateness…
Cool – appreciate you taking the time to do this. Looking forward to seeing what we have.
-Mic
Wrote up a little something. Not really feeling well right now. So, let me know if anything is cockeyed or doesn’t work. I’m running 10.6.2 on the most recent revision of the 2.53GHz, 320GB mac mini (if that matters).
http://ld.orthogonalspace.ca/miniLD17/
And yes, I realize now that I could have just done a ENV = {’PATH’ : os.environ['PATH']} instead of hardcoding. But, I’m tired, not feeling well, and lazy to begin with. So, :p
This wasn’t big enough to add a new post for, so I’m putting it in a comment.
I’m going to share what I’ve done, but since it’s in C it probably won’t be any use to anyone but me. Even if someone else used C, this would have been complete within the first minute if needed. Even so, I’m going to upload it.
What I’ve made is a memory-friendly keypress manager thing that in my opinion works better for arcade games than the event model. It stores the key state and “change” value of every button in a 16-bit short. Source is main.c inside the zip.
It’s my first time making something as low-level as this, but I’m pleased with the completely unnecessary compactness of the solution.
http://www.galacticgaming.net/hosting/d/RetroKeyArrayMain.zip
Will there be an official start post re-stating the rules, or should I just go ahead with stuff?
My main worry is loading content: my current idea needs a reasonably large world (not in file size however) and there’s no method to extract pixel information from a loaded image and if I remember correctly non-engine stuff shouldn’t be used.
Although actually, considering the engine, I won’t really be able to pull of my current idea. I’ve ported a line function I found on wikipedia, but text would just require too much time hardcoding arrays (since you can’t blit partial textures) or editing ~28 different images. I’ll have to start thinking raster retro, not just constraints.