# QuackCoder

Member

30

100 Neutral

• Rank
Member

• Website
1. ## html5 and DOM gets no love for mobile apps/games?

I just a beginner programmer myself so I am not sure what to say to you pros
2. ## html5 and DOM gets no love for mobile apps/games?

Last time I checked my little prank game seemed to work on an android. But sadly I didn't think about mobile browsers while making the input class....
3. ## [Javascript] Catching Keyboard Input in GameLoop

Why not put an array inside? At every interval or on state change just push it in....maybe adding a timestamp would help....imho
4. ## Sprite handling

I know about sprites and sprite sheets so far I thought I would divide stuff up into 1. ROWS: Having sprites of the same state like walking 2. COLUMN: Each frames of animation, including directional variations. My problem: Each state may not have the same amount of frames. Like walking and standing still, how do I manage that? I heard about control files but I really dont know about them. How should a sprite class handle states and frames? Or how should I make the spritesheet to aid me coding afterwards?
5. ## A* Ambiguity problem and questions

While writing my pathfind function, it got stuck on this statement, from here [font="Arial"][/font] [font="Arial"]Summary of the A* Method : statement = 2.c.3 [/font] [font="Arial"]"If it is on the open list already, check to see if this path to that square is better, using G cost as the measure. A lower G cost means that this is a better path. If so, change the parent of the square to the current square, and recalculate the G and F scores of the square. If you are keeping your open list sorted by F score, you may need to resort the list to account for the change."[/quote] [/font][font="Arial"]Are they telling me to compare the new adjacent Node's [/font][font="Arial"](that is already on my openList)[/font][font="Arial"] G value with my current Node's? [/font]
6. ## A* Ambiguity problem and questions

So far I know that: Open list = The adjacent tiles that I am looking into. Closed list = The parent tile whose adjacent tiles are already explored. If i am mistaken please clear it up. My problem is in this: From the start tile, there were 2 adjacent tile which equal F value, and again 2 of their adjacent tiles also had the same F values. So why didnt it first move down once and move 3 tiles right (to hit the wall) and move back up and then 2 tile right and then down? I am asking what made it think smart?
7. ## Starting PathFinding

Yes that link is good for us noobs, I read it half but I find it easy to understand if I can literally see what they mean So I googled for a demo. result->http://briangrinstead.com/files/astar/
8. ## Hows this for a leveling system

This was also implemented in .hack G.U (ps2). Some gameboy games also used such a method. They made exp needed to lvl up static, while making the exp gained dynamic. I dont know the math but defeating a character of higher lvl game more exp than someone at lower lvl to a minimum of 1. For example: Tactics Ogre: The knight of Lodis & the FF tactics series. I find it more comfortable than the others. A high exp need amount just discourages me provided that methods of gaining exp is lame. But if it's fun, that's another story. Soul Nomad & the World Eaters (ps2) has a lvl limit of 9999! But I just love the fighting
9. ## [web] Getting multiple key input and confusing keycodes

I using plain old javascript. <!DOCTYPE html> <html> <head> <title>page</title> <script type="text/javascript"> function addEventListener(){ function getKey(e){ var keyCode = e.which || e.keyCode; return keyCode; } document.addEventListener('keydown', getKey, false); } </script> </head> <body onload="addEventListener()"> </body> </html> But this would give me only one keycode.
10. ## Writing an Input class

I don't know about others but game inputs are making me confused. My thoughts of such a class...Keyboard: 1. A property to hold the key being pressed. 2. A method which should be invoked on onKeyDown event and set the above property. 3. A method which should be invoked on onKeyUp event and unset the above property. But is this right? Do I need more property/methods?
11. ## [web] Getting multiple key input and confusing keycodes

1. So how do I listen for multiple (simultaneous) key inputs? I can only listen for one. 2. Lowercase and Uppercase character have different key codes. Is there a way to deal with them rather than hard coding? EDIT: Using javascript
12. ## Catastrophe X

Gr8 stuff Web games ROCK!!
13. ## What to do next?

Then what about depth? How can I tell if one object is behind or below other? I used to render from top to bottom and left to right. If i sever those ties, would all object seem above on other without any depth perception?
14. ## What to do next?

I am so stuck with objects moving from tiles to tiles. I cant think of a solid concept. How should the property of the objects be implemented? And algorithm to code?
15. ## What to do next?

Tiblanc, I was checking your project for some inspiration and observation but I was thinking how did you guys make the map? Most of the tiles and objects are between two grid tiles, isn't that bad? And how did you render the map? From top to bottom, object to object? Well I thought I would use two layers of rendering, first the background map and above it a grid. The background map would have only tiles and no objects, then I would make a grid mimic each tiles height and draw object on grid. A static background and a dynamic grid foreground, but so far there are few problems I got stuck on. First is the height of the grid tiles. I know tileWidth = 2 * tileHeight, but what about elevated tiles? I thought if height = 1, I would raise the tile by half of tileHeight and so on. And it gives me this. Zero height....ignore the rock and the green filled tiles is because the mouse was over it. height = 1 works fine, mouse picking works. But height = 2 is bad, it completely overlaps the top-most tile. That's my first problem. And because of the two layers I always have to clear two overlapping objects, like It works fine right? But the clearing algorithm also clears translated objects. Suppose that rock is moving to the next x-index. And visually... This happens! I think I need to work with pixel clearing algorithm, but how? Height = 1 over laps 3 upper tiles at least. This here is my second problem. Or you could question my 2 layered concept, and tell how you folks do it?