Toya Aponesto's Forum Posts

  • Alright, so I'm trying to come up with my own algorithm for constantly obtaining the X and Y positions of my NPCs using private variables. But before I would put it all into events, I need to ask if is possible.

    Since there will be a time where the player will leave the layout, and would eventually come back. What I need is for the game to record each NPCs current X and Y pos the moment the player left the layout, and when he gets back, it will just load it up and will cause the NPCs to be recreated at the same positions they were when the player left the layout.

    So how would I do that?

    Another is how do I play a transition that will only cause the player to transfer to a different position, not layout? I was thinking that if the player goes out of the house, there will be a small transition, like the circle and will cause the screen to go black, then will fade and at the moment, the player will already be outside of the house.

    How do I do that? Helps will be much appreciated.

  • If ever I would go with the big layout with lots different maps in it route, I would assume some lag in it, my uhh desired height and width for the layout would probably be... 51200x51200? I tried it, and it was alright at first, but I'm guess as I put more maps or objects in it, its going to lag slowly and slowly.

    Anyway, is there a way to load every objects in that layout before showing everything to the player? You know... loading screens?

    And assuming a 52100x52100 layout full of objects all moving and doing their own stuff synchronizingly, how much RAM would you recommend? Since I will be putting this in our "System Requirements"

  • So the shrink/zoom is a bad idea. Anyway, wouldn't it affect the NPCs if they entered a part of the layout on which the player is not literally on, since at that time, the objects would not have been created since they're not on screen?

    Would it decrease the usage of memory or lag if objects were invisible until either an NPC or the player is not in that part of the screen? And that it becomes invisible again if theres no NPC or player near by.

  • I have been thinking, since it might be too far from possible to travel an NPC from layout to layout using the current version, how bout if I make one layout as big as I can and divide it into several square pixels or something, then each square pixel will have its own map, so instead of traveling between layouts, the NPC will just travel inside the layout but in different parts and it produces the illusion that everyone in the game is traveling between maps.

    I know this could probably lag the game at some point. Would it be a good idea to shrink everything by half and at the same time zoom the screen by half? So that when playing, it would seem as if everything is at the same size as its suppose to be.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Since I'm making an RPG and I'm trying to make the NPCs travel between layouts, I have thought of a pseudo that might work for them to be able to do that. I have not tried this but I'm gonna post steps. Try to correct me if it wont work or something or give some suggestions etc.

    Assuming I have all the things I need (objects etc..):

    1. Make a set of global variables for each NPC (or just a global array).

    2. Make the NPC objects global.

    3. When an NPC enters collides/overlaps/i dunno a "warp" object, depending on which warp object, it will it put some values in that NPC's global variables like its warp destination(layout name and position). A variable that will contain its destination will also be inputted by a value.

    Ex. Lets say NPC1's global variable "place" has a value of "village1" and its global variable "posX and posY" have 10,250 as its values respectively. When it collides with a warp object that suppose to enter village2, the GV "place" which has a value of "village1" will be replaced with "village2" and lets say the posX and posY GV is replaced by some a certain value. After that, an event will take place wherein NPC1 will be teleported to the layout and position base on its GV "place" and "posX" and posY". After that, NPC1 in village1 is destroyed.

    Ofcourse, besides those 3 GV (global variable), there will be other variables to be included (I guess )

    So that's my uhhh algorithm for this. Any help? Recommendation?

  • I see. So how do I start making my own? Does anyone have one?

  • I don't know if it works for you guys, but does the save/load to disk and quick save/load work? I tried making it that if the player presses the F1 button, it will quicksave, if F2 it will quick load, and did similar with the save/load on disk but in a different button. When ever I load, it hangs and the game stops responding.... Is something wrong with my game?

    Another question on saving in regards to private variables. If I have my NPC's private variables changed during gameplay and saved the game file on disk, are the values also saved?

  • [quote:2yv8mtsu]

    But what about erosion? Personally I transmit the data into space, so that if something crashes I can just get into my FTL spaceship and catch up with the transmissions.

    What about meteorites and asteroids? No data is safe anywhere. Just stick it in you head. But personally I keep it all in the internet (Mediafire/Rapidshare) because internet cannot be broken. If it does, then internet gone = world destruction.

    But on to the topic, it should be a lesson that we back up our files almost every time we are done working on it on a daily basis, like keep it in 3 different folders or upload it somewhere.

  • But what ever changed there is kept at constant right? If I went from map1 to map2 and an object was in position (1,1) and when I went to map2, it went to position (12,23), if I go back to the layout, will it go back to where it was placed?

  • I was thinking that if I make one city in one layout and trying to avoid NPCs from going anywhere, I would just set roofs in houses to opacity 0, and that if the player goes in, the roof's opacity becomes invisible or something. But of course, it does not apply to NPC since they wont need it. And if the town is big enough, then probably NPCs going outside of that map may be needed no longer.

    And if they do, I'd just make some kind of counter that:

    If NPC1 goes out of map1, then NPC1Outsideoftown=1 indicating that NPC1 is no longer in map1 and but in Map2.

    If Map2 is loaded, it checks which NPC has a value of 1 in the NPC1outsideoftown variable. Maybe I could make it a private variable. But I think that would be time consuming.

  • Ooohhh nice! Thanks. Back to topic, I'm pretty sure it would be laggy if I make my rpg in ONE HUGE LAYOUT and fill it with.... EVERYTHING... How big can a layout be in its size?

  • It requires AdvanceCamera.csx, now where do I get that? And yes, I already have that one Pix. Seems to be like Diablo to me lol.

  • It would be a start, but the main character in my game moves in RTS movement, which is 8 directional. Would 8 directional behavior work? I'll probably set the controls to none or something so that the player cannot manipulate the NPCs, if any is online right now, go to chat

  • Well, I guess we can start a random movement, like the npc will move at some point to a random location, and stay there for a bit, then probably move again.

    What behaviors would be required for this?

  • So I was messing with different behaviors just to see what they can make 1 of my NPCs do. I ended up combining RTS, Custom Movement and Line of Sight but still has some bugs in terms of acting like an NPC.

    My question is which behavior should I use? And how do I make them randomly move around the map?