• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

364 Neutral

About Miklas

  • Rank
  1. Fog of war game logic

    Your question is quite broad, it really depends on your needs. Let's say that you have a data structure holding your level information. If the level is the same for every player, one instance is enough. But if you're saying that different people might see certain stuff, you might want to have an instance for every player, plus a global instance that holds all recent data. If a player sees more, his own instance is updated with the global one.   If you implement the multiple instances, be sure to read/write to the correct one at the correct time. To give an example: in Company of Heroes, path finding is (unfortunately) done on the global instance. This means that I can use this path finding to find out if a certain route is available. (let's say my map shows a bridge in the fog of war. When I give a move order to my troops, I can see if the bridge is available or broken by the path my troops will go, even before they can see the actual area).   Technically speaking, the AI should have the same resources as the humans. However, the fair method makes programming the AI a lot harder: you need to implement certain behaviours (such as "smart scouting"). While if you just give them the full map to see, they know where the resources are without scouting. Because creating a worthy AI is a very hard challenge, AI's are often have access to the global map.
  2. OpenGL Do I (really) need openGL?

    About the 2D/3D: most 2D/3D related calculations can easily be extended (A 2D vector addition can also be done as a 3D addition with the last element zero) and most API's accept 2D data as well.  This means that you can perfectly use the OpenGL/Direct3D or any abstraction (SDL/SFML/Allegro...) for 2D games and still utilize the power of the GPU. Given that a GPU has a raw processing power that is far beyond a CPU's, even for simple 2D games like platformers I'd recommend using it.   About the "do I need a videocard"; the whole pipeline goes a little like this: Application <-> (optional) Abstraction layer (such as SDL) <-> OpenGL/DirectX <-> Video Drivers <-> Hardware   This means that if there is a video driver that uses the CPU instead of the GPU; then you can run a game without a videocard but given the fact that the CPU has a lot less processing power (but is a lot more flexible) it probably won't be very smooth.   The hardware (GPU's) are there because they offer enormous amounts of power, The drivers are there because every hardware is different and every vendor has their own architectures, (and because of this writing code directly for one GPU architecture is a very bad idea!) The OpenGL/Direct3D api's are there because they standardize calls: you don't want vendors to include their own special features so you have to write your graphics code only once to run on all GPU's that support a certain OpenGL/Direct3D level, The abstraction layers are there because the OpenGL and Direct3D API's are suited for all possible graphics applications and libraries such as SDL make certain applications easier (and often provide other features such as input handling which a graphics API doesn't provide).
  3. Use a third party place to paste your code, such as http://ideone.com/ or http://pastebin.com/ The best hint I can give without the full code is try to use the debugger; in your main don't run the game, only test the function with different values and see what value that fails the test.
  4. Good game development books

    It's very hard for us to find out what books you need. You say you know some basics, and that you want to make some game. Still, we don't know what you really known and what genre of game you want to make (or do you want to make an engine, or both?) I suggest you check out the [url="http://www.gamedev.net/page/books/index.html/_/technical/"]books section[/url]. If you find a book you think is interesting, you can usually check it out the first 20 pages or so, reviews and it's probably the cheapest on Amazon.
  5. When I would need an alternative to any software, I usually check out [url="http://alternativeto.net/software/visual-studio/"]alternativeto.net/software/visual-studio [/url] However, I've tried to find a good substitute for VS (as C/C++ support isn't that good) I've tried eclipse, netbeans and code::blocks but I've gone back to VS. No matter how much you hate it, I still find it the best IDE out there. Sometimes a tweak or plugin can help you. I found some plugins that improve the intellisense. PS: where did you find the rumours about visual studio express 2011 is going to be metro only? I think that the express edition is and probably will stay free and keep the functionality that the current versions have. In the worst case you can just keep using your VS10.
  6. [quote name='Laval B' timestamp='1338317195' post='4944400'] *quick version* [/quote] If you want the 'long' version you can check out [url="http://en.wikipedia.org/wiki/Include_guard"]Wikipedia (#include guards)[/url]. This is a pretty 'beginners' error? Perhaps you should check out some more C++ books/tutorials to prevent you from making mistakes like this again. (The more you known from the language, the more optimized and clean your code will be. I speak out of experience [img]http://public.gamedev.net//public/style_emoticons/default/wink.png[/img] )
  7. Java RPG Item system

    You should find a way to store your data in a way that you can read it, [i]without[/i] having to recompile. This means that you should have some files (XML, INI, TXT...) or database that contains the items. Why?[list] [*]Because updating and adding Items is nothing to worry about then: you can then send updates by sending a new [url="http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html"]XML[/url]/[url="http://www.rgagnon.com/javadetails/java-0024.html"]INI[/url]/TXT.. file instead of having to send a whole new build to your clients. You could also [url="http://en.wikipedia.org/wiki/Serialize"]serialize[/url] your classes. This means that you create your classes once, and them saves them to disk to be loaded later. ([url="http://java.sun.com/developer/technicalArticles/Programming/serialization/"]tutorial[/url]) The advantage of this is that your code is harder to manipulate (as people can 'cheat' by editing your XML/INI's) but you have to do more work when creating your serialized objects. [*]You should always program to an interface and not to an implementation. What's the difference? With an interface (look at my UML schema) you can reuse your code. You can then just give new models & new 'item'-files to your clients and you have a whole new game - without touching your source code. You could even do this for your GUI! (For example the source engine does this (known from counter-strike:source, gmod, half-life2, team fortress, portal...). They have created a way to parse '.res' files (see attachement, ChatScheme.txt - this file is from a new GUI for Counter-Strike:Source). By editing nothing else then these files, they have created a whole new GUI) [/list] [img]http://screenshot.xfire.com/s/117027243-3.jpg[/img] Default CSS Gui [img]http://archer.gamebanana.com/img/ss/guis/_2183-.jpg[/img] [url="http://gamebanana.com/guis/24676"]HolmGUI[/url] So your Java RPG engine should be capable of parsing files like this. Of course, a 'basic'(hardcoded) system (like the_neverending_loop suggested) is fine, and then you can expand it to be able to 'parse' the GUI. The more you keep your engine separated from your game, the more you can reuse it in future projects.
  8. Team communication software

    Assembla (see link on gamedev page) or [url="http://www.redmine.org/"]Redmine [/url]as ticket / tracker system. Altough I think assembla is quite good (I'm in love with the cardwall tool) MSN as Instant Messenger / [url="http://mumble.sourceforge.net/"]Mumble [/url]as voice chat And the most important thing: these tools might be great, nothing beats real-life, face to face communication and a wall with post-its ;)
  9. Perhaps [url="http://en.wikipedia.org/wiki/List_of_game_engines"]wikipedia[/url] can help you with your search. You can find a list of all game engines there, sort them by java. You can find and compare some and see what one fits your needs.
  • Advertisement