Script47 Posted June 20, 2014 Share Posted June 20, 2014 Made this, was bored. Feedback welcome, still more to come. Map RPG Layout may be fuxed a little. xD Quote Link to comment Share on other sites More sharing options...
Dayo Posted June 20, 2014 Share Posted June 20, 2014 Maybe bind keyboard keys for movement and space for attack? also have it so the log is always scrolled to the bottom ;) Quote Link to comment Share on other sites More sharing options...
Dave Posted June 20, 2014 Share Posted June 20, 2014 I managed to walk into the red enemy and wasn't able to move back out again! Think your collision detection is broken. Quote Link to comment Share on other sites More sharing options...
Script47 Posted June 20, 2014 Author Share Posted June 20, 2014 Maybe bind keyboard keys for movement and space for attack? also have it so the log is always scrolled to the bottom ;) That was the plan but it got too late lol so I went to bed. :p I managed to walk into the red enemy and wasn't able to move back out again! Think your collision detection is broken. The moment you touch the red enemy you will initiate combat, which stops you from moving until either one you die. I should probably put that in the log. Quote Link to comment Share on other sites More sharing options...
Samurai Legend Posted June 20, 2014 Share Posted June 20, 2014 I actually like this, I will probably get someone to make me something like this and implant it to my attack system. But of course more advanced. However great job i love it! Quote Link to comment Share on other sites More sharing options...
Dayo Posted June 20, 2014 Share Posted June 20, 2014 $(document).keydown(function(e){ if (e.keyCode == 37) { moveLeft(); return false; } else if (e.keyCode == 38) { moveUp(); return false; } else if (e.keyCode == 39) { moveRight(); return false; } else if (e.keyCode == 40) { moveDown(); return false; } }); Adding that made it much better to play Quote Link to comment Share on other sites More sharing options...
Script47 Posted June 20, 2014 Author Share Posted June 20, 2014 (edited) I actually like this, I will probably get someone to make me something like this and implant it to my attack system. But of course more advanced. However great job i love it! Thanks. $(document).keydown(function(e){ if (e.keyCode == 37) { moveLeft(); return false; } else if (e.keyCode == 38) { moveUp(); return false; } else if (e.keyCode == 39) { moveRight(); return false; } else if (e.keyCode == 40) { moveDown(); return false; } }); Adding that made it much better to play Pfft, using jQuery when JavaScript could have done the job! :p Key binds will be added in next update. Adding graphics. :) Edit: Question, shall I make the grass smoother? [ATTACH=CONFIG]1572[/ATTACH] Edited June 20, 2014 by Script47 Quote Link to comment Share on other sites More sharing options...
Dayo Posted June 20, 2014 Share Posted June 20, 2014 Thanks. Pfft, using jQuery when JavaScript could have done the job! :p Key binds will be added in next update. Adding graphics. :) Edit: Question, shall I make the grass smoother? [ATTACH=CONFIG]1572[/ATTACH] Im just so used to using JQuery i do it without thinking lol, It looks good so far, what about adding multiple bots on the map. Quote Link to comment Share on other sites More sharing options...
Script47 Posted June 20, 2014 Author Share Posted June 20, 2014 Im just so used to using JQuery i do it without thinking lol, It looks good so far, what about adding multiple bots on the map. Hahaha, yes I plan to hopefully. But the map is just 500 x 500 so it may get cramped. I'll see what I can do. Quote Link to comment Share on other sites More sharing options...
Script47 Posted June 20, 2014 Author Share Posted June 20, 2014 Aaaaaite new update. New Version: Some Version Number here! What this update includes? Key binds Improved attacking Experience Levels Tutorial http://maprpg.my-jsgames.tk/ Quote Link to comment Share on other sites More sharing options...
BlackScorp Posted June 23, 2014 Share Posted June 23, 2014 Thanks. Pfft, using jQuery when JavaScript could have done the job! :p just want to say that keyCode is not supported by all browsers, in some browsers there are no keyCode at all https://github.com/BlackScorp/tiled2crafty/blob/gh-pages/kinetic/js/libs/Keyboard.js#L116-L119 here is an crossbrowser version. you can use it like this https://github.com/BlackScorp/tiled2crafty/blob/gh-pages/kinetic/js/game/game.js#L39-L47 and check if a key is down like this https://github.com/BlackScorp/tiled2crafty/blob/gh-pages/kinetic/js/game/game.js#L77 dont think jQuery is just a framework to easy select ond modify DOM elements, jquery also has many crossbrowser stuffs inside Quote Link to comment Share on other sites More sharing options...
Dave Posted June 23, 2014 Share Posted June 23, 2014 Aaaaaite new update. New Version: Some Version Number here! What this update includes? Key binds Improved attacking Experience Levels Tutorial http://maprpg.my-jsgames.tk/ You should make the sprite rotate to which direction you're travelling in and also make it so each move is equal to the size of the sprite, otherwise it looks like you're taking tiny baby steps. I don't get why you're so against using something like jQuery for this. It just provides loads of cross compatibility functions to make sure your system is going to work in more browsers without having to do numerous weird work arounds. I also find it's a lot more legible then raw javascript. Quote Link to comment Share on other sites More sharing options...
Script47 Posted June 23, 2014 Author Share Posted June 23, 2014 I'm not against jQuery, actually I like jQuery a lot, I just mean that I'm trying to keep the raw Javascript. Quote Link to comment Share on other sites More sharing options...
BlackScorp Posted June 23, 2014 Share Posted June 23, 2014 I just mean that I'm trying to keep the raw Javascript. but if you want do this, you have to know each special stuffs for each browser and version, even the jQuery developer dont know all special cases since they fixed the bugs over the years. vanilla JS is nice, but will bring you a lot of trouble which ends up with using jQuery and drop your current code away, which will be wasted time at the end Quote Link to comment Share on other sites More sharing options...
Cordell Posted July 3, 2014 Share Posted July 3, 2014 the link to it don't work for me Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.