User Tag List

Results 1 to 3 of 3

Thread: Hiya, people, need help with two functions

  1. #1
    No Products Registered

    Join Date
    Sep 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hiya, people, need help with two functions

    Hi. I've been using The Games Factory 2 for a couple of years (though pretty rarely). I also used to have TGF1 a long time ago. I know a lot about what you can do and what you can't in TGF2's limits, expect I have never had the patience to create a full, working game

    Two days ago I downloaded the MF2 demo version. I have had the idea of making a Roguelike game. Like NetHack. Awesome, eh? The idea of NetHack is that you are thrown in a complex dungeon, and you have to complete the main quest in any time you want. The trickest parts are keeping a large enough food supply, and in the fact, keeping yourself alive. If you die in the game, it automatically removes your save files. That way, you will die permanently.

    In the game, you can do pretty much everything, based on what your character learns and what items he uses. For example, you can throw any item at an opponent to hurt them, not just any weapon.

    Sounds complicated? I'm not gonna recreate NetHack. I'd make a smaller place where you roam.

    Now the main problem is time, since the game should be turn-based. Every time you do something, you add one turn (say, in-game about 2 seconds). And then come the turns of all the moving creatures on the same level.

    I need help with the structure of events. My current formula detailed:

    - You move, and your internal flag #0 turns on
    - When flag #0 is on, user input freezes, so you can't do anything. The turn count (Global Value A) adds by one. Then begins the event group, which should handle the turns of the NPCs
    - Then this group starts acting... and what next? How can I make the NPC's do their moves one by one?

    If I could get a way to make one NPC start its actions, and end them when done, I could do a lot of the rest at ease. Just a lot of actions and events. After all NPCs have made their actions, the flag #0 is turned off, giving control to the player again.

    The second problem is vision. A character's eye vision. How to do that? Every time your turn begins, shoot objects to every direction and test for collisions? Or test if you can draw lines between them (if this is possible).

    I'd appreciate any help & tips you can give. I know this is a challenging project too, but if it worked, it'd be great. :S

    So any ideas or improvements?

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hiya, people, need help with two functions

    Very quickly, just to start some discussion on the thread - there are a couple of tutorials that involve fastloops in the Tutorials link on the right, and you could use something based on these to get each AI object to move in turn. You can use them to "select" an individual instance of an object on each cycle through them and to perform actions to only that instance. This is undoubtedly a tricky area, though.

    For line of sight, the neatest solution would be to do it mathematically by drawing virtual lines outwards from your player, though I'm not sure of the extensions that would allow you to do that effectively. A grid-based game like Nethack would probably make things easier if you have a concept of the grid in an array in the background, rather than just in the game's display - this way you should be able to more effectively examine it and work out what should be visible.

  3. #3
    No Products Registered

    Join Date
    Sep 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hiya, people, need help with two functions

    Ah, thanks for mentioning the fastloops. I'll study them more when I find the time.

    So I should use the Array object? That sounds logical. I shall check it out sometime, too.

    Thanks for these two tips; they just might be what I need.

Similar Threads

  1. How do you get people to buy your app?
    By johnnier in forum Android Export Module Version 2.0
    Replies: 6
    Last Post: 11th November 2013, 06:59 PM
  2. I need help from people that know.
    By OldGuy in forum Multimedia Fusion 2 - Technical Support
    Replies: 18
    Last Post: 12th September 2008, 07:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •