Pryme8 Posted October 18, 2017 Share Posted October 18, 2017 http://pryme8.github.io/tiles/ So I'm kinda stumped as to how to troubleshoot this. I just kind of tossed this together and its really badly formatted but I will clean it up later when I have time. First problem is it seems like my shader is off somehow, no matter how i sample the "tiles" texture it seems to not output what I expect. I have a sneaking suspicion its an error in the shader... Anyone have any idea why I cant get the atlas to display correctly? *EDIT* : Ok I am way closer now, just got to get the tile scaling to work correctly and then get rid of the repeating of it then extend some of the functions... but basically got it figured out now.https://github.com/Pryme8/Pryme8.github.io/blob/master/tiles/index.html **EDIT** Ok I got it for the most part now, just need to finish up some other things on it and I will start using it in a demo. Might have to refresh a couple of times until the graphics all load. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted October 19, 2017 Author Share Posted October 19, 2017 **UPDATE** Ok I have finished up quite a bit more. Fixed the async buffer loading issue, got the parallax effect working and added some other functionality. I will soon start working on animated tiles, and then the ability to add sprites to a layer. Anyone have an idea of the best way to set up animated tiles, I was thinking of using the blue and alpha channels of the tile image to control the frames and timing, but then would not have a channel left for collision states of tiles... so Im not sure whats the best way to go about this. Maybe a secondary tile texture for collisions/triggers. Ill do a prettier/smoother demo soon with maybe like 3 or 4 layers. http://pryme8.github.io/tiles/ Now to figure some stuff out though, I want to somehow figure out what "tile" is clicked when the scene is interacted with so I can make like and editor for levels. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 20, 2017 Share Posted October 20, 2017 This is pretty good!! congrats Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted October 20, 2017 Author Share Posted October 20, 2017 Trying to add animation support and some other things like lighting effects tonight when I get off work me thinks! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 23, 2017 Share Posted October 23, 2017 Please keep us posted! Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted October 23, 2017 Author Share Posted October 23, 2017 for sure! - thanks for your interest. me and @Nabroski are working through the animation problem If we get past this step ill post a real demo. Here is the one from the first post with a working URL though https://pryme8.github.io/TileMaster/ Nabroski 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted October 31, 2017 Author Share Posted October 31, 2017 Starting to get more of the things I want done with this finished up!https://pryme8.github.io/TileMaster/dev/click-test.html Here is click interactions with the shader in the unit sizes of the tiles. Click somewhere on the screen near the center and you will see the tiles update. getting through some more of the minor stuff, and then Ill post a demo showing off all the features. Development Tasks: Convert all textures to dynamic even if a img is loaded from a URL. Pxl Perfect Lighting. Multiple Sub-Layers Per Plane Layer. Collision Data on tile reference image. Finish Up Animation System. Add "Actor" sprite shader and control object. Different Click modes for repeating/non-repeating maps. Small fixes to the shader for more configuration options. Maybe a different unit system, to fix the clicking scale bug. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 6, 2017 Author Share Posted November 6, 2017 So I got a weird thing happening with my animations. Everything "works", but I had to go about it in a different manor then what was first thought out. Anyways the odd thing that is happening is the numbers 3.,6.,7. do not see to work. What I am doing is referencing a texture on the shader that tells the atlas what tiles have an animation by using the red channel for the animation type (I kinda cheated and hard coded different instances this time just to get moving on other things). I then use the green channel to increase the speed of animations, and the alpha to slow or turn off animations. All of that works! but... 3, 6 and 7 do not seem to trigger in the code when I use them on the map... Im confused because if they did not work the other parts of the shader that use the same method should not work... so Im kinda thinking it is in the way that the floats are being calculated or maybe some kind of rounding is being applied? Here is the code:https://github.com/Pryme8/TileMaster/blob/gh-pages/dev/ani-test.html#L165 and here is an Example:https://pryme8.github.io/TileMaster/dev/ani-test.html Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 6, 2017 Share Posted November 6, 2017 Works well! Quote Link to comment 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.
Note: Your post will require moderator approval before it will be visible.