1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice

Your Personal Micro Blog(s)

Discussion in 'General Discussion' started by tdev, Jan 24, 2015.

  1. Captain. Adam

    Captain. Adam
    Expand Collapse

    Joined:
    Jan 31, 2017
    Messages:
    934
    I spent yesterday walking around the city, I got some cool bus and truck photos, also injured one of my toes in the process :p.
     
    • Like Like x 2
  2. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    I have been having some keyboard related programming fun today.

    Basic premise:
    Different countries use different keyboard layouts. I am making a game, in the settings menu I want to allow for key remapping. The character corresponding to the key must be listed for player reference. You'd think it would be simple right?...

    I am using SFML as the basis for my game engine, its built in keyboard handling system is in fact pretty competent. However, its internal names for each keyboard key are based entirely on the presumption that a US layout keyboard is being used. It also does not provide a way to get a string or char (or any form of text) for the corresponding key that has been pressed (within the context of using the keyboard as an input method for games, it does allow for typing, but that has key repeat's etc).

    Solution:
    SFML is always used internally for detecting key presses, since it does a good job of that for video games, and windows does not.

    However, for the string representation I now have a system in place where the game will chose between my own SFML based lookup table and the OS's typing input, based upon which is most likely to be correct. I still doubt this system will work perfectly in all cases, but it should be 'good enough'.
    • Are you pressing a number pad key? SFML it is then, since as far as windows is concerned, 8 is 8, regardless of which '8' key on your keyboard it came from, which could be confusing if you have them both mapped to doing different things.
    • Are you pressing a letter key? Well SFML has no idea what keyboard layout you are using, so hopefully your OS does, that gets used instead.


    I swear, there are some parts of computing that are handled in such a dumb way. Sadly though, there is no way around that, because history exists*.

    *And no country wants to re-learn how to type, and replace their keyboards. Especially when society can hand the burden of the problem to developers to fix silently without themselves knowing the pain that this sort of stuff causes xD
    Of course, I'm not about to give up my UK layout keyboard. So... Uhmmm... Screw you my fellow programmers, its your problem now :p
     
  3. NOCARGO

    NOCARGO
    Expand Collapse

    Joined:
    Apr 1, 2019
    Messages:
    1,470
    I remember a long time ago when BASIC still was used the keys where all mapped to a string number, for instance
    CHR$(13) was related to the enter key :)

    Speaking of programming would you perhaps want to take a look at my thread in the programming section ?
     
  4. iTzPolipolo

    iTzPolipolo
    Expand Collapse

    Joined:
    Mar 4, 2015
    Messages:
    230
    I'm going to get into a new hobby: fpv drone freestyle, somebody here likes it?
     
  5. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    Typically they are still mapped to numbers. However, it is quite common to refer to those numbers using an enum, which makes the syntax much nicer and more flexible.

    You can see an example here: https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1Keyboard.php

    So 'A'=0, 'B'=1 etc... They work just like numbers, you can do maths with them and so on. Perhaps the nicest thing is that providing you don't rely on a value correlating with a specific number, you can add more "stuff" into the middle of the enum, and even though the numbers will change, your code will still run like before, since the names were used instead.
    --- Post updated ---
    Jalkku has some stuff: https://www.youtube.com/user/zali94/featured
     
  6. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    Rebuild PC, now with Corsair H100i Pro as I was running out of room for VRM cooling, had to do some case modding as water cooling support was not quite compatible with VRM heatsinks.

    There is cutout back of motherboard in my case, but from some reason it is 5mm too small, so backplate screws are blocked just enough to not get them opened without removing motherboard, but that was not an issue as motherboard was out already.

    Not much improvement on cooling, but lower noise levels than air cooler for same temps.

    I just hope there is not going to be leaks.
     
    • Like Like x 1
  7. RedHorizon

    RedHorizon
    Expand Collapse

    Joined:
    Aug 17, 2012
    Messages:
    425
    Very interesting; I’m out near Chandalar myself, and supposed to be in Bethel in a month or so for the season. I’m a gold miner, most of the time I spend in AK is fairly remote.
     
  8. NGAP NSO Shotgun Chuck

    NGAP NSO Shotgun Chuck
    Expand Collapse

    Joined:
    Mar 6, 2015
    Messages:
    1,445
    A gold miner, huh? Nothing so glamorous for me. I'm in retail data collection. Usually field intelligence, but I need all the hours I can get and don't really have anything going on at the moment, so when one of the reset team people needed more reps for Dillingham my boss passed my name along and I bit. They asked if I'd go to Barrow before I even finished that one, and I'll probably be going to Emonak or however you spell it at some point too.
     
  9. RedHorizon

    RedHorizon
    Expand Collapse

    Joined:
    Aug 17, 2012
    Messages:
    425
    Nice! There really isn’t a lot of glamour in mining, mostly just knee deep in mud and misery until you fly home. I hope to be out of the industry soon.

    Barrow is horrible (the whole north slope is), never been to Emmonak myself, sounds like another coastal village; tiny, wet, and expensive with really amazing scenery. Enjoy your time in Alaska, check out everything you can, it’s a very unique place.
     
    • Like Like x 1
  10. NGAP NSO Shotgun Chuck

    NGAP NSO Shotgun Chuck
    Expand Collapse

    Joined:
    Mar 6, 2015
    Messages:
    1,445
    Indeed it is, and I once wanted to spend my life here. Now? I wish they'd stop derping around with the PFD refunds and just get that over with so I could escape before 2023. I'm so tired of snow, you wouldn't believe it. Not sure where I'd go though.
     
    • Like Like x 1
  11. RedHorizon

    RedHorizon
    Expand Collapse

    Joined:
    Aug 17, 2012
    Messages:
    425
    I hear that.
     
  12. Captain. Adam

    Captain. Adam
    Expand Collapse

    Joined:
    Jan 31, 2017
    Messages:
    934
    This is the result of playing SC4 non-stop for an entire week.
     
    • Like Like x 5
    • Agree Agree x 1
  13. Taza

    Taza
    Expand Collapse

    Joined:
    Nov 8, 2015
    Messages:
    1,346
    On Thursday I didn't know how to render stuff with blender. So I made these:
    sad_bois3_fhd.png sad_bois_fhd.png
    Quick and pointless stuff, but at least it's easier than drawing!
     
    • Like Like x 5
  14. skodakenner

    skodakenner
    Expand Collapse

    Joined:
    May 24, 2015
    Messages:
    1,412
    I went to the porsche museum yesterday i still have mixed feelings about it firstly driving in stuttgart is hell secondly the porsche museum itself is way to expensive 20 euros for parking and tickets (the audi museum cost 4 euros and parking was free) and then there arent that many cars in there (yes porsche doesnt have that many cars but only 6 911's and not even every gen?). But i atleast saw my favourite porsches the 928 and i noticed my octavia has a way to small fuel tank with only 45litres but it makes 234kph on the autobahn without giving full throttle
     

    Attached Files:

    • 20190406_141918.jpg
  15. NGAP NSO Shotgun Chuck

    NGAP NSO Shotgun Chuck
    Expand Collapse

    Joined:
    Mar 6, 2015
    Messages:
    1,445
    I want a 928 so badly.
     
    • Agree Agree x 1
  16. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    I remember when those 928 were super cheap to buy, probably has gone up in prices now, but at one point there were enough cheap to be cannibalized for motorsport builds.
     
    • Like Like x 1
  17. skodakenner

    skodakenner
    Expand Collapse

    Joined:
    May 24, 2015
    Messages:
    1,412
    Here in germany theyre really rare and somewhat expensive also they usually have loads of kilometers on them like 300k but still with theyr first engine
     
  18. rottenfitzy

    rottenfitzy
    Expand Collapse

    Joined:
    Mar 7, 2015
    Messages:
    680
    They can be found under $10k in the US, but they’re pretty much auto only.
     
  19. skodakenner

    skodakenner
    Expand Collapse

    Joined:
    May 24, 2015
    Messages:
    1,412
    So over here theyre planning to do a additional tax on things that emmit co2 petrol will cost 1.90 per litre but we wont get more money. So to the point any ideas where to move thats like a eu country but not in the eu?
     
  20. NGAP NSO Shotgun Chuck

    NGAP NSO Shotgun Chuck
    Expand Collapse

    Joined:
    Mar 6, 2015
    Messages:
    1,445
    I wouldn't have a clue. Most of the time the countries that don't do this kind of garbage are the "not very nice" ones.
     
    • Agree Agree x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice