Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

4545 Excellent

1 Follower

About Aldacron

  • Rank

Personal Information


  • Github

Recent Profile Visitors

29130 profile views
  1. I had been visiting some of the independent, pre-GDNet sites as a 28-year-old wannabe game programmer just learning my way around C and Java. IIRC, I saw an announcement on one of the sites around the time GDNet launched. I believe at the time, I was spending most of my bandwidth at Andre LaMothe's XTreme Games forums, so it was a while before I finally got around to signing up here in October. Eventually, I was visiting here every day and did so for several years until life got in the way. I still check in from time to time, still mostly the lurker I've always been. Congratulations on keeping it going so long!
  2. The D programming language has been around for several years and has been used commercially in the game industry by Remedy (most notably in Quantum Break). DConf has been running every year since Facebook hosted the 2013 edition. This year it's in London, hosted by Symmetry Investments at a venue operated by Inmarsat near Old Street Station. The sponsors have announced a 50% discount for students, academics, and major open source contributors. Hardship rates are also available for those who would like to attend but can't afford the registration fee.
  3. The D programming language has been around for several years and has been used commercially in the game industry by Remedy (most notably in Quantum Break). DConf has been running every year since Facebook hosted the 2013 edition. This year it's in London, hosted by Symmetry Investments at a venue operated by Inmarsat near Old Street Station. The sponsors have announced a 50% discount for students, academics, and major open source contributors. Hardship rates are also available for those who would like to attend but can't afford the registration fee. View full story
  4. Aldacron

    Symmetry Autumn of Code

    The D Language Foundation and Symmetry Investments have partnered to host the Symmetry Autumn of Code. We're looking for three university students (undergrad or postgrad) who are interested in getting paid to hack on some D code for four months. Each participant will be paid $1000 for each of three milestones, with one participant being selected at the end of the event for an additional $1000 and a free trip (transportation, hotel room, conference pass) to DConf 2019. Applicants are free to propose any project that will benefit the D ecosystem, either as contributions to existing projects or something entirely new. Preference will be given to projects where the primary development occurs in D. If you've never programmed in D but have experience with C, C++, Java, C#, or similar languages, it won't take you long to get up to speed to the level you need to participate. There's enough shared with other C-family languages for instant familiarity, and the differences can be learned as you go. While actual game projects are unlikely to be selected, there are plenty of opportunities for participants to put their game programming skills to use. For example, one of the suggested projects on the Wiki is a 2D rasterizer for resource-constrained embedded systems. There's no need to limit yourself to what's on that page, however. Any sort of 2D or 3D, or even GUI, library is fair game. Something related to networking or AI, or VR, maybe port a project you already maintain in another language. Wherever your skills and interests lie, if you think it can enhance the D ecosystem, then don't be shy. This is a good opportunity to add a new language to your skill set (or put your existing D knowledge to use), make some extra cash, and potentially get a free trip (the past three DConfs have been in Germany, the previous three were in the States). If you're interested, the details are on the D Blog. If you're just curious about D, then dlang.org is the place to start. Checkout the DLang Tour or Ali Çehreli's excellent (and free!) book, Programming in D. There are a number of people in the D community doing game development (including a couple of former Remedy employees who were able to use D in Quantum Break). Good luck!
  5. Aldacron

    Allegro Lives! Try it today!

    As the maintainer of the Derelict packages, I second this! DerelictAllegro was never finalized as I had difficulty getting it to behave properly on OS X and didn't have the bandwidth to solve the problem. SiegeLord's binding just works. And although it has a link-time dependency (which the Derelict binding does not), the fact that it's actively maintained and up to date is a big win. I have enough on my hands with all the other Derelict packages and don't keep up with Allegro as much as I used to.
  6. Aldacron

    Is Sublime Text a valid option for C++ development?

    I use Sublime Text for most of my programming (C, C++ and D). I use Premake to manage the builds. I generally develop on Windows with MinGW and keep an MSYS 2 window open in the background. You can can configure Sublime to build from short-cut keys in the editor, but my fingers are so used to `alt-tab` followed by the up arrow once or twice for the command I want (to generate a new makefile if I've added any new source modules, otherwise to build & run the program) that it's second nature to me now. That, and I don't like how the output looks inside Sublime when building from within it. Now and again, I'll generate a Visual Studio project to make sure it all still builds there. So yes, it's a perfectly fine option for C and C++ programming if you don't mind working with the command line. I also like VS Code, especially its built-in terminal (`ctrl-~` to open/close). I would probably prefer it if it were as snappy as Sublime, now that there's little separating them feature-wise. And the fact that I actually paid for Sublime 2 and upgraded to 3 makes me feel somewhat compelled to put it to use :-)
  7. Love the idea of sending feedback in the game world. To keep your inbox free of spam, then instead of sending an email directly to your inbox, you could set up a server for it and send it in any format you'd like. Then it could be stashed in a database, viewed on a web page, exported to a spreadsheet, filtered for keywords, or whatever. Anyway, enjoyed the post.
  8. I doubt the error message is coming from SDL_QueryTexture (it shouldn't be attempting to load any DLLs). I see two problems with your code that you need to correct before reaching that conclusion. First, you aren't checking the return value of the function call. The function is documented to return zero on success and a negative error code on failure. Second, based on your usage of w and h in textRender, it seems you've declared both as pointers. This is likely the source of your segfault. SDL_QueryTexture does not store pointers to ints in the width and height parameters. It stores the actual values of the width and height. That means you have to pass it the addresses of actual int variables, not uninitialized int pointers. In other words: // This is certain to cause a segault int *w, *h; SDL_QueryTexture(tex, NULL, NULL, w, h); The correct way to do this is like so: int w = 0, h = 0; if(SDL_QueryTexture(tex, NULL, NULL, &w, &h) < 0) { fprintf(stderr, "Error on texture query: %s", SDL_GetError()); }
  9. Aldacron

    Try Catch Statement Question [2]

    No, that's not quite right. You can throw an exception from inside any class method, but the object you throw has to be in the java.lang.Throwable hierarchy. For instance, you can't, for example, do "throw new Integer(1)" because the class Integer is not a subclass of Throwable. The compiler sometimes inserts instructions into the generated byte code that check certain operations and throw exceptions if you've done something the language spec says you aren't supposed to. For example, accessing a null class reference will cause a NullPointerException to be thrown, or you get an ArrayOutOfBoundsException if you try to access an array with an invalid index. ArithmeticExceptions are thrown when you do something like divide by zero, or some other invalid operation. Conceptually, it's no different than if you were doing the check yourself, perhaps something like this: int divideInts(int lhs, int rhs) { if(rhs == 0) { throw new ArithmeticException("Divide by zero!"); } return lhs / rhs; } Except the compiler inserts the check for you. This is not "throw" but "throws". It's called an Exception Specification and tells both the compiler and the programmer which exceptions a function might possibly throw. Your Java book should have told you that there are two types of exceptions in Java: checked exceptions and runtime exceptions. Any checked exceptions a method might throw must be specified in an exception specification in the method signature. Any methods calling that method must either catch and handle those exceptions, or also include an exception specification. Runtime exceptions are exempt from these rules. They may still be caught, but they are not required to be and they are never included in exception specifications. NullPointerException and ArithmeticException are examples of runtime exceptions (as is any exception type that extends java.lang.RuntimeException). If you have a method that includes a "new ServerSocket", then you need to either wrap that up in a try..catch and handle any IOException that is thrown or add a "throws IOException" specification to your method signature, since IOException is a checked exception. Any other checked exceptions your method might throw, either because you choose to throw them or because you call a method that throws them and you don't catch them, will also need to be added to the specification. I don't know which book you're reading, but I feel I should recommend Core Java by Clay Horstmann. He goes into a lot of detail and covers a number of corner cases that most books don't. He explains exception handling particularly well.
  10. Aldacron

    Try Catch Statement Question [2]

    This is the kind of thing you can figure out in two minutes. Knock up a simple test program like this one: class Foo { public static void main(String[] args) { try { throwIfLessThan(5, 10); System.out.println("After function call"); } catch(Exception e) { e.printStackTrace(); } System.out.println("Outside the catch block!"); } static int throwIfLessThan(int i, int n) throws Exception { if(i < n) { throw new Exception("i is less than n!"); } return i + n; } } Then javac Foo.java followed by java Foo should answer your question. Spoiler alert: The first println is never executed if the exception is thrown. Yes. For one, it gives you the freedom to move the error handling from the lowest level call site to the most appropriate place for it to be handled, without worrying that error codes are checked appropriately all along the chain. For another, it provides a mechanism for resources to be automatically cleaned up regardless of whether or not the exception is thrown (in Java, via the AutoClosable interface, in C++, by ensuring destructors are called as the stack unwinds).
  11. Aldacron

    SDL 2: Implementing Sprite Clips

    I strongly recommend you pick up a copy of Understanding and Using C Pointers. It covers a lot of ground, even some that intermediate C and C++ programmers might be ignorant of. If you grok the material in that book, you'll be much more able to recognize any self-inflicted pointer-related bugs (and they almost always are self-inflicted) when they pop up.
  12. Aldacron

    GameDev.net Turns 18!

    Somehow this makes me feel much older than I am. But happy birthday!
  13. Aldacron

    OpenGL 2D RPG examples/source code

    In the "In Practice" section at learnopengl.com, you'll find a tutorial for a 2D Breakout game.
  14. You're already doing that anyway, so how does using Kyronet mean you can't continue? You can use Kyronet or any other networking library to implement the server and then use any language + library combination you want to implement the client. All the client has to do is open a single socket, connect to the server, and start parsing packets. It need neither know nor care how the server is implemented.  
  15. Aldacron

    How to use namespaces in structuring a project

    In my experience, there are generally three camps on this. One says that namespaces should never be used as an architectural device, but solely to disambiguate symbols and avoid collisions. Another says that the namespace is a great tool for creating a modular hierarchy. Those in the third camp take no position either way and do just whatever feels right at the time.   So the advice I give to you is: do whatever you'd like. Companies that use C++ will have in-house coding guidelines that will (or should) specify how they want you to use namespaces. On your own time, as there's no One True Way here, you can do as you please. If that means not using namespaces at all, that's fine, too. Though, I do advise that if you're considering releasing a library for general consumption and the user experience is important to you, then you should first take a look at existing popular libraries in that domain to see what they do.
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!