Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 16 Oct 1999
Offline Last Active Yesterday, 03:07 AM

Posts I've Made

In Topic: Minimalist Programming Environment

14 December 2014 - 10:21 PM

I'm one of those people SeanMiddleDitch doesn't understand :) I have the VS 2013 Community Edition installed but I don't use it. I find it really just slows me down since I'm not used to it. On the other hand, I don't really want to get used to it. I see no benefit from it over what I already do. I don't use vim or emacs either. I use Sublime Text, a language-appropriate build tool (premake5 for C or C++) and a command prompt (more often than not, my command prompt is via MSYS) for just about everything I code, regardless of language (the exception being Java).

In Topic: Javascript & rogue like games

11 December 2014 - 07:31 PM

Yendor.ts is a roguelike library written in typescript (by the same guy that did libtcod). It has a div-based renderer and one that uses Pixi. Pixi is a 2D renderer written in javascript that has a WebGL backend and one for Canvas. If I were going to craft a web-based rogueike, I'd almost certainly use Pixi. I'd also look at Yendor.ts for ideas on how to approach it.

In Topic: The Week of awesome II! - The second annual unofficial gamedev competitio...

28 August 2014 - 04:23 AM

I'm in.

In Topic: LWJGL Cahce Textures in a Hashmap

07 July 2014 - 11:11 PM

I haven't used slick-utils, but if you can't find any option for caching in the documentation, then it's very simple to implement it yourself.

  • Create your own TextureLoader class which contains an instance of the slick-utils loader (unless the Slick loader uses static methods, of course) and a java.util.HashMap<String,Texture>.
  • Implement a load method that accepts a file name and returns a texture.
  • Inside your load method, take the following steps:
    • Try to fetch the texture from your cache by calling 'get' on your hash map instance using the file name as a key.
    • If the 'get' call returns null, call the Slick texture loader, add the loaded texture to the hash map with the file name as the key, then return it.
    • If the 'get' call doesn't return null, then simply return the texture.
  • Profit!

In Topic: Java LWJGL Need Help Designing more efficient texture loading.

06 July 2014 - 07:44 PM

Have your texture loader cache your textures in a HashMap keyed on the file name. When you ask it to load a texture, it first checks the cache to see if the texture exists. If it does, it returns the existing instance rather than loading it from disk again.