• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

TheChubu

Members
  • Content count

    2049
  • Joined

  • Last visited

Community Reputation

9442 Excellent

About TheChubu

  • Rank
    Contributor
  1. I recommend you read this first instead of whatever tutorial you might find: https://docs.oracle.com/javase/tutorial/networking/sockets/ It's not game oriented, but it explains the workings of the standard Socket related classes. It's official stuff from the company that currently owns Java. Second, either make up a coding standard of your own, or follow Java's. Don't do half your stuff in camelCase and the other with underscores. Any IDE will help you with this (ctrl+shift+f to format the code in Eclipse for instance). Third, Never do that unless you know exactly what you're doing. Your code could be failing in 15 different places and you wont know because you're eating up the errors without printing/signaling anything meaningful. You'll waste a lot of time finding those errors that way. Either re-throw the exceptions as 'new RuntimeException(ex)' so the program outright fails and stops (you'll know exactly when that way), or at least print the stack trace and continue. Fourth, it is wise to avoid threads for now. You still have a lot in your plate, starting with client-server is hard enough already. https://docs.oracle.com/javase/8/docs/api/java/io/DataInputStream.html#readLine-- The docs even tell you how to use BufferedStream. Become used to read the documentation. It's probably one of the big benefits of using Java. Easy docs available and IDE (Eclipse/Netbeans/IntelliJ) integrated, by just hovering over any standard method/class you should get a popup with the related javadoc snippet.
  2. Yes, keep at it.
  3. C#

    Those specific settings come from the app.config file, which is tightly integrated with VS. You don't use them because you don't know how to read a text file, you use them because Visual Studio can assist you in creating/managing them. With a spec file you get a settings editor, and VS can generate the strongly typed Settings.Default object that lets you read the properties as properly typed fields from it. In ASP in particular it even hot reloads the file and re assigns the fields if you change your web.config. Anyway, read this issue https://github.com/dotnet/corefx/issues/1348 Apparently they're not supporting them anymore. A guy there suggested to use https://github.com/aspnet/Configuration/ instead. You *could* just try to import System.Configuration assembly and see how it goes.
  4. You don't get into indie dev because you're hopeful for the future, you get into it because you have no hope left. Nothing matters. We're all going to die, specially you. Make some games.
  5. Surely if you have 15 years of experience you could tell us what has been your rate in all those years?
  6. I like it so far! Hoping for that dark theme
  7. Whoa, it ain't supported in any GL 3 level hardware. 
  8. The rather straightforward way is just to notify all systems when an entity is either added or removed from the simulation. You will have a way to add or remove an entity to the simulation eventually, something like I dunno, scene.addEntity, world.addEntity, game.addEntity, etc. There is your chance to let the systems know such thing happened, so the systems can check if the entity is of any use for them (ie, if it has the necessary components). If it is, then the system keeps the entity in its own entity list which knows wont be missing anything important. The system will use this internal list when it is time for processing the system. When an entity is removed, you notify all systems, and if a system had that entity, it removes it from its internal list. Think that an entity will be processed many times, and with an explicit added/removed step you only pay the "filter" cost once, when it matters. Fastest way to filter entity components I know is just to use a bit mask to mark what components an entity has, and another mask to mark which components a system needs, so all you need to do is (entityBits & systemBits) != 0 and you'll know if it should belong to the system's entity list or not. EDIT: Also you might need more "advanced" filtering like "add an entity if it doesn't has this component" or "add an entity if it has any of these components", etc. All pretty workable with bitsets. Anyway, in my ECS framework I accumulate removed, added and mutated (ie, component added/removed) entities in lists inside my game World instance. Then, in the step of the game loop, before processing all the systems, I hand each list to each system so they can re-assemble their internal "active" entity list. Then I process all systems. This is nice because it is very deterministic, you wont have a system adding entities to its active list in the middle of the frame.
  9. It's quite true that via decompilers you can get fairly workable code out of .class (or .dex) files. Which is much better than what you can get from say, a decompiler and a native lib, which basically will just declare a bunch of variables with register names, assemble something resembling a function declaration with a bunch of void*, and call it a day. With that said, even if you're making a native game, you have to work out a way so the server can verify the information the client is sending. You can't rely in "oh it's a native file so users wont modify it!" and not check what the client is telling you. So whatever you chose, you'll have to do the legwork all the same and make up a scheme that lets you verify what the client is telling you. Now if the game is single player, do you honestly care that much that people modify the game? Let them eat cake. 
  10. I'd give TheChubu all the money I have. Just a thought.
  11. I'll add something to this. HotSpot, which is OpenJDK's JVM, is friggin nice. It lacks a bunch of stuff the CLR does well, like more fine grained control over GC and reified generics, *much* nicer native interop, value types, and so on, but it does quite a bunch more than what the CLR (or CoreCLR, or Mono) does. For instance, check this blog article: http://www.nimaara.com/2016/03/06/beware-of-the-idictionary-tkey-tvalue/ If you run that on VS (or LINQPad which is pretty cool I recommend it), it behaves much like the blogger posted. Takes a good while (1 second on a Haswell i5 IIRC last time I tried) on that empty foreach, and takes even more and generates garbage if you use IDictionary because of the mentioned reasons (IEnumerator vs Enumerator, struct vs class, yadda yadda). If you try to do a benchmark like that in Java (more specifically, with HotSpot), the equivalent code should be something like this: public static void main ( String[] args ) {      // Look ma! No value types! No reified generics! HashMap<Integer, Integer> dic = new HashMap<>(); // Stopwatch in C# is also much nicer to use than this. long start = System.nanoTime(); for ( int i = 0; i < 100000000; i++ ) { // Also C#'s KeyValuePair is a struct, much more efficient than HashMap's Entry objects. for ( Entry<Integer, Integer> item : dic.entrySet() ) { ; } } long diff = System.nanoTime() - start; StringBuilder result = new StringBuilder(); // To milliseconds. result.append( diff / 1000000.0d ); result.append( System.lineSeparator() ); for ( GarbageCollectorMXBean gc : ManagementFactory.getGarbageCollectorMXBeans() ) {          // Never cared for printf so I wont use it :3 result.append( gc.getCollectionCount() ).append( System.lineSeparator() ); } System.out.println( result.toString() ); } If you run that on Java/HotSpot it takes a whooping amount of 90ms on my Sandy Bridge i5, with zero collections. If you replace that "HashMap<Integer,Integer>" with it's interface counterpart Map<Integer,Integer>, like the blogger did, it takes a whooping 90ms again, with zero collections again. You might think the bytecode compiler is optimizing something but it isn't, it has those interator.next() calls and so on. CLR is a literal JIT. It compiles methods as you call them, and doesn't bothers to think (too much) about what your method is actually doing, nor how it is used. It JITs all the methods the first time you use the, stores them in a cache and goes its merry way. This actually makes it a very fast JIT to use, startup times are pretty good in .NET. HotSpot on the other hand inspects what your code is doing, and in this case, it knows it is actually doing nothing, so it optimizes it away. EDIT: On further testing, it doesn't optimizes away the loop, but it does do the following: It doesn't cares if you define your local variable as HashMap or Map or whatever, it knows that you're actually using a HashMap instance, so it can do nifty things like inlining the HashMap Iterator implementation, or better yet, do escape analysis on the Iterator instance since it knows it wont live outside the method's scope, it wont even be allocated in the heap. EDIT: More specifically, it inlines HashMap's methods, EntrySet methods and EntrySet's Iterator methods, and performs escape analysis on the iterator itself so it's stack allocated. The only thing not inlined is HashMap's constructor since it is called only once. For HotSpot, it doesn't matters if you're using interfaces, concrete classes or abstract classes, if your inheritance tree is 2 level deep or 10, it only cares for what you actually use, so if you're only using one actual concrete implementation of a method in a particular call site (ie, most of the cases), it is perfectly capable of de-virtualize it, inline it and re-optimize it. This is why a benchmarking framework like JHM exists for Java, because it is actually pretty hard to measure things in HotSpot. If you're making naive benchmarks like you see in C# which have short methods, long but empty loops, or don't do anything with the instanced objects they're measuring, and so on, it will most certainly optimize it all out and inline the fuck out of all there is left, skewing your benchmarks a lot.   Have in mind CoreCLR might be in the path of re-creating all these tricks in it, given I've seen discussions in GitHub about implementing tiered compilation like HotSpot's for instance, that's a long way to go though.
  12.  Yup, what you're looking for is an ORM framework, object-relational mapping framework. Most popular in C# is probably Microsoft's EntityFramework (which is pretty nice). With VS tooling you can generate classes from a schema, manipulate instances of them and EF will translate all the actions to SQL in the background and execute it. There is also Hibernate's port for .NET, NHibernate. EntityFramework code looks somewhat like this: // This will use the DB specific driver underneath registered for the provider you selected in your connection string, // might also do nifty things like connection pooling, but you wont directly handle any of that. using(var ctx = new EntityContext()) {   // This is translated to a ' select * from CLIENT where NAME = "Phillips" limit 1' query or something along those lines.     // 'First' call is terminating so it executes the query and fetches the result   var phillips = ctx.CLIENT.First(e => e.LAST_NAME == "Phillips" );   // This will be translated to an update.   phillips.DELIVERIES_MADE += 1;   // This will execute any update EntityFramework recognised in its entities.   ctx.SaveChanges(); } It also supports arbitrary select with annonymous objects like this: // This will issue a 'select ID, DELIVERIES_MADE from CLIENT' kind of query. using(var ctx = new EntityContext()) { // Here the terminating operation is "ToDictionary", if it isn't called, the query isn't executed.   var deliveriesById = ctx.CLIENT .Select(e => new { Id = e.ID, DeliveriesMade = e.DELIVERIES_MADE }) .ToDictionary(e => e.Id, e => e.DeliveriesMade); }
  13. Yeah, after the first "oh I lost the work I haven't commited in the whole day!" event I think it becomes obvious what "culture" should be followed right? Also, as Hodg said, branches. As many as you need. Also the "organization culture" thing isn't applicable here, guy seems to be working on his own. So it is irrelevant. Real men merge every single mistake they made, no regrets  :D
  14. All I've read says that Minecraft indeed has many design mistakes. Thus why mods that more-or-less re-implement parts of the game to make it run better are so popular. On the other hand that should be at least somewhat encouraging, you don't need perfect code for commercial success, hell you don't even need to use the most widely used tools for the task at hand. Maybe the "next Minecraft" will be coded in PyGame, who knows, and there are plenty of popular GameMaker games. You don't need to start with C++, Direct3D 14 and coding your own physics engine.   EDIT: Whoa yeah, the more I Google the more I find snippets of Minecraft code doing stupid shit in the game loop. No wonder it runs like crap. Well probably in latest releases runs better, haven't tried. You can probably do better, whatever language you end up picking (unless it's PHP).
  15. You don't need a new IDE for this, you need to use version control. GitHub provides free repositories for git, *if* they're public, BitBucket provides free private repositories, for git or mercurial, *if* you have a small team (or no team at all). That ought to be enough to get you started. Not using VCS is irresponsible at this point. It's your development time on the line. One power surge and no IDE in the world will protect you against that.   Still, if you're just shopping around for multi platform IDEs, there is QtCreator (free, Qt-dev oriented but it's a general purpose IDE), KDevelop (free), Gnome Builder (free, in development) and CLion (non-free, but if mentioning "JetBrains" gives you a hard-on like for so many people I've seen, you might like it).