• What are you working on?
    5,004 replies, posted
[QUOTE=Ziks;50004855]Working on a trailer for Chunks, so I've been testing out recording timelapses: -vid-[/QUOTE] You should allow users to build their own Avatar head out of blocks for multiplayer/thirdperson videos like this.
This could probably go in the electronics thread too, but I've implemented a simple CPU in Verilog, synthesised for an ice40 FPGA. Spent hours chasing a bug, turns out I just didn't copy and paste the entire program memory from the Python REPL I was using to format it into Verilog. [media]http://www.youtube.com/watch?v=HskcjwLXgvM[/media]
I present to you: branchless FizzBuzz. [cpp] #include <stdio.h> #include <intrin.h> int main(int argc, char** argv) { char ns[4]; char* s[4] = { ns, "Buzz", "Fizz", "Fizz Buzz" }; for (unsigned int i = 1; i <= 100; ++i) { int c3 = 2 - 2 * _mm_extract_epi32(_mm_min_epi32(_mm_set1_epi32(i % 3), _mm_set1_epi32(1)), 0); int c5 = 1 - _mm_extract_epi32(_mm_min_epi32(_mm_set1_epi32(i % 5), _mm_set1_epi32(1)), 0); char* rs = s[c3 + c5]; sprintf(s[0], "%u", i); printf("%s ", rs); } printf("\n"); return 0; } [/cpp] [editline]26th March 2016[/editline] Except for sprintf and printf of course. Maybe I'll rewrite them as well.
[QUOTE=Anven11;50006830]fizzbuhzz[/QUOTE] for (unsigned int i = 1; i <= 100; ++i) <-- unless you unroll the loop this should compile into a branch.
[QUOTE=Exl;49992707]Added some NPCs to my SkiFree clone, including the Yeti\abominable snowman (at 666m). [vid]http://www.dvdflick.net/storage/skifree/skifreewee.mp4[/vid] Try it out at [url]http://www.dvdflick.net/storage/skifree/[/url]. Use the arrow keys to steer and space bar to jump. Holding down speeds you up. Use the arrow keys while in the air to do stunts for bonus points.[/QUOTE] This is like maximum nostalgia overload. I would love an offline version of this game!
[QUOTE=JohnnyOnFlame;50007539]for (unsigned int i = 1; i <= 100; ++i) <-- unless you unroll the loop this should compile into a branch.[/QUOTE] A modern CPU's branch prediction should make that loop about as efficient as the unrolled version, so that's fine.
[QUOTE=Tamschi;50007827]A modern CPU's branch prediction should make that loop about as efficient as the unrolled version, so that's fine.[/QUOTE] I'm well aware, just being pedantic about him claiming "no branches". [editline]26th March 2016[/editline] [QUOTE=adnzzzzZ;50003353][B]Cool talk on programming memes [/B]like FP, OOP, ECS, refactoring, code reuse and all the good techniques that make you a good boy programmer.[/QUOTE] Now you're just being nasty.
I'm looking to add some kind of formation algorithm to my bots, could anyone point me into the right direction? I can't seem to find anything. I have my own method but I would like the bots to move to the tightest formation and all take the quickest paths, or something similar. [video=youtube;7s76Go1jres]http://www.youtube.com/watch?v=7s76Go1jres[/video]
[QUOTE=JohnnyOnFlame;50007539]for (unsigned int i = 1; i <= 100; ++i) <-- unless you unroll the loop this should compile into a branch.[/QUOTE] pls don't make me use template metaprogramming
[QUOTE=Anven11;50008687]pls don't make me use template metaprogramming[/QUOTE] Compile with -funroll-loops
[QUOTE=maaatts;50008754]Compile with -funroll-loops[/QUOTE] I'm on MSVC. It doesn't have features that literally no one uses.
[QUOTE=Anven11;50008925]I'm on MSVC. It doesn't have features.[/QUOTE] Ftfy
[QUOTE=Fourier;49997094]WAYWO, I am using laptop keyboard right now to program.. is mechanical keyboard any better? Experiences anyone?[/QUOTE] I have a DasKeyboard Model S with cherry mx blue (the clicky ones). Before that I had a Logitech G15. I'm never going back to rubber domes. And I'm not just saying that because I've spent 130€ for a fucking keyboard, but because they objectively are better. You get a very defined triggerpoint and a great tactile sensation from the click, whereas the G15 gave me rather nasty carpal tunnel because I pressed the keys way too hard. At first one might think that it's a bit ridiculous to pay 130€ for a keyboard, but keep in mind that it's your main tool for interfacing with your computer. If you spend any significant time at your computer, it's a rather hilariously tiny investment in a massive gain of comfort if you ask me. Also, every time I let someone type on my keyboard they tell me that it feels amazing, and they never knew there would be such a difference. My advice to you: Order a keyboard, and give it a good long try. If you don't like it, just return it.
As you can see, Since being green lit I have been hard at work [vid]http://s1.webmshare.com/gP9Q0.webm[/vid] (Sorry for quality, I converted a gif to webm :c)
[QUOTE=Tamschi;50007827]A modern CPU's branch prediction should make that loop about as efficient as the unrolled version, so that's fine.[/QUOTE] I've seen a few recent talks where it was shown that hand unrolling still makes a pretty big difference. It lets other optimizations and hardware features to kick in, like parallel calculation (a single core has multiple calculation units that can work at the same time) and if you're really lucky even vectorization.
[QUOTE=Darwin226;50009185]I've seen a few recent talks where it was shown that hand unrolling still makes a pretty big difference. It lets other optimizations and hardware features to kick in, like parallel calculation (a single core has multiple calculation units that can work at the same time) and if you're really lucky even vectorization.[/QUOTE] That's interesting. I'd have expected that, due to how the prediction is described in my lecture notes, the CPU would at some point parallelise the flattened loop anyway and only discard results after reaching the end. I can see how the counter may disrupt some of that and how it would be unable to use vector instructions as effectively at runtime though.
[QUOTE=Anven11;50008925]I'm on MSVC. It doesn't have features that literally no one uses.[/QUOTE] Speak for yourself, I use unrolled loops regularily on platforms that don't have branch prediction.
[QUOTE=Tamschi;50009231]That's interesting. I'd have expected that, due to how the prediction is described in my lecture notes, the CPU would at some point parallelise the flattened loop anyway and only discard results after reaching the end. I can see how the counter may disrupt some of that and how it would be unable to use vector instructions as effectively at runtime though.[/QUOTE] I'm pretty sure it's in this talk [url]https://www.youtube.com/watch?v=vrfYLlR8X8k[/url] (or the part 2) Even if it's not this, I highly recommend the talk. I thought it would be obvious stuff but I've learned a lot.
still working on my game! i'll post a video of the reloading system soon-ish, for now here's a coolio screenshot of a wounded cloakdude. [t]http://i.imgur.com/65NnnMs.png[/t]
[QUOTE=DrDevil;50009240]Speak for yourself, I use unrolled loops regularily on platforms that don't have branch prediction.[/QUOTE] What year is it?
[QUOTE=maaatts;50012060]What year is it?[/QUOTE] 2016, a year in which microcontrollers with just 8-bits of wordlength are still very relevant. When you only have 16 MHz of processing power to spare, unrolling your loops can bring a significant enough boost of performance on very long loops.
[B]Helicopters![/B] [quote][vid]https://my.mixtape.moe/wwwskg.mp4[/vid][/quote]
Thing I made while staying at my parents' place: (Qt5 + Chipmunk physics engine, written in python) [media]https://www.youtube.com/watch?v=skqmHxAETEw[/media]
I made a Freelancer flight simulator where you can plug in the values from the game itself and get a ship that flies exactly like it would in Freelancer. I actually wrote a big post on this, but it seems weird writing giant walls of text in this thread so if you're curious and want to read about it you can find more info in the video description or [url=https://facepunch.com/showthread.php?t=1459923&p=50012588&viewfull=1#post50012588]the Unity thread here on FP[/url]. [media]https://www.youtube.com/watch?v=GSof6JFxpOw[/media]
Can I get some feedback on the dialog UI. I wanted to keep it simple to match the theme of the game. Also if you are wondering why its a portal cube, Its because you can customize the cube XD. [video=youtube;_MzRNARSh8E]http://www.youtube.com/watch?v=_MzRNARSh8E[/video] Also I know there are spelling errors in the example, But the example is just an example :D
[QUOTE=Sidneys1;50003038]I know I'm a little late, but this keyboard has never let me down. Amazing to type on, and my coworkers complain about the noise from down the hall :v: Buckling springs are the way to go, forget your Cherry MX's! [url=http://www.pckeyboard.com/page/product/UNI0P4A][img]http://www.pckeyboard.com/mm5/graphics/00000001/ultra_classic_white_104_270x270.png[/img][/url] Image links to product page.[/QUOTE] got one of these somewhat recently myself best keyboard i've ever used the curved backplate and dull clack and key actuation corresponding exactly with the tactile and auditory feedback make it great plus i'm a sucker for vintage shit. it goes well with my beigebox that came with a floppy drive. i dont like switches that dont have any tactile feedback at all (mx reds), and while i kinda like the feel of blues, the high-pitched sound and difference between feedback and actuation is a bit annoying. unicomps/model M's aren't great if you want to play games though, the 2KRO can get annoying. the one problem I can find with the model M is that it's too fucking loud. A lot of people love it for the obscenely loud noise, but the truth is, it's hard to use it when other people are around good thing is that if they try to break it, they run into a thick, curved steel back-plate. [editline]26th March 2016[/editline] two piece keycaps are also pretty nice [editline]26th March 2016[/editline] one of my friends has one and he brought it to his comp sci exam im surprised nobody tried to murder him after class
[QUOTE=0V3RR1D3;50013292]Can I get some feedback on the dialog UI. I wanted to keep it simple to match the theme of the game. Also if you are wondering why its a portal cube, Its because you can customize the cube XD. [video=youtube;_MzRNARSh8E]http://www.youtube.com/watch?v=_MzRNARSh8E[/video Also I know there are spelling errors in the example, But the example is just an example :D[/QUOTE] Can't you think of a better way to teach the player to play your game? I'm pretty sure nobody enjoys tutorials, I certainly don't.
[QUOTE=DrDevil;50013978]Can't you think of a better way to teach the player to play your game? I'm pretty sure nobody enjoys tutorials, I certainly don't.[/QUOTE] Yes. You should have a look at Super Meat Boy, it has a great opening.
[QUOTE=awcmon;50013311]i dont like switches that dont have any tactile feedback at all (mx reds), and while i kinda like the feel of blues, the high-pitched sound and difference between feedback and actuation is a bit annoying.[/QUOTE] You should give MX Browns a try then, they have tactile feedback without the annoying click noise, and are also generally quite soft switches. Also they pretty much activate right on the feedback level. They are amazing for long typing sessions, and they are even better with o-rings.
[QUOTE=maaatts;50014307]Yes. You should have a look at Super Meat Boy, it has a great opening.[/QUOTE] Yeah, Super Meat Boy with is super complicated game mechanics.
Sorry, you need to Log In to post a reply to this thread.