Reputation
286
Top tag
Next privilege 300 Rep.
Create new tags
Badges
1 6
Newest
 Commentator
Impact
~9k people reached

  • 0 posts edited
  • 0 helpful flags
  • 5 votes cast
Mar
18
comment how to add an onclick event to a button?
@ratchetfreak I see. I also makes it possible to use "non rectangular" buttons easily (to the expense of memory), which can be nice.
Mar
18
awarded  Commentator
Mar
18
comment how to add an onclick event to a button?
I second the first idea (you'll have to keep the coordinates of "buttons", and check at each click if one of the buttons is clicked ; and map the buttons to an action.) However I don't think the "pixel" bitmap sounds like a good idea (this would use lots of memory, but most of your UI will probably not be clickable, will it ?).
Feb
6
awarded  Editor
Feb
6
revised Should an object in a 2D game render itself?
deleted 1 characters in body
Mar
26
comment Making a startscreen for an HTML5 game?
Ah, right, sorry - you never mentioned Facebook. If you're constrained to a canvas, then I suppose a variation of fillText (maybe using a custom font to make things look better ?) and getting mouse position on click event would work. Also, avoid using static images for the text if you intent to internationalize your game (coming from a french speaker ;) ).
Mar
24
answered Making a startscreen for an HTML5 game?
Jul
23
awarded  Yearling
Jun
12
answered Should an object in a 2D game render itself?
Jun
8
comment Drawbacks of using reflection for a component based system at loading-time
@DeadMG : hence the "implicit" :) . I'm only guessing, of course, but I doubt the OP would go through all the troubles of using reflection, and a data-driven component declaration without this kind of "shorten iteration time" requirement. But then again. Just guessing.
Jun
8
comment Drawbacks of using reflection for a component based system at loading-time
Well, an implicit requirement would be that it should be possible to change the content of the data file while the application is running (to fine-tune values, etc..) ; so this will require some kind of "run-time" resolution. Now I agree that relying on reflection to do that is arguable.
Jun
8
comment Drawbacks of using reflection for a component based system at loading-time
@TheCommunistDuck : for the kind of data that the OP want to generate, I doubt it would really be that harder to serialize it in Lua than in XML. It seems to be a problem tackled by lots of people, so you would probably be able to pick something : lua-users.org/wiki/TableSerialization, lua.org/pil/12.1.html and others came up quickly ... again, I'm not advocating writing the full serialization code yourself (which is not necessarily that difficult) !
Jun
8
comment Drawbacks of using reflection for a component based system at loading-time
@TheCommunistDuck : Don't get me wrong, I would definitely try and write a tool to produce the data files - the fact that the editor has to save Lua, Js or whatever instead of XML does not seem that much of a problem to me, is it ?
Jun
8
comment Drawbacks of using reflection for a component based system at loading-time
(I was thinking of something like developer.mozilla.org/en/Rhino/Serialization )
Jun
8
comment Drawbacks of using reflection for a component based system at loading-time
The LISP folks would start bragging about "homoiconicity", or some kind of gibberish at this point ;) Now, I would not be surprised if the popular scripting language of your choice provided a way to serialize an object to a readily parseable form without too much effort ...
Jun
8
answered Drawbacks of using reflection for a component based system at loading-time
Jun
8
answered A way to store potentially infinite 2D map data?
Jun
8
awarded  Critic
May
4
answered Do retail games use “inversion of control” and “dependency injection”?
May
4
comment Do retail games use “inversion of control” and “dependency injection”?
I suspect many people are against IoC because it means :