• 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.

Froyo

Members
  • Content count

    9
  • Joined

  • Last visited

Community Reputation

201 Neutral

About Froyo

  • Rank
    Newbie
  1. Thanks, I know A LOT of games use ini, but honestly have never edited one, what are the advantages? surley if it is simply writing values to the file, i will come across the same uglyness of writing to a txt file and again can easily get a little sloppy.   Are there any good web-tutorials on ini? quick google, didnt really show any promises :/   Thanks though You shouldn't need a tutorial to make INI files, they're pretty simple and informal. They're just plain text files with name-value pairs.   http://en.wikipedia.org/wiki/INI_file   As far as integrating it with C++, just stream to write/read file from the file.
  2. Literally every question you posted can be found on these forums. I don't mean to be rude, but use the search feature so somebody else doesn't have to for you. These threads come about very often and have been answered countless times before.
  3. I really need to find a good tutorial like this for Java. The ones I've looked at haven't been much help.. maybe it's just me though.
  4. Java for Dummies helped me learn pretty quickly, but I also had a pretty deep knowledge in other programming languages. As far as gaming is concerned, you should try reading "Killer Game Programming". It's pretty old but it is still very helpful. http://fivedots.coe.psu.ac.th/~ad/jg/
  5. I've had pretty good results with Thread.sleep() but I haven't tried using a timer so I can't speak about that. I had a 2D game with a top-down view (like Zelda LttP or Pokemon) and I've ran it for 45 minutes to an hour with 0 frames lost at 30 frames (and game.updates()) per second. Haven't tried it any higher but that's only because I don't have a reason to.
  6. After some research I found that HashTable is included in a Java package "Java.util.Dictionary", but it is legacy now. Using a HashMap seems to be the way to go, so I'll try that for now. I looked into some spacial data structures and I think I'd like to avoid them for now if possible. R-Trees and Quadtrees are the two I looked at and to be honest they seem pretty daunting to me at a glance. I think I'd be better off using conditionals to check the coordinates of an object on the game map.
  7. [quote name='marc40000' timestamp='1346604037' post='4975765'] I think you need something like this. While an array might not be the best choice, you need a place where all you game objects are put in so you can do things with all of them like your move() or a general gamelogicupdate() or a render() etc. I prefer to have a hashtable to store my game objects in. This comes with some handy features: - you can still iterate over all your objects - every object you create can get a unique id and you can store it in the hastable by that unique id. With an array you could use the index for that, but as the game continues, you get higher and higher ids while old objects get removed and you get holes in your array. OR you could put new objects at the places of removed objects, but then, your index-ids aren't unique anymore. - each object having a unique id allows objects to reference each other without tricky sideeffects. For eaxmple imagine a unit A chase another unit B. You could add a reference of B in A and that way A can check B's location in the gamelogicupdate() and knows where to move. However, what if B gets destroyed? It get removed from the scene, but it keeps existing because A has a reference to it. If A only knew B's id, it can do the same as above by checking the hashtable of B and get B's position. When B gets destroyed, A will notice because the hashtable lookup will fail. Also note that references/pointers are only valid locally. When you add network play, you absolutely need some kind of unique ids. Instead of a hashtable one could use a map. Besides that, you probably want a spatial datastructure as well to put your game objects in so you can do queries like "give me alle objects within a radius of 5m of point p.". One might be able to combine these datastructures somehow, I don't know thought. I always used those two next to each other. [/quote] This is what I was looking for. I've never dealt with hashtables or maps in Java so I'm gonna go ahead and look at some references on those now. I appreciate the help! Edit: At a glance, I notice that hashtables are similar to associative arrays in other languages. I take it that I'd still have to iterate through the hashtable and call [i]GameObject.Update()[/i] on each iteration. Do you think this is better than an object recursively controlling itself? I'm trying to choose the best method to handle objects before I expand and cause a jumbled mess for myself.
  8. [quote name='Uzumakis' timestamp='1346593939' post='4975725'] Acc to the current situation that goes without any doubt that you code will get more and more complex with the increase in the number of the units there will be more loops more array and so on insted of using loops for ur job why dont u give a try to a time class makin and independet method for each class or making a sinlge one and adjusting all the elements acc to that single timer results way easier then that for loops [/quote] Are you saying I should make each object update on its own (either by making it runnable or using a while loop)? I guess I'm not understanding how this would work where the object would still be able to interact with everything else that is updating on a different cycle.
  9. I'm currently making a 2d RPG in Java and its engine is coming along quite nicely.. however I am a bit confused on how I should handle a certain situation. I have a class [i]Unit[/i] which is any game character (subclasses for NPCs, Player, etc). The problem is there are always going to be several instances of this class and each one will need to update independently each time the canvas is rendered. What's the best way to manage this? Currently each time gameUpdate() runs (optimally 60 times per second), it loops through an ArrayList that contains each [i]Unit[/i]. Is there any way to forego using an array to handle each object? It seems like using an array like this will come back to haunt me when the game is more complex. This is what I have now and I'd like to improve it or scrap it altogether. [source lang="java"]package engine; import java.util.*; public class ObjectHandler extends ArrayList<GameObject> { private static final long serialVersionUID = -8598610051757901108L; public ObjectHandler() { System.out.println("ObjectHandler loaded."); } public static ObjectHandler getObjectHandler() { if (ref == null) ref = new ObjectHandler(); return ref; } // This method is ran every time // the game is updated. gameUpdate() public void update() { for (int i = 0; i < size(); i++) { get(i).move(); } } // This method is ran every time // the game is updated. gameRender() public void drawList() { String name; for (int i = 0; i < size(); i++) { name = null; name = get(i).name; } } /* OBJECTS ADD THEMSELVES IN THEIR CONSTRUCTOR * public void add(String unitName) { Unit unit = new Unit(unitName); //System.out.println(unit.name); add(unit); }*/ private static ObjectHandler ref; } [/source]