Posts by rcpinto • 225 points
5 posts
-
2
votes2
answers841
viewsA: Moving character and map with canvas+js
You need a camera or viewport system. Use the translate canvas, which already moves all objects drawn accordingly and we don’t need to keep calculating relative positions, and then draws everything…
-
1
votes1
answer210
views -
1
votes1
answer1032
views -
3
votes2
answers2074
viewsA: change png image to jpg with php
You will need to: Library GD installed imagecreatefrompng imagesx and imagesy imagecreatetruecolor imagejpeg imagecopyresized imagedestroy After move_uploaded_file, make sure the extension is PNG.…
-
1
votes1
answer106
viewsA: Problem with ("select username, points from data order by points desc limit 10");
You need 1 fetch to read each record. So repeat fetch after displaying top_1 data. (and use indexes 0 and 1 again) If you want to show all 10, it is more practical to place your fetch within the…