Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 28 Nov 2010
Offline Last Active Oct 19 2016 03:48 AM

Posts I've Made

In Topic: What programming language should someone pair with LUA?

19 October 2016 - 03:48 AM

If you're not doing console game quality, it opens up the floor a bit more, so alternatives to c++ become viable. I'm working on a game project at the moment which is a mixture of C# and Lua.


To answer your question, the "best language to use" is probably going to be whatever language *you* are most proficient in that has a Lua implementation. 

In Topic: towards a faster A*

17 April 2016 - 07:25 PM

I second Alvaro's suggestion re: the Heap. I remember reading about A* and not know how a heap worked it seemed pretty scary, but once I had a crack at implementing it and it started to made sense, my A* implementation became several orders of magnitude faster. 

In Topic: A*, A Star: impassable nodes can just go on the closed list?

09 April 2016 - 04:23 PM

Unless you have an infinite map, you have to do some kind of test to make sure you don't go outside the map bounds when looking for neighbours at the edges of the map. If you treat impassable terrain the same way, it will never be processed. 


Also, remember, high cost is not the same as impassable. If the numbers align, that node may be considered a viable route.

In Topic: Suggestions for software for 2D animation

09 February 2016 - 06:44 PM

Looks interesting. Thanks for the suggestion.

In Topic: Unique ID per type

20 January 2016 - 11:40 PM

SeanMiddleditch is 100% correct. If you want to be able to load saved game states (eg: save games), you need to define the Id's in such a way that they can never change. The only way to do this is to assign them yourself.
Generating a hash from the name of the type seems like a good idea, but what if you ever decide to change the name of your class? For example if you decide that "LightComponent" should be "LightingComponent"?


Another thing you will need to consider is hash collisions. They are rare, but they can happen. Check out the hash collision tests done in the following stackexchange post: http://programmers.stackexchange.com/questions/49550/which-hashing-algorithm-is-best-for-uniqueness-and-speed
They found 7 collisions in the english dictionary using the DJB2 algorithm you're considering:

DJB2 collisions

  • hetairas collides with mentioner
  • heliotropes collides with neurospora
  • depravement collides with serafins
  • stylist collides with subgenera
  • joyful collides with synaphea
  • redescribed collides with urites
  • dram collides with vivency