Jump to content

Recommended Posts

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 by Monkuar
Link to comment
https://forums.phpfreaks.com/topic/293885-treasure-arena-like-combat/
Share on other sites

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 by ignace

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.

 

2d4e9873c34683c70efe53c6a7871c1b.png

 

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 by Monkuar
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.