@Jessevanderheide, btw, were you able to get the project working with your custom maps? Also, have you had any trouble adding your own custom character and tile sheets? I’m curious to hear how easy or difficult it may be to customize the project.
@Slashin8r if you add a new mapp you will need to costumize the events, buti cant get it working, applying costum tilesheets isnt hard, but costum maps dont seem to work for me.
When I updated, I found my screen was black and no matter how long I waited I got no error. It didn’t seem to be loading anything, and when I looked at the code there was no draw or touched function. I got the installer again, and it’s not working. It’s still using the default code template after I replaced it with the installer. I’ve restarted Codea completely multiple times and no effect. This is probably only happening to me, but anyways, help?
Okay, I fixed the installer not working. I derped an instead of replacing the project with the installer I added the installer to the top of it. The installer worked, and I need to say quickly that a lot of tabs are gone. I guess they were removed from the gist, but not the project. Now I’m still stuck on the black screen though, restarted Codea with no effect. No draw/touched function. Just the update checker in Main.
@SkyTheCoder do you know about the ‘black screen bug’? If this is your problem (not sure) run this gist (from Dave1707 initially) after changing the project name variable inside, so that it removes invisible bad characters from your project. It could save your day.
Edit :Sorry, wrong gist, i have to find it back..
Edit: just made a new one : https://gist.github.com/JMV38/6015514
Ugh, fricken power went out here for a few hours. Back up and running now.
@Jessevanderheide, you are absolutely correct about the custom event to get your character to the new map. What you want to do is copy one of my current teleport events and add it to the bottom of the table, separating it and the event above it by a comma. Then, change the map variable in the event to 3 (or whatever the index of your new map may be). Also, verify that you added map3 to the maps table, should look something like maps = { map1, map2, map3 }.
@SkyTheCoder, did you install both projects? I have split my project in two, RPG and RPGenerator. After installing both in new blank projects, open RPG project and make sure RPGenerator is set as a dependency.
I found a render glitch in my code that makes a character appear behind an object when moving from behind a decor to on top of an object. The character appears behind until the move animation completes, then renders as expected. This also happens when moving from on top of an object to behind a decor. Hopefully I will have this issue fixed soon and push out the update.
@Slashin8r - a render “bug” may occur if two drawing layers get too close together, then OpenGL can flicker between them, or not draw them in the right order. I assume you are sorting your meshes all the way through the animation.
@Ignatz, I actually just figured out the problem and pushed the update through. It was my testBelow function. I originally had it return true or false to decide whether or not to redraw the character, but after adding the character.behind variable, I was using both the return value of testBelow and the character.behind variable to decide whether or not to redraw the character. I moved testBelow out of the test and use only character.behind now, and I also change the value of character.behind half way through the animation instead of waiting for the animation to complete. So it was more so my own error and not a render error, hehe. Sometimes I forget to remove old code and it causes issues such as this.
Quick question. How do I get only part of my character to render 50% transparent? I’m guessing I could accomplish this with a shader. I would need the shader to follow the player and the NPCs and only become active when they step over world map forest tiles or other such objects like walking through water.
@slashin8r Are you planning on adding weather effects like fog or rain? I think that would look neat on a 2d map.
If not, anyone have tutorials for weather effects I could be pointed to? Maybe I can use a shader to mimic these environments.
@Aalok, great suggestion. I didn’t even think about weather effects. I will add it to the roadmap, but it will be the lowest priority for now, unless I become a shader pro after trying to get characters to walk through grass, forests, and water like mentioned above. If you come up with something that works before I do, I would love to implement it into the project.
Edit: weather would also be perfect for cutscenes
@Aalok-
http://coolcodea.wordpress.com/2013/06/07/79-shaders-creating-mist-and-lighting-up-the-dark/
@Slashin8r - these shaders would make your world look very mysterious…
@Aalok you cold try using Particular Particles for weather effects.
Ok, so I made a shader that turns the character into a ghost by adjusting the alpha. How do I get the same effect, but over just a part of the mesh?
I have a rain effect running (using @Briarfox Paticular Particles) with your most recent code @slashin8r. My issue is I can’t seem to draw it within the boundaries of the map. I am calling the draw for Rain in the generateMap tab.
I will work on it a bit more and post what I have.
Never mind, I figure that out. Just had to add an if statement. Now I have a new problem. Since I use the sprite sheet as the mesh and cut the sprite image from it, my shader is being applied to the sprite sheet instead of the sprite…
@Aalok, nice, working fast I see. I will try to patiently await your update, hehe.
Ok, got the shader working now. I just simply have it change the alpha in 4 locations instead of 1. So now the sprite sheet has transparent lines going across it and that works out perfectly.
@Slashin8r - I think the way to apply the shader to a part of the mesh is
- in the vertex shader, pass the current position to the fragment shader
- pass (from Codea), the coords of the image you want shaded, to the fragment shader, which can compare them with the pixel position and shade them if applicable
I will have a go for you and report back soon