Utility: RPGenerator v0.7.23 - Build your own RPG in Codea

I’ll check it out and see if I can fix it. It looks like a fresh install works fine (no current project, no images), but when updating from a previous version these issues are occurring.

Hmmm, with the latest update it is even throwing errors on fresh installs, I’ll keep on looking into this.

So it is downloading the images correctly. It is waiting to call the draw function correctly. When it tries to generate the map, Codea is not recognizing the newly downloaded images. So far, the only fix, like you guys said, is to restart Codea completely.



All the code looks pretty air tight, the images are just returning a nil value when newly downloaded, not sure why.

Log it as a possible bug, I suggest

I just changed the name of my project to RPGenerator. Something went wrong when I tried to update the name in the AutoGist so I just remade the auto installer. New links are in the first post.



By the way, what do you all think of the new name RPGenerator?

1: RPGenerator sounds awesome.
2: When I start it up, I get a black screen or a few seconds, if I exit Codea crashes, if I wait it gives me an error in GenerateMap:36 attempt to index field sheet.
3: Looks awesome, though…

@SkyTheCoder, yep that’s the issue I just submitted to the issue tracker. On first load, let the project run until you get the generateMap error. Then, close Codea completely and restart it, then the project will run correctly.

Weird, I could have sworn I closed Codea completely and it still crashed, but now it works, and I have something to point out: the controls are way too sensitive. I finally was able to move the little guy right next to a hedge and see it said “Popup example: Move left to teleport.” Also, diagonal movement please?

@SkyTheCoder, I most likely won’t be doing diagonal movement since all the charasets only have left, right, up and down movements. As for the controls, I am planning to make them slower and smoother. Right now the animations are rendered on the fly and in the future I will have set functions for each movement.

I’m having the same image loading problems on my own project, using the auto-downloading code. We’ll see what the tech boys say about the problem…

I cleaned up a lot of the code and released v0.4.6 just now. You will notice many areas are much easier to read and the tiles/objects tables have been rewritten to make it easier to import your own tilesheets.

I am now working on animated tiles for v0.5.0 and also the addition of NPCs for v0.6.0. Versions may swap as I am assuming it will be easier to finish animated tiles than to add NPCs and all their functionality (dialogue, shops, etc.).

Added a Roadmap to the first post so everyone can see how far I plan on taking this project. When finished, it is my hope that anyone will be able to create a full-fledged classic style RPG. To make such an RPG will still require hundreds of hours worth of coding even while utilizing the RPGenerator. This project will not write your RPG storyline for you :stuck_out_tongue:

Ideas for NPCs have been popping into my head more than for animated tiles, so it’s looking like walking and talking NPCs will be done first.



I have run into a problem, however. The NPC dialogue is solid, the NPC movement is pretty solid (except the animation), but the NPC is not being redrawn over passable objects. I am using the same checks as I do with the player and the player is working as expected, but the NPC is never redrawn. I have updated the current version to v0.4.7 so you all can grab the new code and toss me some ideas about this issue.



Currently, the NPC only moves down so that it goes over that single patch of forest with its first move.

ROFL, I forgot to include the 2nd instance of drawing the NPC inside the push matrix so it translates with the map. Got it fixed and now we are officially on v0.5.0, yay!

Just noticed that NPCs are being drawn on every map, so I added a map variable to the NPCs table to fix this.

What is the best way to animate something on a grid map? Currently I am changing its position then creating an offset variable that slowly decreases or increases (depending on the direction the character moved). This works very well for animating the player and the offset variables (moveX and moveY) are making it so the map slowly translates into position instead of instantly. Now I need to do the same with the NPCs, however I can’t use more offset variables on the translation of the map, so I’m thinking of adding individual offset variables per NPC and slowly animate them as they move. Is there a better way to accomplish this using the tween function?

As of now I got the animations working for both the player and the NPCs without using tweens. The offset variables are working well. Have not seen FPS drop below 55 so I am ok with it for now. Gonna add a ton of NPCs onto a map and see if it lags out.

Now I have 12 NPCs all walking around on the map at a quick rate. After about 5 minutes of letting the project run, it crashes. Trying to figure out what is going wrong. I have limited my calls to sprites and meshes by tossing everything generated into tables and reusing those meshes when appropriate. There is definitely a memory leak somewhere, and it most likely has to do with how I animate the player and NPCs. Tossing my current code into v0.5.5, if someone could check it out and toss me some ideas it would be greatly appreciated.

I’ll take a look at it.
edit: in 0.5.5 I’m getting a maps is a nil value error, main.lua line 100.