Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

2867 Excellent


About irreversible

  • Rank

Personal Information

  • Role
  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. One workaround would be to Watch the variable (as a bounded array): "d3d_byte_code, 30" displays 30 first bytes. TBH I've never seen it hang like this while debugging, so start by adding the array to the watch list and see if it still lags. Hover viewing large arrays seems pointless anyway as you have to click on the lens icon to view the entire contents. Furthermore, a large byte array (especially something akin to what your array name seems to suggest) in general seems like strange thing to debug by hovering over it. So, if VS is freezing when you do, wouldn't easiest solution be to just... not hover over it?
  2. irreversible

    Visual Studio 2017 usability issues

    The ironic and also kind of funny thing here is a blog post by MS a few years ago, explaining why certain C++ features were not implemented (I believe it had to do with something in the standard library). I can't find the topic right off the bat but, as customary, the reasoning was there and it did make sense if you looked at it from a certain angle. The post was inundated with backlash and negative responses along the lines of "gcc has had these for years now" and "it's a paid product", which were valid criticism. From a certain angle. The compiler team (or at least someone from there) were pretty actively trying to respond and calm people down, but you can guess how well that went. I mean, MS's STL didn't even implement emplace_back() properly back then (I'm kinda assuming it does now). I remember reading this and trying to put myself in both shoes. I was biased, of course, because the lack of conformation to the standard was becoming increasingly frustrating and I think I was doing research to make sure it was worthwhile upgrading to 2015 (which I finally decided it wasn't). In any case, the entire "discussion" suddenly took on a completely new look, when it dawned on people that something like one single person was responsible for implementing the STL back end and he flat out couldn't figure out how to make things work. Which is when I formed a completely new view of the VS dev team: - C++ is secondary, if not tertiary or quaternary one their list of priorities - the C++ compiler and likely tools development teams appear to be under-staffed and/or focused on more than one thing. I don't want to bring the word "incompetence" to the table, but some of the bugs and hacks (I'm looking at you, hint files and blatantly wrong underlining), which the team routinely dances around without flat out ignoring on the blog/forums, suggest there is some degree of, shall we say, uncoordination at play here - as far as I'm concerned, a run of the mill text editor should consume around 1-3% CPU when implemented correctly. That's what Chrome is consuming as I type this (and it does dictionary lookups as I type). The fact that VS jumps to 20-40% while I'm typing a damn string, is a disgrace and a testament to the absolute irrelevance of hardware. I'm on a laptop and typing in the IDE drains my battery 3x faster than watching a HD video on Youtube. Let that sink in for a moment. Software was an order of magnitude faster 15 years ago - you still needed to redraw a similar number of pixels every time a key was pressed, but the computer simply didn't have the oomph it has today, so things needed to be handled differently. By writing optimized software. Just recall what it was like to write a Word/Excel document in 2003 and what a pile of broken and unoptimized bloatware 360 has turned into.
  3. irreversible

    Visual Studio 2017 usability issues

    Good to know I haven't screwed up my settings or something. On the flipside, too bad they've apparently opted to implementing a completely new intellisense and broken so many basic things while doing so. Here's a few further observations: - occasionally, the IDE starts chewing up CPU like crazy, getting to 30-40% on my 4/4 core. Restarting fixes this. - the enum auto-complete issue seems to come and go. It did work for an hour and then stopped working again. - rebuilding the database seems to help occasionally. It's a pain, though. Ironically, just as I started to respond to this thread, I got a UX questionnaire when starting up VS in the background. It was surprisingly thorough, but then hard froze the IDE just as I was about to click "Done". As for navigation (and this is not an endorsement) - I've found VAX to be well worth the money they're asking. One of the best things it has is a Ctrl+click to navigate to feature - so if you click on a function name, it lists all declarations and definitions and you can go to which ever you need. AFAIR it does need to be manually enabled though. I wish they made their custom intellisense about 2-3x faster and added a bunch of features the built-in one actually does have. Right now it just feels awkward and unnatural. As for other IDE's - ironically MS's own free Visual Studio Code is actually a fair bit faster, although it does lack many of the features I've grown accustomed to. It's fairly good for GLSL and stuff, though.
  4. irreversible

    Visual Studio 2017 usability issues

    I recently upgraded from 2013 Pro to 2017 Community and I've been putting the IDE through its paces. After a couple of weeks, here are the top things that still confuse me. I'm wondering if there might be something I'm missing. like everyone else, I don't understand the sudden need for the green squigglies. I've seen MS suggest adding problematic macro declarations to hint.cpp over and over again, but that 1) didn't use to be necessary, 2) is a blatant hack and 3) doesn't work occasionally, when writing a new variable declaration or a function definition, I get a sporadic "Object reference not set" error in the form of a modal popup. Usually this happens when I type in a type, a variable name and then press tab (which I do often due to the way I format my code). The error persists until I press OK/Cancel (eg Enter or Escape), then briefly multitask out of the IDE and back again. I used to get this error in 2013, but only occasionally when code peek failed to display something. I can't really find information on the particular flavor of the error on the web despite being eligible for the free Community edition, I bought myself into the new ecosystem by renewing Visual Assist X. Initially this caused massive slowdown issues in the editor, to the point where the screen would be redrawn 2-3 times per second while scrolling quickly. I alleviated this by disabling VAX's own intellisense (which is apparently really slow and feels incomplete) and disabling most extensions I was using in 2013. I'm mentioning this, because it leads me to my next issue: auto-complete (eg the built-in parser) flat out fails in many cases. One most notable case happens when listing enum members, which simply does not work. Now, I don't use vanilla enum syntax, but rather have my own self-unrolling macros that recursively expand enum declarations using FOR_EACH. This, however, was not an issue in 2013 what baffles me even more, is the fact that auto-complete no longer suggests function names and/or signatures when overloading a function in a derived class. It simply doesn't suggest anything build times seem comparable to 2013, but link times can be uneven and abysmal, even when changes are small and incremental Given that the IDE has been out for a while and my whole system is as up to date as it gets, I'm left to wonder if at least some of these issues can be mitigated in some way. Considering that it took me 10+ hours just to find the right config to get the IDE to be responsive without sacrificing too many things I'm accustomed to, it's entirely possible I've missed a checkbox or somehow managed to mal-configure either the VS or VAX. Are you having a similar user experience? Any ideas or suggestions?
  5. irreversible

    Stretched result on sobelx filter

    Your output looks like a multiple of the original output in some form - the basic structure is there, but the image appears to be offset and banded for whatever reason. Are you running your filter in non-RGB mode (eg not per channel)? You really should post some code, and not only the filter but more likely the calling loop and how you output the resulting image. Have you tried a pass thru filter - eg are you getting exactly the same output as the input when no filter is applied? There are so many links here that could be wrong that I wouldn't be surprised if your filter was working properly. Oh and one more thing - have you accounted for a possible alpha channel?
  6. irreversible

    Player to player collision in MMOs

    The way collision works in most networked titles, including MMO-s, is two-fold: 1) the client side code performs its collision tests to provide immediate feedback to the end user, removing lag from the equation 2) to avoid any third party intervention and potentially mitigate player-to-player lag, the server always performs its own collision checks and syncs its state to all players periodically You cannot defer this check to any single client, because doing so is prone to both cheating and technical issues, like rounding errors specific to different systems, which can easily desync the game state. Keep your gameplay code on the server, always. Emulate it on the client to make the local user experience more immediate and responsive, but always, always validate it based on the server state.
  7. irreversible

    Buying a decent last gen laptop in the EU?

    I agree that the Lenovo example isn't strictly generalizable, but the root problem is there. Reviews rarely cover even the most basic flaws that Joe Average may encounter when it comes to the mass market, not preview examples, which are likely to be hand-picked to begin with. Coil whine is a handy example - this isn't something I've read from reviews. It's one of those things you probably don't even know to look for prior to purchase. It doesn't help that not all laptops even from the same skew are made equal so one specimen might have it bad while another might be free of it. Compound this across generations of the same model though, and yeah, I would say it's a pretty gross QC issue, or worse yet - sheer negligence. The bottom line is - for this kind of money one shouldn't feel like they're playing the lottery.
  8. My old laptop body is falling apart around the power connector (thanks again, Acer!) and I'm approaching the critical point where I'm pretty sure I will either short the entire motherboard or lose the connector altogether. I also want an upgrade and this time I figured I'd pay for it. So I started doing research and this is where I'm at. Wants: 15 inch, i7 8550U or better (hence the last gen cutoff), at least 1 thunderbolt, 16 GB ram, 1TB storage or easy access so I can upgrade it myself, battery life 6+ hours when coding (and compiling regularly). Price point is ideally less than €2000, but I'm willing to go as high as €2700 if the laptop is worth it. Nice to haves: touch, good to excellent RGB coverage, weight less than 1.5kg ------------------------------- XPS 15 2-in-1 looks nice on paper, but is off the table due to apparent thermal throttling and coil whine issues. The long-rumored HP x360 Spectre 2-in-1 with RX Vega graphics was supposed to launch on March 16, but so far I've seen absolutely nothing related to it. Previous models have consistently had the same issues as the XPS, though and HP's quality control appears to be horrendous to boot. The LG Gram 15 would actually be GREAT (with one possible caveat), but of course it's limited strictly to the US market. Oh, and it's out of stock, because of course it is. Lenovo's X1 Yoga and X1 Carbon both look fantastic, but I can only find one i5 model of the Carbon in the EU. The high end Yoga is readily available in the US. The P52s looks pretty decent as well and is available, but I can't find any reviews for it. Like - none. Which seems to suggest it's a localization issue. The Surface Book 2 looks nice, I guess. Just one thing, though: the price tag. Oh, and Apple is off the table. Because Apple. As for Acer - I've had 3 Acers now and they've all literally fallen apart (the screen came off, left 5 cm column of pixels stopped working, the body started falling apart around the power connector - in that order). Each lasted pretty much exactly 2 years. tldr; What is going on here? Why is the US getting all the goodies and there seems to be no way to (officially) buy any of this stuff in the EU, AU or presumably elsewhere (I've no idea about the Asian market). I would actually be fine with an incremental release, but I can't even find the older models of the Gram for sale in the EU and there seems to be zero indication as to when any of the above-mentioned models might become available around here. Like - daheck... So yeah - is there something obvious that I'm missing or has this always been the case? Here are a few less related technical questions in case anyone feels like chiming into the conversation: - is 4k on a 15 inch worth anything at all productivity-wise or does is it there to just demolish battery life? - is something as trivial as a cooling pad effective against thermal throttling? - why is quality control so horribly bad in what purport to be high end laptops/ultrabooks? The Lenovo link above has four 5/5 stars and two 1/5 stars, because for 20% of the people, you know, the device's screen came apart in a couple of days. Searching for problems with the XPS or the Spectre turns up a similar ratio.
  9. I already have the code down that deals with signature extraction in very much the same way. I ended up having a little bit of trouble getting it to work with constant member functions, though. Anyway, here's the solution I came up with yesterday. I haven't tested it thoroughly, but it does seem to work. A short rundown of what the code does: - first, remove const from member functions. I don't know why but, return type deduction does not work when const is present and reports the decltype to be an incomplete type. Perhaps someone can fill me in here? - next, use really simple manual return type deduction. - as far as I can tell, there is no way to deduce the current class at compile time without previously noting it down somewhere. This is fine in my case as I'm writing a kind of a plugin system, which requires the user to implement a default interface with something like IMPLEMENT_EXTENSION(...classnamehere...) in the main body of the class anyway. Nevertheless, here the solution is to simply typedef the class somewhere near the top of the class declaration. Here's a short test snippet that works in VS2013. It automatically forwards any call to the base class, but it's trivial to make it do anything. // return type deduction from a member function template<class T> struct return_type; template<class C, class R, class... Args> struct return_type<R(C::*)(Args...)> { using type = R; }; // const removal from a member function template <typename T> struct function_remove_const; template <typename R, typename C, typename... Args> struct function_remove_const<R(C::*)(Args...)> { using type = R(C::*)(Args...); }; template <typename R, typename C, typename... Args> struct function_remove_const<R(C::*)(Args...)const> { using type = R(C::*)(Args...); }; // just to hide the local clutter #define FORWARD_EVENT(_fn, ...) \ using _fn##_FUNTYPE = function_remove_const<decltype(&CLASS_TYPE::_fn)>::type; \ using _fn##_RETTYPE = return_type<_fn##_FUNTYPE>::type; \ return _fn##_RETTYPE(this->TESTBASE::_fn(__VA_ARGS__)); class TESTBASE { public: virtual void voidfn() const { } virtual bool boolfn(int32 arg) const { return arg == 1; } }; class TESTCLASS : public TESTBASE { public: // need this in FORWARD_EVENT() using CLASS_TYPE = TESTCLASS; void voidfn() const override { // returning void is not an issue FORWARD_EVENT(voidfn); } bool boolfn(int32 arg) const override { FORWARD_EVENT(boolfn, arg); } }; I found nothing of this sort on the web, so hopefully someone finds this useful.
  10. That thread deals with RTTI. I need to accomplish this at compile time.
  11. I need to implement really simple event forwarding and I want to avoid two things: 1) having the user type out the name of the current class (or any class for that matter) and 2) having to worry about the return value, which may be void The forwarding itself will be wrapped into something like: bool/int/void MyCustomHandler::OnMouseEvent(int e, int, x, int y) { FORWARD_EVENT(OnMouseEvent, e, x, y); // calls some default implementation for this event } I want FORWARD_EVENT everywhere as long as it is given the name of the function and arguments. Of the the two problems listed above I have (2) under control, and I can also deduce the return value for (1) given a function signature. But I can't figure out if there's a way to automatically deduce the signature. Basically I want the compile time equivalent of this: using t2 = decltype((*this).OnMouseEvent); I've butted heads with member functions before so this has bugged me in the past. So far, as best I can tell there's no real way to accomplish this. I hope I'm wrong
  12. irreversible

    Get HWND of another application

    Read the reply in that thread. It outlines the method and mentions the fact that you may not be dealing with a single main window. Once you can list windows that belong to a process, figure out how to go about doing that to a different process. The first logical step here would be to substitute the current process for what ever process you need. Again, first reply. Note that there may be more than once instance of a single executable running, so you probably need to list all processes called notepad.exe, open each one and list all windows, doing your best to figure out which one is the main window. This may be trivial for notepad.exe, but not so much for something messier, like Gimp. This will only give you a valid result if the user is editing an unnamed and likely unsaved document and only if there is one instance of Notepad running.
  13. irreversible

    Get HWND of another application

    First result.
  14. irreversible

    3rd person camera on "rails"

    Based on your description I'm assuming you're not having trouble with setting up the view matrix so the camera looks at the player. It's not really clear, though, if your problem is related to how to place the camera in the scene so it isn't obscured by objects or if you're simply concerned with the transition from one angle to another. The former is a fairly complex problem and either likely requires manual camera placement or allowing the camera to see through geometry, as for instance in Divinity: Original Sin. The latter kinda depends on the context. Alone In The Dark simply jumps from one angle to another - the effect is jarring and highly effective at briefly disorienting the player. If your locations are more tightly knitted together, you might consider a fast transition and obscure it with something like motion blur or lens distortion (you're likely already using a quaternion to interpolate the position and lookat vector anyway), or if you want to move really slowly and cinematically, you'll need to set up your camera movement manually - eg have it follow a spline and stop at specific locations based on where the player is.
  15. This is actually the problem - yes, the encoding is identical, but all blocks are stored as 4x4 pixels, which are encoded using the original field order. In order to conform a regular DDS texture to GL, the order of individual scanlines (or UVs, as was pointed) need to be flipped vertically. Which is to say, after a texture is encoded, the flip needs to be also performed within each block or you'll end up with a texture with each four-scanline horizontal slice flipped vertically. Simply flipping the rows of blocks would effectively flip the order of the blocks, but not individual scanlines. To fix that, pixels in a block can be swizzled during loading. For BC3 that looks something like this: // (C) 2009 Cruden BV static void FlipDXT3BlockFull(unsigned char* block) { unsigned char tmp = block[0]; block[0] = block[6]; block[6] = tmp; tmp = block[1]; block[1] = block[7]; block[7] = tmp; tmp = block[2]; block[2] = block[4]; block[4] = tmp; tmp = block[3]; block[3] = block[5]; block[5] = tmp; } The problem is that while flipping encoded blocks is fairly easy for BC versions 1-5, the process is not as straightforward for BC 6/7 (and likely also ASTC), which AFAIK necessitates flipping the source texture and then reencoding it. Encoding a large BC7 texture can take on the order minutes so as far as I can tell the only realistic solution is to perform this during cooking. This isn't something I'm just throwing out there, but rather something I'm currently dealing with in my own code. As far as flipping the V coordinate goes, I'm still not sure how to that would work in all tiled cases (see below). Suppose you have splatted surface or some sort of terrain and your V coordinate runs from 0.2 to 18.6 or some other similarly arbitrary tiling. The only way to flip that would be to know the UV bounds, which in itself can be cumbersome if not outright difficult in a shader. Now, what if the texture coordinates are animated?
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!