ZeRo000s

Members
  • Content Count

    10
  • Joined

  • Last visited

  • Days Won

    1

ZeRo000s last won the day on May 29

ZeRo000s had the most liked content!

About ZeRo000s

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. how to draw imageBitmap object? ..
  2. Seems cool i will do my best and update u later :]
  3. The drawing is fast enough now after changing some bad code :] i don't need help anymore thank you anyways 😄
  4. Okay, thank you :] it draws only visible chunks so its not that hard i guess! i made it kinda faster by using faster bilinear interpolation (calculate edge values and use this values to calculate other pixels values faster). im making rn a simple search algo that find rectangles with the same color and draw them instead of drawing it pixel by pixel :] im not sure you understand what i want exactly i want accelerate drawing the map by using webgl if possible bc drawing using fragementshader is pretty fast but it keep drawing it again and again every frame , i will maybe use fragementshader to draw chunks incase i add some animations like water level changing!
  5. here is a quick exemple. im using 2d canvas and async now (i thought game did draw chunks asynchronously but i forgot to add it) and added option to change map resolution its good enough i guess but using webgl drawing will be alot better. like pixi does with fragementshader 😄 // drawing a pixel in a "block" mapInfos; // 3d array sent from server to client that conatain infos of the top left pixel of everyblock. //client use the mapInfos and bilinear interpolation to calculate infos of other pixels than use that to choose a color. pos; // pixel position in the chunk normilized to 0-1. cpos; //block Height = bilinearInterpolation(pos,[mapInfos[cpos.x][cpos.y][0],mapInfos[cpos.x+1][cpos.y][0],mapInfos[cpos.x][cpos.y+1][0],mapInfos[cpos.x+1][cpos.y+1][0]]); Temperature = bilinearInterpolation(pos,[mapInfos[cpos.x][cpos.y][1],mapInfos[cpos.x+1][cpos.y][1],mapInfos[cpos.x][cpos.y+1][1],mapInfos[cpos.x+1][cpos.y+1][1]]); // check what color it should be using Height and Temperature value :] and the result is something like this (ignore ugly trees/stones they are just for test) and map will be something like this
  6. My game have map auto generator that make an unlimited map pixel by pixel, i tried to draw it pixel by pixel using graphics that was so slow! so i tried 2d canvas and drawing chunks asynchronously that was good kinda good but ah still slow sometimes i can see unloaded chunks and can be a huge problem for players with bad computer, so i tried webgl fragementshader instead that worked good but it draw it again and again when i need it to draw it only once is there anyway to draw it using webgl in pixi other than fragementshader?
  7. ops wrong place to post this
  8. My game use map generation to make an unlimited map pixel by pixel, i tried to draw it pixel by pixel using graphics that was so slow! so i tried 2d canvas and drawing chunks asynchronously that was good kinda good but ah still slow sometimes i can see unloaded chunks and can be a huge problem for players with bad computer, so i tried webgl fragementshader instead that worked good but it draw it again and again when i need it to draw it only once is there anyway to draw it using webgl in pixi other than fragementshader?
  9. Okay thank you, that's helpful
  10. i'm trying to add lights to my game. was testing on pixiplayground here what i made so far :3 https://www.pixiplayground.com/#/edit/~tlXTadqt1qCEvHf~cMQE i need to get coords normilized to (0,1) in full texture instead of only the part that is getting displayed 😄