Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

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

1356

Comments

  • Posts: 391

    Just pushed out update v0.6.6 which moves character move animations into its own function. I also changed how the speed is calculated so that speeds that are not factors of the current tileWidth (32 for map1 and 64 for map2) will work. So now speeds such as 1.5, 3, 5, or any other fraction will work just as well as 1, 2, and 4. This will give you more control over movement speeds, which will be perfect for mounts and vehicles.

  • Posts: 391

    Updated the Auto Installer.

  • Posts: 391

    Update v0.6.7 cleaned up the draw function substantially so that I can get the project ready for menu options.

    Currently working on the addition of odd shaped objects. This will include yet another grid map (I know you're thinking there are too many of them now, but don't worry because the plan is to make a map editor and then these grid maps will be automatically filled for you :D ). These odd shaped objects will be drawn last, meaning they are simply placed on top of everything for decoration.

  • BriarfoxBriarfox Mod
    Posts: 1,542

    @Slashin8r Looking good as always!

  • Posts: 391

    Updated documentation of the tables used to generate the map. You can now read what each tile is, instead of searching through the tilesheet images.

  • edited July 2013 Posts: 391

    Argh, these RPG Maker object sheets are going to be so hard to pull images from. They have 128x128 objects with 32x32 objects stuffed in the middle of some of these 128x128 objects. I think my best bet is to rearrange these object sheets and put all 128x128 objects on one sheet (32x32 on its own, 64x64 on its own, 32x64 on its own, etc.). I wanted to make it where someone could simply download one from the RPG Maker resource site, but with all the images on a single sheet not being the same dimensions, it makes it more difficult to programmatically pull out the images in usable form. So instead, I will compile a bunch of default object sheets and put them in the project for use.

    I will include object sheets with objects of the following dimensions (with 32x32 being our default tile size for world maps and 64x64 the default tile size for town/dungeon maps):

    32x32, 32x64, 32x96, 32x128


    64x32, 64x64, 64x96, 64x128


    96x32, 96x64, 96x96, 96x128


    128x32, 128x64, 128x96, 128x128

    Take this object sheet for example:


    Tile C



    It would be such a pain to break that up and figure out where each object is. I would have to break it all up into 32x32 bits and then piece back together those roofs, remembering to exclude the top corners and bottom middle piece. Then they throw in some 64x32 objects and then some 96x32 ones, and on and on it goes. Those roofs are actually larger than 128x128, I believe they are 160x192, but I can always scale them down to fit one of the dimensions I mentioned above.

    The only reason RPG Maker had people make object sheets like this is because of their limitation on the number of tile sheets you could use in a single project and the size of the tile sheets could not exceed 512x512. Well... It's a good thing Codea can use an image that is much larger than 512x512, and I have setup this project to be able to use any number of tile sheets you wish to use.

  • BriarfoxBriarfox Mod
    Posts: 1,542

    Yeah I have found tile sheets like that to be a huge pain.

  • IgnatzIgnatz Mod
    edited July 2013 Posts: 5,396

    ..especially when the sprites overlap...

  • edited July 2013 Posts: 60

    @Slashin8r. I was attempting to add large trees that i don't want scaled down to fit the block. i assumed sheet.type 4 was for this but I am getting an error.

    error: [string "-- GenerateMap..."]:212: attempt to index local 'img' (a nil value)

    This is with a new image set or if I change one you are using. Any ideas?

  • Posts: 391

    @Aalok, I haven't updated type 4 in a long time. It will play a major role in the next major update. All of these new object sheets will utilize type 4. Hopefully I will have the code ready this weekend.

  • Posts: 391

    Couldn't sleep so I decided to fix the type 4 algorithm. Update v0.6.9 will now be able to place decoration objects temporarily using the objects table and objects map (when I release v0.7.0 these types of objects will be moved into a decorations table and have its own decorations grid map). New variables have been added as well, xSpan and ySpan. These indicate the number of additional tiles the object will cover. In my example, I am placing a 2x3 tile building and I want the top to be passable so we go behind the building, so xSpan = 1 and ySpan = 1. This means that we need to map a 2x2 of the objects table index (23 in this case) on the objects map. As of now you can only have 1 row where you can go behind the object, in v0.7.0 I will make sure you can customize which tiles should make you appear behind the object.

    Now to actually get some sleep, lol.

  • Posts: 391

    Updated to v0.6.10 with a bunch of changes to the newly added decorations. I am now 1 step away from being on v0.7.0 (I just need to add some decor sheets and test).

  • Posts: 391

    I am currently working on splitting up my project into 2 projects. Since it is pretty much at the point where you can make fully functional maps, I didn't want my updates to overwrite any of the work you may start to do. RPGenerator will contain the map generation code and all the animation code. You can then make a separate project (using the new one I will upload as a base) to start making your own RPG. This project will contain all the tables including images, maps, objects, tiles, etc.

  • edited July 2013 Posts: 391

    It is recommended that everyone clears their current projects and reinstalls. You will now need 2 projects, so install both projects found in the first post. The RPG project will not auto-update so your characters, tiles, objects, maps, etc. will not be overwritten.

    Once you have both projects installed, don't forget to add RPGenerator as a dependency in your RPG project.

  • edited July 2013 Posts: 391

    Did a fresh install on both projects to verify that it works and I had no problems, hopefully you all get the same :D

    Now to make some tile sheets and release v0.7.0. Should be done within a few hours (would be quicker but I'm feeling a bit lazy this weekend, hehe)

  • Posts: 391

    My sister stopped by with her kids, I'm gonna have to put the update on hold until tomorrow. The code for rendering the decor objects is all done with the latest update, so feel free to make your own decor object sheets in the meantime, just make sure each decor object is the same width and height per sheet.

  • Posts: 391

    Updated RPG project. I moved each map into its own tab so that the maps tab doesn't become so large it's impossible to read through. To add additional maps, copy map1 or map2 into a new tab, rename the variable at the top, then add new variable to the maps table on the maps tab.

  • Posts: 391

    I decided to just use the tilesheets as they are and split everything up into 32x32 pieces that have to be manually placed. I ran into a problem with my current algorithm where decor objects would overlap each other. This is the best solution for the problem, however, it means that there will be potentially thousands of different decor objects (with the 5 sheets I added, they give us 1152 decor objects).

  • edited July 2013 Posts: 391

    Updated both projects. RPGenerator v0.7.0 has been released. RPG v0.2.5 is the update that utilizes it.

    Walk your character over to the left to enter map2 and check out the pine trees I added. The single pine tree uses 4 different tiles to build, and the pine tree forest uses 8 tiles to build (the 4 for the single tree and 4 additional tiles).

  • edited July 2013 Posts: 391

    Updated both projects. RPGenerator v0.7.2 and RPG v0.3.3 now support 3x4 sprite charasets as well as the previous 4x4 sprite charasets.

    A minor addition was made to the charasets table to allow this to happen. You will notice charasets now require a m variable. The m variable is a table of 4 numbers which indicate the animation order of the sprites from the charaset.

  • BriarfoxBriarfox Mod
    Posts: 1,542

    @Slashin86 looking great! If I could, I'd like to request an updater in rpg. I understand your reasons for not including it, but could you add a toggle that allows us to turn updates on? Or a manual update button?

  • edited July 2013 Posts: 391

    @Briarfox, I'm not exactly sure how to do that with the update code being auto generated. I set updating to true and pushed out a new release, but then had to manually move the update version check call into an if statement so its only called if autoUpdate is set to true.

    Now if I update again, the update version check will be auto generated at the top of the setup function, outside the if statement.

  • edited July 2013 Posts: 391

    Ok, I got it setup now. I changed your AutoGist:addUpdateCheck to toss the version checker into setup3 instead of setup. Now every future update I won't have to manually move the version checker.

    Maybe this could be added to your next update of AutoGist, the ability to choose which function the version checker is added to.

  • BriarfoxBriarfox Mod
    edited July 2013 Posts: 1,542

    Well since its added during gist. I'd recommend copying the code into the project, use your if statement and set add updater to false.

  • BriarfoxBriarfox Mod
    Posts: 1,542

    Good call @Slashin8r I'll do that. So if you want it in a parameter.action you can add it :)

  • Posts: 391

    Just a thought on how to configure my suggestion above:

    a = AutoGist(PROJECTNAME,"description",VERSION,[true|false|functionName])

  • Posts: 391

    @Briarfox, oh duh, I definitely could have added it manually to my project too and just left the part that adds the code to the gist false, then I'd have total control over it anyways, lol. I didn't think about going back to the original way it worked.

  • edited July 2013 Posts: 391

    So I've been hand drawing all my menus so I know how to program them into the game. So far I have the following menus:

    Main (options: resume, load game, new game, help, options)


    ----Load Game


    ----New Game


    ----Confirmation (for load and resume)


    ----Help


    ----Options




    In Game (options: inventory, equip, magic/skills, status, party, config, quick save, save)


    ----Inventory


    ----Equip


    ----Magic/Skills


    ----Status


    ----Party


    ----Config


    ----Save




    Shops (options: buy, sell, equip)


    ----Buy


    ----Sell


    ----Equip (same menu as above)




    Let me know if any of you come up with more menu additions. Thanks in advanced.

    Edit: I am using CiderControls for the menus, I think I will physically copy the tabs from CiderControls into my RPGenerator project so that everyone doesn't have to install yet another project and add it as a dependency.

  • @Slashin8r so you are adding a menu?

  • edited July 2013 Posts: 391

    @Jessevanderheide, yep, I will be making everything needed to create a fully functional classic style RPG. Check out the roadmap in the first post, it highlights my plan for future updates.

    I forgot to add a party menu, and a quick save button to the in game main menu. Updated the post above.

  • edited July 2013 Posts: 391

    Feel free to make your own menus as well. For the most part, RPGenerator will just handle the menu functionality (e.g. when the menus show up). You will still be able to customize the looks if you don't want to use the basic default menus I am planning to add in.

  • @Slashin8r thats pretty cool, are you gonna make a inventory in the future?
    And if you dont dan you make an exempel for me?

  • edited July 2013 Posts: 391

    @Jessevanderheide, a basic inventory menu will be included. It will list the items you have, allow you to use them, view info, or sort them (both manually and automatically by name, type, etc.).

    For an equipment menu, I'm thinking old school like: right hand, left hand, head, body, accessory.

  • @Slashin8r how long did it take for you to understand codea, becausethis is great work!!

  • @Slashin8r and when is this update coming out?

  • Posts: 391

    I'm an experienced web (HTML, php, JavaScript, etc.) programmer and am very familiar with many programming languages like, C, C++, C#, Java, etc. I learned C++ and Java in high school and then self taught the other languages.

    With the above experience, I picked up on Lua fairly quick. I've been using Codea for about 3 weeks now. The great thing about programming is that logic never changes, just syntax. So once you understand how to program logically, you can teach yourself any programming language. Some verbiage and syntax such as using a : instead of a . for class function calls are some of the differences I found in Lua when compared to many other programming languages.

  • Posts: 391

    As for the menu update, I have no set timeline for it. When it comes to programming GUI, I am very slow. I have no artistic mind whatsoever, lol. I am hoping to have the basic menu functionality ready by this upcoming weekend, but there is no guarantee.

  • @Slashin8r when is the update coming out?

  • edited July 2013 Posts: 147

    @Slashin8r oops sorry, it doesnt matter when you get it out

  • Posts: 391

    @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.

  • Posts: 1,976

    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?

  • Posts: 1,976

    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.

  • Jmv38Jmv38 Mod
    edited July 2013 Posts: 3,297

    @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

  • Posts: 391

    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.

  • Posts: 391

    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.

  • IgnatzIgnatz Mod
    Posts: 5,396

    @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.

  • edited July 2013 Posts: 391

    @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.

  • edited July 2013 Posts: 391

    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.

  • Posts: 60

    @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.

Sign In or Register to comment.