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

Kevinator

Members
  • Content count

    1018
  • Joined

  • Last visited

Community Reputation

229 Neutral

About Kevinator

  • Rank
    Contributor
  1. Hi, my problem is that I'm running out of heap space when I'm only about 20% complete with my problem, so increasing the space allocated to the JVM isn't exactly a valid solution. Here's what I'm basically doing: String aHugeString=""; Foo[] foo=new Foo[12000]; for(int i=0; i<12000; i++) { aHugeString=getHugeString(); //string is roughly 32kb foo[i]=new Foo(aHugeString.substring(1323,1335)); //each element of foo contains roughly 30 bytes } It can't be the array, can it? It seems to me that there should be plenty of heap space for the array. What I'm thinking is that the string isn't getting garbage collected or something.. I don't know why it wouldn't, though.. So please, if there is something obviously stupid I'm doing please set me straight. This really shouldn't be happening.. Progress update: I tested out a mockup array without all the other string processing and it does just fine. I'm currently testing a version with periodic manual garbage collection and we'll see how it goes. update 2: the manual gc doesn't make a difference.. I'm stuck. update 3: I've been scouring the internets for a solution, and came across THIS. Quote:As such, substring() calls are incredibly fast: you're just allocating a new object and copying a pointer and two int values into it. On the other hand, it means that if you use substring() to extract a small chunk from a large string and then throw the large string away, the full data of that large string will continue to hang around in memory until all its substrings have been garbage-collected. Which could mean you carrying around the complete works of Shakespeare in memory, even though all you wanted to hang on to was "What a piece of work is man!" O_o Wow. That... that sucks. Trying to find a workaround, as I think this is what is plaguing my app. [Edited by - Kevinator on August 14, 2008 12:07:35 AM]
  2. Thanks, this confirms my suspicion that there is something wrong with my compile process rather than my code.
  3. "This method must return a result of type int Possible problem: the if-statement structure may theoretically allow a run to reach the end of the method without calling return. Consider using a final else {... to ensure that return is always called." My question is... why? My code must return an int as far as I can tell. private int getNumber(String str, int index) { String estr=""+str.charAt(index); if(!Character.isDigit(str.charAt(index))) return -1; else { index++; while(index<str.length()&&Character.isDigit(str.charAt(index))) { estr+=str.charAt(index); index++; } return Integer.parseInt(estr); } } The following variation results in the same problem: private int getNumber(String str, int index) { String estr=""+str.charAt(index); if(!Character.isDigit(str.charAt(index))) return -1; else { index++; while(index&lt;str.length()&&Character.isDigit(str.charAt(index))) { estr+=str.charAt(index); index++; } return -50; } return -100; }
  4. Quote:Original post by Mithrandir I can't stand pretentiousness. If someone doesn't want to do business with me because I offended some silly archaic custom unintentionally, then that's their loss. There are plenty of other people to do business with in this world. Exactly, and furthermore, FUCK them.
  5. Quake 4 was a good game, and I got quite far in it, but my computer just isn't quite beefy enough to play it well, so I got frustrated with the poor framerate and I haven't played it since. I did like the actual game, though.
  6. Freespace (1) is my favorite space combat game of all-time, closely followed by TIE Fighter and Freelancer.
  7. Quote:Original post by Mithrandir He wants to eliminate the department of education and let states regulate education all by themselves.This is the number one reason I'll vote for him. Not to derail, sorry. I really like the poster. Good work on it.
  8. -pontificate (pontificated)
  9. Quote:Original post by Help_Me I can't find any information on google and yahoo.Amuses me, this quote does.
  10. From a technical/artistic standpoint, it would be a downright shame not to have Diablo II on that list somewhere.
  11. Heh... I was just about to say real duck hunting isn't exactly anything to write home about either. It can be hours before you even get an opportunity to take a shot, freezing your ass off all the while and sitting in water up to your ankles.
  12. An enemy is a good candidate for a class. The simplest way to do it is to instantiate a random enemy object inside your addEnemy() method. Then, add the enemies to a vector so you can keep track of them. The vector needs to be accessible to all the methods that update enemy locations and render them, obviously, so it might be a good candidate for a global or member variable.
  13. I like your code. Is direction some kind of angle modifier so that the shots emanate from the player in a fan shape? That's pretty nifty. As Endurion said, the reason for the error is that when you try to return shot, the compiler can't find that variable because that variable no longer exists when you exit the for loop. Try this: public Shot[] Shoot5Bullet() { Shot[] shots = new Shot[5]; for(int direction = 0; direction < 5; direction++) shots[direction] = new Shot(start_x, start_y, direction); return shots; }
  14. Somewhat related question: is it better to store all the frames in a single file or is it okay to use them as separate files (think walk_1.gif, walk_2.gif, etc). Is there a huge performance drain for doing this?
  15. I love clear type and consolas. I've been using both for several months!