• What are you working on? v19
    6,590 replies, posted
[url=http://www.facepunch.com/showthread.php?t=1119347]Working on implementing Lua in Minecraft following GLua style.[/url]
[QUOTE=Dr Magnusson;31897391]So jealous! Wish I had room in my budget for it, but I'll have to make due with a PDF for now :([/QUOTE] If you just get the second hand copies, you can get great books pretty cheap
[QUOTE=The-Stone;31897682][url=http://www.facepunch.com/showthread.php?t=1119347]Working on implementing Lua in Minecraft[/url][/QUOTE] hey, that sounds pretty nea- [quote]following GLua style[/quote] ...
"I'll leave x for last since it's not important" -Half do something else for 5 mins- -Implement x- "Wait wasn't I leaving that for last?" Every time I tell you, every time. I'm terrible at this planning stuff.
[QUOTE=thelinx;31897835]hey, that sounds pretty nea- ...[/QUOTE] Well, I have to say GLua style in comparison to Genesis' version. Basically it means the file* and hook* functions for now.
[QUOTE=Deco Da Man;31896050]Get an Uninterruptable Power Supply (UPS). It will filter dirty power, as well as give you a few hours of working time if the power goes out.[/QUOTE] It'd take a rather hefty UPS to provide several hours of battery power for a desktop PC. My 750VA one provides about half an hour (though it's a few years old). But that's more than enough to ride out a brief outage, or save and shut down cleanly during an extended one.
Oh my god, my friend made a walktrough of my game, and I was like playing guitar really badly and he recorded it with it, it is really scary. [media]http://www.youtube.com/watch?v=KMmdBiHo-mM[/media] Also a link to the game (vote for me! :v:) [url]http://www.ludumdare.com/compo/ludum-dare-21/?action=preview&uid=5555[/url]
[media]http://www.youtube.com/watch?v=_MXiPDSxlOQ[/media]
[QUOTE=SupahVee;31899856][media]http://www.youtube.com/watch?v=_MXiPDSxlOQ[/media][/QUOTE] That looks very... Japanese.
[QUOTE=SupahVee;31899856][media]http://www.youtube.com/watch?v=_MXiPDSxlOQ[/media][/QUOTE] That is Touhou. I mean, did you actually use Touhou music, too?
A bit o' refactoring to allow level validation without starting the game: [img]http://i.imgur.com/ljgQ7.png[/img] you just drag one or more level files on to the exe and it's done. It'll be useful if/when people start making their own levels and put them on a central server.
[QUOTE=Deco Da Man;31896424]Somebody prove me wrong in saying that that cover is the most epic programming book cover ever.. (also, is that The West Australian I see in the background? :O )[/QUOTE] I prefer Jon Skeet's "man in a dress playing a banjo thingy" book. [img]http://images.pearsoned-ema.com/jpeg/large/9781935182474.jpg[/img]
[QUOTE=Ortzinator;31900460]I prefer Jon Skeet's "man in a dress playing a banjo thingy" book. [img]http://images.pearsoned-ema.com/jpeg/large/9781935182474.jpg[/img][/QUOTE] People with banjos are always a good choice when you don't know what else to put there. [img]http://image.com.com/gamespot/images/bigboxshots/7/588567_40333_front.jpg[/img]
Does anyone know of any zlib/mit/bsd/... libraries that would allow me to read and write some sort of configuration files with C++?
Lua could be acceptable. Might seem like an overkill, but it's very lightweight. It's also not really hard to write an ini-ish config parser. [editline]23rd August 2011[/editline] Oh, you could also use JSON. There should be a couple of libraries for that.
[cpp] if (type == "block") { LoadBlock(ss, obj); } else if (type == "player") { LoadPlayer(ss, obj); } [/cpp] oh no it's all coming back :tinfoil:
You should use a factory for that.
[QUOTE=ZeekyHBomb;31901627]Oh, you could also use JSON. There should be a couple of libraries for that.[/QUOTE] Yea I tried a couple of the JSON libraries listed on the site, but I couldnt get any of them to work. Does anyone know if Squirrel or Angelscript can write back onto a file?
[QUOTE=Richy19;31901355]Does anyone know of any zlib/mit/bsd/... libraries that would allow me to read and write some sort of configuration files with C++?[/QUOTE] Write a .ini parser. :v:
[QUOTE=danharibo;31901769]You should use a factory for that.[/QUOTE] elaborate? [editline]23rd August 2011[/editline] nevermind, changed it to this [cpp] void Level::TryLoad(std::istream& in, GameObject* obj) { GameTaggable* tag = obj->Get<GameTaggable>(); if (tag == NULL) return; LoadList::iterator i = loadFuncs.find(tag->Tag); if (i != loadFuncs.end() && i->second != NULL) (*i->second)(in, obj); } void Level::TrySave(std::ostream& out, GameObject* obj) { GameTaggable* tag = obj->Get<GameTaggable>(); if (tag == NULL) return; SaveList::iterator i = saveFuncs.find(tag->Tag); if (i != saveFuncs.end() && i->second != NULL) (*i->second)(out, obj); } void Level::AddLoadSaveFunc(const std::string& str, LoadFunc loadFunc, SaveFunc saveFunc) { loadFuncs[str] = loadFunc; saveFuncs[str] = saveFunc; } // ... AddLoadSaveFunc("block", &LoadBlock, &SaveBlock); AddLoadSaveFunc("player", &LoadPlayer, &SavePlayer); // ... TryLoad(ss, obj); // and TrySave(out, obj); [/cpp]
Just optimized my roguelike lightning(with rays) from ~80 ms to ~5 ms :D (Yeah i know that i dont need to recalculate the lighting every frame but it was bugging me :/)
[QUOTE=icantread49;31901807]elaborate? [editline]23rd August 2011[/editline] nevermind, changed it to this [cpp] Cod [/cpp][/QUOTE]Well I was mostly kidding; Based on what you showed there you've solved the problem.
Finally added a proper point lighting pass: [img_thumb]http://img855.imageshack.us/img855/3503/2382011.jpg[/img_thumb]
[QUOTE=esalaka;31900411]That is Touhou. I mean, did you actually use Touhou music, too?[/QUOTE] Touhou sprites are placeholders for now. I'm not sure if I'm going to make a Touhou fangame or a completely new shmup. The music is: [media]http://www.youtube.com/watch?v=EQJIY4dIFVI[/media]
[QUOTE=SupahVee;31902831]Touhou sprites are placeholders for now. I'm not sure if I'm going to make a Touhou fangame or a completely new shmup. The music is: [media]http://www.youtube.com/watch?v=EQJIY4dIFVI[/media][/QUOTE] Well thus far it looks pretty awesome and I wouldn't mind either. Not that I'm ever going to play the game past the first levelthing because I suck at shmups in general and especially so at danmaku
[QUOTE=ZeekyHBomb;31901627]Lua could be acceptable. Might seem like an overkill, but it's very lightweight. It's also not really hard to write an ini-ish config parser. [editline]23rd August 2011[/editline] Oh, you could also use JSON. There should be a couple of libraries for that.[/QUOTE] At least a million libs for JSON. That's my favorite settings storage format at the moment with all the possibilites.
[QUOTE=T3hGamerDK;31903113]At least a million libs for JSON. That's my favorite settings storage format at the moment with all the possibilites.[/QUOTE] What library do you use?
I was one of the first people to make a lua mod in minecraft SMP and singleplayer and both of them got burried in the minecraft and bukkit forums. :saddowns:
Lua bindings for minecraft functionality would be pretty awesome. You'd just have to distribute natives which would be kinda annoying I guess, but hey, you could use LuaJIT. As we all know, it's fast as fuck.
[QUOTE=Richy19;31903330]What library do you use?[/QUOTE] In C++ I don't use a library, I was stupid enough to end up writing my own :v: But I use JSON in Javascript, Lua and Python too!
Sorry, you need to Log In to post a reply to this thread.