• What Are You Working On? July 2015
    1,392 replies, posted
[QUOTE=Hentie;48212012]updated some of the graphics [video]https://youtu.be/rhdeSxA6P-Y[/video] i darkened the environment so that it would contrast the rainbow blocks and buttons more, as well as the character. lol i kinda felt like an idiot after i realized i was subliminally influenced into adding the gradient and stars by Offisir's game. [b]edit:[/b] youtube videos never do justice.. heres a high quality screenshot [img]http://i.imgur.com/PgNSWOe.png[/img][/QUOTE] Try making the tiles float up from the bottom.
[QUOTE=Mega1mpact;48210779]Welcome to the club. Perks include getting emails about when the sales are and looking at small devs whine on the support forum. [editline]15th July 2015[/editline] What framework are you using?[/QUOTE] I'm using Phaser JS. [QUOTE=tisseman890;48211273]It could be [URL="https://phaser.io/"]Phaser.js[/URL][/QUOTE] Correct.
[img]http://i.imgur.com/QgEAgGO.gif[/img] new treasure chest for the loot room!
Bit late but are any of you at Develop?
thats a really big treasure chest
[QUOTE=Map in a box;48213215]thats a really big treasure chest[/QUOTE] a big chest for [I]big-time loot[/I]. this entire region of the map progresses you to this final area and usually contains something really good like a new weapon or special reusable item.
[QUOTE=Richy19;48213214]Bit late but are any of you at Develop?[/QUOTE] Our company is there @krillbite. But we don't have a stand or anything. I'm not there though. Also my game Size DOES Matter is nominated but I couldn't be there :(
Just discovered ternary function calls in c# [code] (currSecondPath % 2 == 0? (Action)Player._.RotateToLeft : Player._.RotateToRight)(); [/code]
[QUOTE=Falcqn;48212391]You should add some delay or short animation when the character touches the star/goal thing, right now the instant transition as soon as you touch it is kinda jarring. The new colour scheme fits much nicer too, you got a cute art style goin on there[/QUOTE] Thanks! I'm planning on making it so the level you're on falls down as another person suggested and maybe add some kind of "beam" animation that teleports the player so I hope it won't be so jarring then. This is all unimportant stuff though, I still have to program in some other game mechanics I have planned... Right now I've just been playing around with the visual stuff lol In the meantime, here are some tracks I was working on for the game: [media]https://soundcloud.com/polychildgame/sirens[/media] [media]https://soundcloud.com/polychildgame/born[/media]
Even better, nested ternary operations.. it's somehow like "match" in functional languages (it's just simplified "if else if" [code] int i = 5; string result = i % 2 == 0 ? "a" : i % 3 == 0 ? "b" : i % 5 == 0 ? "c" : i % 7 == 0 ? "d" : "e"; [/code]
[QUOTE=Fourier;48213505]Just discovered ternary function calls in c# [code] (currSecondPath % 2 == 0? (Action)Player._.RotateToLeft : Player._.RotateToRight)(); [/code][/QUOTE] Holy shit. I've been using C# for almost 7 years and I never thought of this.
[QUOTE=Berkin;48214064]Holy shit. I've been using C# for almost 7 years and I never thought of this.[/QUOTE] Check this :v: Multiple ternary function call [code] int i = x; ( (i % 2 == 0) ? FirstFunc : (i % 3 == 0) ? SecondFunc : (i % 5 == 0) ? ThirdFunc : (i % 7 == 0) ? FourthFunc : (Action)LastFunc)(); [/code] With lambas only [code] int i = x; ((i % 2 == 0) ? (() => { }) : (i % 3 == 0) ? (() => { }) : (i % 5 == 0) ? (() => { }) : (i % 7 == 0) ? (() => { }) : (Action)(() => { }))(); [/code]
[QUOTE=Fourier;48213505]Just discovered ternary function calls in c# [code] (currSecondPath % 2 == 0? (Action)Player._.RotateToLeft : Player._.RotateToRight)(); [/code][/QUOTE] And then you look at the source code and discover it does a heap allocation each time the code runs :v: (I haven't really checked, but if any part of this isn't a static call it's very likely, and possible even without.) [I]If[/I] it runs inefficiently you can probably weave that out in IL if you really need to. [editline]15th July 2015[/editline] [QUOTE=Fourier;48214172]Check this :v: Multiple ternary function call [...][/QUOTE] I can see this being useful if you have a really long parameter list that's shared between the calls. Otherwise, not so much.
[QUOTE=Fourier;48214172]Check this :v: Multiple ternary function call [code] int i = x; ( (i % 2 == 0) ? FirstFunc : (i % 3 == 0) ? SecondFunc : (i % 5 == 0) ? ThirdFunc : (i % 7 == 0) ? FourthFunc : (Action)LastFunc)(); [/code] With lambas only [code] int i = x; ((i % 2 == 0) ? (() => { }) : (i % 3 == 0) ? (() => { }) : (i % 5 == 0) ? (() => { }) : (i % 7 == 0) ? (() => { }) : (Action)(() => { }))(); [/code][/QUOTE] [I]"What did you do today?" "I got programming advice from a dead mathematician. You?"[/I]
[quote="muh dream destroyah"] [I]If[/I] it runs inefficiently you can probably weave that out in IL if you really need to. [/quote] You are correct, I just checked on Google, there is allocation going on. [editline]15th July 2015[/editline] [QUOTE=Berkin;48214204][I]"What did you do today?" "I got programming advice from a dead mathematician. You?"[/I][/QUOTE] W: "Honey, why are you so happy?" H: "I helped some cucumber on the internet to code better." W: "I wish your cucumber would be working better" H: "Honey, I am dead"
[QUOTE=Fourier;48214226]You are correct, I just checked on Google, there is allocation going on. [editline]15th July 2015[/editline] W: "Honey, why are you so happy?" H: "I helped some cucumber on the internet to code better." W: "I wish your cucumber would be working better" H: "Honey, I am dead"[/QUOTE] I just about damn near spat coffee everywhere while reading that. Are you some kind of sentient Rant pattern?
I miss the days it was called Manhood. :(
[QUOTE=cartman300;48214287]I miss the days it was called Manhood. :([/QUOTE] I don't.
[QUOTE=Foda;48213210][img]http://i.imgur.com/QgEAgGO.gif[/img] new treasure chest for the loot room![/QUOTE] Ohh this is so beautiful
[QUOTE=Fourier;48214172]Check this :v: Multiple ternary function call [code] int i = x; ( (i % 2 == 0) ? FirstFunc : (i % 3 == 0) ? SecondFunc : (i % 5 == 0) ? ThirdFunc : (i % 7 == 0) ? FourthFunc : (Action)LastFunc)(); [/code] With lambas only [code] int i = x; ((i % 2 == 0) ? (() => { }) : (i % 3 == 0) ? (() => { }) : (i % 5 == 0) ? (() => { }) : (i % 7 == 0) ? (() => { }) : (Action)(() => { }))(); [/code][/QUOTE] not in production please
Bot allows to create a lobby and start a dungeon crawl now. [img]http://i.gyazo.com/46552b43bceeed3b6cb8a0ec44844da7.png[/img]
[QUOTE=Kwaq;48214580]not in production please[/QUOTE] I won't since now I know it's shit for performance. But for simple things it's awesome.
[QUOTE=Kwaq;48214580]not in production please[/QUOTE] Oh no! A new idiom that can reduce repetition and produce more maintainable code! I'm so frustrated with this whole "code should be so simple that my mom could read it" bullshit. No. It shouldn't. It should be easy to maintain and non-repeating. Don't get what's going on at first glance? TAKE ANOTHER FUCKING GLANCE! Congratulations, now you know a new pattern. It's exactly this mentality that produces things like Go. "Oh no, we can't have generics! I tried explaining them to my hamster last night and he just couldn't get it. It's obviously too complex for us programmers!" /rant If you're talking about performance issues then disregard the above.
[QUOTE=Rocket;48215726]I don't know about you, but [code] int i = x; ((i % 2 == 0) ? (() => { }) : (i % 3 == 0) ? (() => { }) : (i % 5 == 0) ? (() => { }) : (i % 7 == 0) ? (() => { }) : (Action)(() => { }))(); [/code] is pretty unreadable to me, unless I already know what they're trying to do.[/QUOTE] It doesn't make sense with lambdas because you're invoking them right after, but the example above does make sense. I could definitely see it used like [code] ( classType == Class.Warrior ? MeleeAttack : classType == Class.Wizard ? MagicAttack : classType == Class.Archer ? RangedAttack) : (Action<Entity, Entity>)NoAttack ) (player, enemy); [/code]
[QUOTE=Berkin;48214276]I just about damn near spat coffee everywhere while reading that. Are you some kind of sentient Rant pattern?[/QUOTE] No I just started taking vitamins.
[QUOTE=Darwin226;48215770] [code] ( classType == Class.Warrior ? MeleeAttack : classType == Class.Wizard ? MagicAttack : classType == Class.Archer ? RangedAttack) : (Action<Entity, Entity>)NoAttack ) (player, enemy); [/code][/QUOTE] That is actually quite nice! Just fix formatting so people don't go "WTF" [code] ( classType == Class.Warrior ? MeleeAttack : classType == Class.Wizard ? MagicAttack : classType == Class.Archer ? RangedAttack : (Action<Entity, Entity>) NoAttack )( player, enemy ); [/code]
:snip: Moved to: [url]http://facepunch.com/showthread.php?t=1446371&p=48215852#post48215852[/url]
[QUOTE=Winner;48215777]in what world is [code](Action)(() => { }))()[/code] readable[/QUOTE] Doesn't look all that bad to me, start from the inside and it quickly becomes clear what it is. This is also a toy example, so they're empty lambdas in this case, while they'd in a real example probably have actual code in them, making their purpose clearer. Then again, I say that as someone who loves Racket (a Lisp). You can always introduce some extra whitespace if that's what irks you, but it could be much worse. :v:
[QUOTE=Rocket;48215726]I don't know about you, but [code] int i = x; ((i % 2 == 0) ? (() => { }) : (i % 3 == 0) ? (() => { }) : (i % 5 == 0) ? (() => { }) : (i % 7 == 0) ? (() => { }) : (Action)(() => { }))(); [/code] is pretty unreadable to me, unless I already know what they're trying to do.[/QUOTE] It is, it's just nice feature if you need to mix existing functions and throw some lambda in there. [editline]16th July 2015[/editline] [QUOTE=Winner;48215777]in what world is [code](Action)(() => { }))()[/code] readable[/QUOTE] Algebra. f and g are two functions or f(x), g(x). You can write it also as (f)(x), (g)(x). Sum of two functions is f(x) + g(x) or it can also be (f + g)(x). Will stop shitting with this stuff here, I gotta sleep.
So Clang and libunwind will break on ARM is very specific circumstances, specifically, those I require it work in. If you compile for ARMv7, thumb, PIC (for a shared library) and using the ARM specific unwind information, then libunwind will unwind everything except LR and PC correctly, turns out, I kinda need those. GCC works but Clang is needed for other things, so, kinda blocked by Clang, yay!
Sorry, you need to Log In to post a reply to this thread.