• What are you working on? January 2012
    3,401 replies, posted
[QUOTE=Hey0;34455983]So I've got the API mostly working (Implemented [url=https://github.com/traitor/Facepunch-App/blob/master/src/nl/vertinode/facepunch/FacepunchAPI.java]here[/url]). However, specifying a page doesn't change anything. Doesn't change the page of a forum, or a thread. Also, all thread's statuses are "sticky". Dunno if that's the intended result. And if you could add the poster's post count and join date to getposts that'd be awesome.[/QUOTE] Excellent bug reports, thanks! I'll get all those bugs fixed today. Thanks!
Hey facepunchers, I'm looking some advice on how I should handle staged or queued events in my game. For example, at the beginning of a level if I want a sprite to move along, then play some particle effect before the level begins. Those two events happen one after the other, and at the moment I'm struggling to come up with a way to achieve this. I've seen that the [URL=http://xui.codeplex.com/releases/view/80711]XUI XNA framework[/URL] uses a "timeline" method, which seems OK, but that's only for UI and I'm wondering how everyone else tends to handle this. Below is the kind of method I came up with (in Java), but it still seems so horrible. Also, underneath it would be using Timers or [URL=http://developer.android.com/reference/android/os/Handler.html]Android's Handler[/URL] class, which generally just doesn't seem great. [CODE] public void load() { // String name, float delay, float duration Timeline timeline1 = new Timeline(ScreenTransitions.TRANSITION_IN, 0.0f, 0.5f); timeline1.addEvent(new Event() { @Override public void onEvent() { // some transition in stuff } }); // will run after timeline1 has completed Timeline event1 = new Timeline("random", 0.0f, 1.0f, timeline1); event1.addEvent(new Event() { @Override public void onEvent() { // have something happen onEventComplete(ScreenTransitions.TRANSITION_OUT); } }); Timeline timeline2 = new Timeline(ScreenTransitions.TRANSITION_OUT, 5.0f, 0.5f); timeline2.addEvent(new Event() { @Override public void onEvent() { // some transition out stuff } }); addTimelines(timeline1, event1, event2, timeline2); } [/CODE] Any help would be greatly appreciated
[QUOTE=high;34459474]I really hope mono doesn't release 2.12 till after May. Cause then I can say that mono has a backlog of releases over a year old. [url]https://bugzilla.novell.com/show_bug.cgi?id=691115[/url] Fixed back in May of 2011 and said to be in the 2.12 release. Well 2.11 isn't even out yet...[/QUOTE] They're jumping from 2.10 to 2.12, 2.11 is just a public beta. Mono used to be owned by Novell, but back in May, they [url=http://www.zdnet.com/blog/open-source/is-mono-dead-is-novell-dying/8821]laid off 800 people,[/url] [url=http://gigaom.com/2011/12/12/xamarin-mono/]including everyone who was working on Mono[/url]. It took them a few months to create their own startup, Xamarin, and in October they said that they [url=http://tirania.org/blog/archive/2011/Oct-14.html]are settling in and starting to work on their continuous integration builds again[/url]. I would cut them a bit of slack considering they spent at least 6 of those 12 months setting up a business after being fired.
[QUOTE=aaronds;34459851]Hey facepunchers, I'm looking some advice on how I should handle staged or queued events in my game. For example, at the beginning of a level if I want a sprite to move along, then play some particle effect before the level begins. Those two events happen one after the other, and at the moment I'm struggling to come up with a way to achieve this. I've seen that the [URL=http://xui.codeplex.com/releases/view/80711]XUI XNA framework[/URL] uses a "timeline" method, which seems OK, but that's only for UI and I'm wondering how everyone else tends to handle this. Below is the kind of method I came up with (in Java), but it still seems so horrible. Also, underneath it would be using Timers or [URL=http://developer.android.com/reference/android/os/Handler.html]Android's Handler[/URL] class, which generally just doesn't seem great. //snip Any help would be greatly appreciated[/QUOTE] I'm using a very cheap but efficient system of chained function calls. something along (pseudo code) [code]ChangeState(state, function pointer) { if (animationStop) { call(function); } } [/code] the beauty here is that you can chain anything multiple times AND the code gets executed at the same place every time which is important when you might run into inconsistency problems cast animation --> effect animation -> damage to enemy (if in range) etc. or being stunned -> stun animation -> recover animation -> return normal behaviour. or in your case -> walk (along path) -> cast -> isPlayerControl = true
[QUOTE=Nighley;34459953]I'm using a very cheap but efficient system of chained function calls. something along (pseudo code) [code]ChangeState(state, function pointer) { if (animationStop) { call(function); } } [/code] the beauty here is that you can chain anything multiple times AND the code gets executed at the same place every time which is important when you might run into inconsistency problems cast animation --> effect animation -> damage to enemy (if in range) etc. or being stunned -> stun animation -> recover animation -> return normal behaviour. or in your case -> walk (along path) -> cast -> isPlayerControl = true[/QUOTE] Thanks for this, one thing though, for me to actually run the code after the animation or whatever is completed, I'd have to use a Timer or Android Handler, otherwise everything is just executed at once. Does this appear to be my only choice?
[QUOTE=aaronds;34459973]Thanks for this, one thing though, for me to actually run the code after the animation or whatever is completed, I'd have to use a Timer or Android Handler, otherwise everything is just executed at once. Does this appear to be my only choice?[/QUOTE] If I understand you correctly, I solved this problem by using state flags, ever changestate call blocks every new input until it is done with the last input. but in your case it would look something like this (please try to unify different states, i have 4 different functions that can be called while changing state, cast, stopcast, melee and death animation that's it [code] levelStart() { changeState(walkalongpath, cast(skill) ); } cast(skill) { changeState(casting,doneCasting); } doneCasting() { isPlayerControl = true; } [/code] if you rely heavily on cinematic cut scenes, then i'd implement an Action queue that just pulls the next action -> executes it and so on. there are two main programming philosophies: Do it the right way Do only what you need and in this case just do what you need and don't waste energy on a complex animation class only to implement a simple cut scene. PS even the linux kernel is based on the second philosophy! linux has no real deadlock prevention system as it would be way to complex ;p so don't feel bad when not implementing everything the right way otherwise you'd never finish anything at all.
[QUOTE=Hey0;34455983]So I've got the API mostly working (Implemented [url=https://github.com/traitor/Facepunch-App/blob/master/src/nl/vertinode/facepunch/FacepunchAPI.java]here[/url]). However, specifying a page doesn't change anything. Doesn't change the page of a forum, or a thread. Also, all thread's statuses are "sticky". Dunno if that's the intended result. And if you could add the poster's post count and join date to getposts that'd be awesome.[/QUOTE] All done. Also added the thread title and total number of pages to getposts, and fixed some nasty bugs where it'd fail parsing the thread list on a deleted or moved thread (but these fixes only apply to mods, normal users can't see that data anyway).
[QUOTE=Nighley;34460080]If I understand you correctly, I solved this problem by using state flags, ever changestate call blocks every new input until it is done with the last input. but in your case it would look something like this (please try to unify different states, i have 4 different functions that can be called while changing state, cast, stopcast, melee and death animation that's it -snip if you rely heavily on cinematic cut scenes, then i'd implement an Action queue that just pulls the next action -> executes it and so on. there are two main programming philosophies: Do it the right way Do only what you need and in this case just do what you need and don't waste energy on a complex animation class only to implement a simple cut scene. PS even the linux kernel is based on the second philosophy! linux has no real deadlock prevention system as it would be way to complex ;p so don't feel bad when not implementing everything the right way otherwise you'd never finish anything at all.[/QUOTE] Ok thanks, I think I see what you're saying. And yeah, I'm just gonna go ahead and get everything working, then tidy things up a little later on, not worrying much about "the right way". Thanks a lot!
[QUOTE=Hexxeh;34460092]All done. Also added the thread title and total number of pages to getposts, and fixed some nasty bugs where it'd fail parsing the thread list on a deleted or moved thread (but these fixes only apply to mods, normal users can't see that data anyway).[/QUOTE] i can see deleted threads and posts
[QUOTE=swift and shift;34460226]i can see deleted threads and posts[/QUOTE] Ah, must've changed recently then, at one point deleted threads were only visible by mods if I remember rightly. Then that change affects everyone.
[QUOTE=Hexxeh;34460313]Ah, must've changed recently then, at one point deleted threads were only visible by mods if I remember rightly. Then that change affects everyone.[/QUOTE] 's a goldie thing. Had it for ages.
[QUOTE=Lexic;34460321]'s a goldie thing. Had it for ages.[/QUOTE] Ahh fair enough, never been a gold so never noticed it.
LuaJIT doesn't seem to like the SEH-based exception handling on 32-bit Windows. Is there any way I can make the application use something else? I'm compiling with the developer preview of Visual Studio 2011.
[QUOTE=Xerios3;34453769]My own engine =) Heh, thanks. I've been previously concentrating way too much on the engine development but now, I'm just putting every possible optimization aside and trying to get the game to a playable state asap.[/QUOTE] Quick question: How did you implement the net-code to get that running online? Are you using a client server based architecture, or something else?
[QUOTE=high;34459474]I really hope mono doesn't release 2.12 till after May. Cause then I can say that mono has a backlog of releases over a year old. [url]https://bugzilla.novell.com/show_bug.cgi?id=691115[/url] Fixed back in May of 2011 and said to be in the 2.12 release. Well 2.11 isn't even out yet...[/QUOTE] Mono only ever releases on the even numbers. They follow the same numbering scheme as GTK+. So technically 2.11 will never be released under that name.
Participated in the global game jam 2012, we won the jam in breda and are going to the dutch finals 14 feb. We participated with 3 programmers and 2 designers (game designers, not art guys). Because we didn't have any art guys we did everything procedural. [video=youtube;0FlS2mfnldg]http://www.youtube.com/watch?v=0FlS2mfnldg[/video] Sorry about the bad quality, but it shows some basic gameplay mechanics, it has a lot more though.
[QUOTE=quincy18;34462418]Participated in the global game jam 2012, we won the jam in breda and are going to the dutch finals 14 feb. We participated with 3 programmers and 2 designers (game designers, not art guys). Because we didn't have any art guys we did everything procedural. [video=youtube;0FlS2mfnldg]http://www.youtube.com/watch?v=0FlS2mfnldg[/video] Sorry about the bad quality, but it shows some basic gameplay mechanics, it has a lot more though.[/QUOTE] I really like the way the whole level is curved.
Yea there is a bit of story to that, your a particle in a large collider thing like the LHC and you're speeding up, grabbing the green particles speeds you up and when you reach max speed (speed of light) and you then collide with a green one you create a new world and go into that. You can go infinitly deep and you can go back to previous levels. When you die you will also zoom out of all of your worlds back to the first one :) [editline]30th January 2012[/editline] Oh it also features some powers like slow motion, vacuum, explosion and shield which you can obtain by stealing electrons of other particles.
How is it possible (in DirectX 9) that when you are rendering on an offscreen render target/texture of type D3DFMT_A8R8G8B8, [code]g_engine->p_device->CreateTexture(g_engine->getScreenWidth(),g_engine->getScreenHeight(), 1,D3DUSAGE_RENDERTARGET,D3DFMT_A8R8G8B8,D3DPOOL_DEFAULT,&p_DarkTexture,NULL);[/code] that semi-transparent areas of rendered textures/sprites make the pixels beneath it transparent ? So basically, you are "erasing" the texture on which you draw, instead of drawing on it (painters algorithm style). That doesn't make any sense ! I don't want this to happen, I just want to render textures on the render target one texture over other. Does anyone have an explanation for this ? I am not even using some shaders or anything, just rendering my sprites on a texture, and then rendering IT on the backbuffer.
This is my small "devblog" of my projects: [url]http://nissehutt.tumblr.com[/url] [editline]30th January 2012[/editline] Oh and, [media]http://www.youtube.com/watch?v=okOHBg-cXFI[/media]
you should use isometric graphics, or do layers early so you can have height
Can we post project layouts and argue about them? [IMG]http://i.imgur.com/oDcJj.png[/IMG]
[QUOTE=Nigey Nige;34463907]Can we post project layouts and argue about them? [IMG]http://i.imgur.com/oDcJj.png[/IMG][/QUOTE] Clearly my layout is the best. [img]http://i.imgur.com/BtfQr.png[/img]
you're still spelling lakitu wrong.
[QUOTE=Nigey Nige;34463907]Can we post project layouts and argue about them? [IMG]http://i.imgur.com/oDcJj.png[/IMG][/QUOTE] I don't really see what's to argue about. [img]http://i.imgur.com/1jCHG.png[/img]
For some reason I decided to measure the performance of LuaJITs lua_newstate method; turns out it's about 2000 microseconds (page generation from when the Lua state exists is only about 400). So now I precache about 16 states in another thread. Now the time to get hold of a new Lua state is about 3-4 microseconds. Not bad, that's a 650% speed increase in total. [editline]30th January 2012[/editline] The only downside to this is rather than using about 500kb of RAM, it uses about 3MB, but that doesn't really matter. [editline]30th January 2012[/editline] Mine looks shit: [img]http://dl.dropbox.com/u/8063726/Pictures/Screenshot%20at%202012-01-30%2018%3A33%3A04.png[/img] [editline]30th January 2012[/editline] I can never be arsed to sort all the files.
[QUOTE=Nigey Nige;34463907]Can we post project layouts and argue about them? [IMG]http://i.imgur.com/oDcJj.png[/IMG][/QUOTE] [url]http://i43.tinypic.com/fc5u9k.jpg[/url] (kinda big so ill just link it)
[QUOTE=COBRAa;34464062]Mine looks shit: [img]http://dl.dropbox.com/u/8063726/Pictures/Screenshot%20at%202012-01-30%2018%3A33%3A04.png[/img][/QUOTE] Holy shit, Code::Blocks! I haven't seen anyone using that editor for years.
You're either not looking very hard or you're actively trying to avoid it. It's still a massively popular IDE. I have it on a USB stick with mingw just 'cause.
Here, but I would appreciate it more if you would check my above post (second on this page). [img]http://i.imgur.com/5ZlBi.jpg[/img]
Sorry, you need to Log In to post a reply to this thread.