@Cathrine - Gotcha. I think I know how you're doing this now, ;). Only supporting CSS3-capable browsers or going to look into a JS/jQuery plug-in for cross-browser isometric grid transforms when basic movement and such is finalised?
@Cathrine - Gotcha. I think I know how you're doing this now, ;). Only supporting CSS3-capable browsers or going to look into a JS/jQuery plug-in for cross-browser isometric grid transforms when basic movement and such is finalised?
Nice work , I see potential here . Just please don't lose motivation to continue with your project. There's too many projects with promising results left undone. Good luck !
I wonder if it might be easier (at least cleaner) to use the CSS3 :nth-child selector instead of IDs and in-line styles? Then you could have them in a transforms.css and still access each clicked cell's unique identifier being by index. Then again... hmm, what are the IDs for?
The IDs are generated by the flooresigner and is just coordinates. The style of the objects go by the class. The inline-styling is also generated by the floordesigner to get the correct position according to the coordinates.
PHP Code:<?php
case '1':
case 'D':
$_FLOOR["isdoor"] = false;
$_FLOOR["zindex"] = 5;
$_FLOOR["xnow"] = 600 + $_FLOOR["count"] * 16;
$_FLOOR["idx"] = $_FLOOR["count2"] - 1;
$_FLOOR["idy"] = $_FLOOR["count"] - 1;
$_FLOOR["ynow"] = 1200 + $_FLOOR["count"] * 32;
if($gamemap[$_FLOOR["count3"]] == 'D')
{ //if doortile
$_FLOOR["zindex"] = 0;
?>
<script>
var door = "<?php echo $_FLOOR["idx"].'x'.$_FLOOR["idy"]; ?>";
</script>
<?php
$_SESSION["startx"] = $_FLOOR["idx"];
$_SESSION["starty"] = $_FLOOR["idy"];
$_FLOOR["isdoor"] = true;
}
echo '<div class="tile' . $_FLOOR["isdoor"] . '" id="'.$_FLOOR["idx"].'x'.$_FLOOR["idy"].'" style="z-index:'.$_FLOOR["zindex"].';top:calc( ' . $_FLOOR["xnow"] . 'px + ' . 17 * $_FLOOR["count2"] . 'px);left:calc(' . $_FLOOR["ynow"] . 'px - '. 33 * $_FLOOR["count2"] .'px)"></div>';
if($_FLOOR["isdoor"] == true)
{
$_FLOOR["zindex"] = 6;
$_FLOOR["xnow"] = 494 + $_FLOOR["count"] * 16;
$_FLOOR["idx"] = $_FLOOR["count2"] - 1;
$_FLOOR["idy"] = $_FLOOR["count"] - 1;
$_FLOOR["ynow"] = 1220 + $_FLOOR["count"] * 33;
$_FLOOR["zindex"] = 4;
echo '<div class="door" style="z-index:'.$_FLOOR["zindex"].';top:calc( ' . $_FLOOR["xnow"] . 'px + ' . 17 * $_FLOOR["count2"] . 'px);left:calc(' . $_FLOOR["ynow"] . 'px - '. 33 * $_FLOOR["count2"] .'px)"></div>';
?>
<script>
var startx = <?php echo $_FLOOR["idx"]; ?>;
var starty = <?php echo $_FLOOR["idy"]; ?>;
</script>
<?php
}
break;
Work in progress:
http://nutcracker.xyz/v4/resources/i...?dir=7&act=wlk
"dir" (direction) can at the moment be 0, 1, 2, 3 and 7
"act" (action) can at the moment be "std" (standing) and "wlk" (walking)
![]()
Good luck with your project, nice to see an web-project again.
Last edited by Droppy; 17-07-15 at 05:08 AM. Reason: Ontopic.
I like the way this is done, the not-packet-way, though must it really lag for an online game.
It doesn't necessarily have to be any noticable lag, take a look when it's finished instead.
- - - Updated - - -
Now the
http://nutcracker.xyz/v4/resources/i...?dir=7&act=wlk
works closer to intended, fixed some bug that had happened on transfer to website host.
Last edited by Cathrine; 17-07-15 at 04:38 PM.
I highly suggest to add some cache, also your avatar animator has a memory leak, just saying :)
If anyone want to help with developing this project please send me a privat message.
Wow thanks for deciding to do this. A project like this if it's usable and well done will probably save our community! :)
How are the image files loaded, and what types of files are they?
I don't know if you filter this somewhere, but otherwise:
Is a huge XSS leak.Code:$chatmessage["msgdata"] = $chatmessage["msgdata"] . "<div style='bottom:".$coord."px' id='chatmessage'><div id='chatmessageborderleft'></div><div id='chatmessageborderrigth'></div><div id='chatmessagecontent'><b>".$row["username"].": </b>".$row["message"]."</div></div>"; break;
Also for:
You're using mysqli the whole time and suddenly mysqls escape string, that's a bit odd. You should also just use escape string for inserting data, when echo'ing it out of the database, you should use htmlspecialchars or htmlentities.Code:<?php echo strip_tags(mysql_real_escape_string($row["message"])); ?>
I don't know if you became aware of these issues already in the meantime, if so, sorry. ^^
Good luck with your project nontheless.
Any updates on your project so far ? @Catherine
There's no need to hurry , just wanted to know :)