Monkuar Posted January 13, 2015 Share Posted January 13, 2015 (edited) Does anyone know a simple HTML 5 game engine (Heck, it doesn't even have to be an engine, just some type of movement) similar to: http://treasurearena.clay.io/ ? Been trying to find one forever. Thanks in advance! My game is pretty much almost finished. Character designer with a .png model, inventory management, stash tabs, stat points, everything all server side, etc. I'm just trying to get a combat system where a div element (my character model) can move around and swing an object and has simple collision. So it at least looks like a character is 'slashing' something... just anything besides basic point and click Edited January 13, 2015 by Monkuar Quote Link to comment https://forums.phpfreaks.com/topic/293885-treasure-arena-like-combat/ Share on other sites More sharing options...
QuickOldCar Posted January 14, 2015 Share Posted January 14, 2015 How about using webgl Quote Link to comment https://forums.phpfreaks.com/topic/293885-treasure-arena-like-combat/#findComment-1502870 Share on other sites More sharing options...
QuickOldCar Posted January 14, 2015 Share Posted January 14, 2015 Might be interested in three.js Quote Link to comment https://forums.phpfreaks.com/topic/293885-treasure-arena-like-combat/#findComment-1502871 Share on other sites More sharing options...
ignace Posted January 14, 2015 Share Posted January 14, 2015 (edited) Create another .png where your character looks like he is slashing something. Then when a user clicks, replace the image with the slashing image and back. Pre-load the image to make it fluent or use a sprite .png where it has all your characters movement and simply change the offset for each individual movement. Edited January 14, 2015 by ignace Quote Link to comment https://forums.phpfreaks.com/topic/293885-treasure-arena-like-combat/#findComment-1502888 Share on other sites More sharing options...
Monkuar Posted January 14, 2015 Author Share Posted January 14, 2015 (edited) Create another .png where your character looks like he is slashing something. Then when a user clicks, replace the image with the slashing image and back. Pre-load the image to make it fluent or use a sprite .png where it has all your characters movement and simply change the offset for each individual movement. Seems like a good lightweight, intuitive idea. Here is an example of character on my game choosing between a sword and armor/shield. The problem is when you say 'Looks like he is slashing' is very hard to manipulate because it's just a 2d image. I could however, do what you said and take off the sword and arm, and then change the positions of it and use it as a seperate png? Then upon clicking, I can move those positions. It would look funny, but atleast some type of combat, right? Not sure yet. I would really love treasure arena's combat though, especially for attacking mobs and basic moveability. I have EVERYTHING down, inventory management, items, hp bars, statistics, all server side and stored in MYSQL. But, then if I were to use treasure arena's combat (If I could get their source code and implement it), the character would definitely look different than what mine is... I'm at a dilemma for sure. Hmm What I tried in the past is to change my mouse cursor to a sword, and then append a swing like effect to it. So it looks like the cursor is slashing at mobs. (This way, I don't need to touch the character portrait, and just have them attack and 'slash' at mobs). But with no luck, any idea how to do that? I tried with css3 transitioning with transform rotate, but the sword cursor rotates 100%, not a slash type effect was my problem when I tried... hm Edited January 14, 2015 by Monkuar Quote Link to comment https://forums.phpfreaks.com/topic/293885-treasure-arena-like-combat/#findComment-1502890 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.