Jump to content

  • Log In with Google      Sign In   
  • Create Account

14 years ago on June 15th Gamedev.net was first launched! We want to thank all of you for being part of our community and hope the best years are ahead of us. Happy birthday Gamedev.net!

lithos

Member Since 20 Apr 2009
Online Last Active Today, 04:56 PM
-----

Posts I've Made

In Topic: Entity storage, ArrayList or HashMap?

02 June 2013 - 09:13 AM

You can do both.  

 

When you put something in a list you're putting the reference in there, rather than the object(A reference tends to be 32-64 bits, but the size isn't guaranteed.  And references to other parts of the list and management won't hurt you too badly).    

 

If you can only do one it's trivial(though resource intensive) to convert a Hash Table/Map to an Array List with collections.


In Topic: Would you pay for game stock art?

30 May 2013 - 07:01 PM

Sound and music count?   Then yes.


In Topic: Protecting an idea

30 May 2013 - 06:51 PM

http://www.gameproducer.net/2011/12/17/heres-why-i-cannot-steal-your-game-idea-even-if-you-want-me-to/


In Topic: Java 2D Programming

27 May 2013 - 08:15 PM

Generally you're going to be setting up a game loop.    Then in that game loop you're going to be updating everything, drawing everything on a buffer image, and then drawing that image onto the screen.

 

The game loop is just a purposeful infinite loop that manages timing and forces itself to "pause" so that the java thread scheduler can let other threads like controls(key/mouse input) and drawing the screen to run.   Your game loop also needs to be the absolute boss, so things like a player pressing keys need to be a "request" if it happens outside the game loop.   That logic will make it a bit easier to track down bugs since you won't have a key control event happening in the middle of your gameloop/logic processing.

 

You're drawing on a buffer image to save a little bit of time.   Essentially the process of drawing on an image in RAM takes a lot less CPU time than drawing on the screen.   Also with the wrong threading drawing straight onto the screen means the player could see the screen blip with half the objects drawn.

 

http://www.cokeandcode.com/index.html?page=tutorials

 

http://www.java-gaming.org/topics/game-loops/24220/view.html\

 

http://www.java-gaming.org/topics/basic-game/21919/view.html

 

http://www.codeproject.com/Articles/2136/Double-buffer-in-standard-Java-AWT

 

http://www.apl.jhu.edu/Notes/LMBrown/courses/605-481/notes/Concurrent-Programming/Double-Buffer-Example.html


In Topic: Why cards in a game design?

25 May 2013 - 05:39 AM

Because it's understandable and familiar.   Everyone just knows how a deck of cards work, so when a player gets lucky/not they don't get upset(where as if you hid it was played as a deck of cards they'd see the game playing against them).


PARTNERS