Fußabdrücke im Spiel

  • #1, by Hoschi.380Friday, 05. January 2018, 18:50 6 years ago
    Hi,
    ist es irgendwie möglich, dass die Spielfigur in der Kulisse Fußabdrücke (als Grafik) hinterlässt? Bin schon die ganze Zeit am überlegen und probieren aber einen wirklichen Geistesblitz hatte ich da bisher leider noch nicht 

    Newbie

    10 Posts


  • #2, by afrlmeFriday, 05. January 2018, 19:28 6 years ago
    To a degree yes it's possible. I would however recommend making a system that recycles the footprint images.

    Let's say you have 10 footprint images. What you could do is create a bunch of characters which contain the footprint images. You will also need a value that you can query/increment - it will be used to determine which character to show & position. Inside of your characters walk animations you could insert some script on the relevant frames which should create a footstep that will query the current footstep value, call & position the relevant character, then increment the value or reset it back to 1 if the value equals 10.

    Anyway, I'm not going to go into the details on how to sort it out, but maybe you've gotten an idea on how to go about it yourself.

    Imperator

    7278 Posts

  • #3, by sommer1993Tuesday, 09. January 2018, 10:32 6 years ago
    Weniger professionelle Lösungen könnten sein.....

    In dem Spiel wird mit einer Aktionsfläche gearbeitet https://www.visionaire-studio.net/downloads/view/fantasy-quest/ oder wie die auch immer heißt^^....

    Wird die Fläche betreten könnte es Fußabdrücke geben. Verlauft der weg in 2 Richtungen wird es problematisch.

    Eine weiter Lösung wäre temporäre Fußabdrücke in die Laufanimation zu packen für die einte Kulisse, Sind halt nur beim Laufen sichtbar.

    Newbie

    73 Posts

  • #4, by SimonSTuesday, 09. January 2018, 10:43 6 years ago
    Noch eine Option wäre es mit dem Partikelsystem zu machen.

    Thread Captain

    1580 Posts

  • #5, by esmeraldaTuesday, 09. January 2018, 12:53 6 years ago
    Könntest du erklären, wie sowas über das Partikelsystem geht?
    Oder kommt demnächst die lang erwartete Dokumentation zum Partikelsystem? Wäre toll! :-)

    Key Killer

    508 Posts

  • #6, by afrlmeTuesday, 09. January 2018, 13:34 6 years ago
    Könntest du erklären, wie sowas über das Partikelsystem geht?
    Oder kommt demnächst die lang erwartete Dokumentation zum Partikelsystem? Wäre toll! :-)
    I don't understand how it would work with the particle system. Footprints would require the z-index to be beneath the player. The positioning & direction needs to be triggered on the animation frames of each walk/run animation where the foot actually contacts the ground. Don't forget that the footprints should also be scaled to the current size of the character too. All of these reasons are why I think it would be better to create footprints as characters as they will automatically be scaled & aligned correctly. The position would have to be offset by -1 pixel on the y-axis from the current characters position to make sure the character is drawn above.

    I wonder if it would be possible with the Lua draw function? It would be an interesting approach which would allow the creation of possible infinite footprints. You should be able to scale & possibly rotate them too & as long as the image/object center (z-index) is set to -1, they should always be drawn underneath the character. 

    Imperator

    7278 Posts

  • #7, by MachtnixTuesday, 09. January 2018, 16:45 6 years ago
    Ich hab das auch schon mal versucht, aber ich sehe keine Möglichkeit ohne RIESIGEN Programmieraufwand.

    1. Die Fußabdrücke können nicht bleibend erstellt werden. Sie müssen also nach einer gewissen Zeit verschwinden, was ja häufig genauso gelöst wird.

    2. Verwende ich einen "Fußabdruck-Charakter" ist das die vielversprechendste Lösung. Der Fußabdruck-Charakter folgt der Spielfigur. Da er sich aber nach dem Spielcharakter ausrichtet, kann es vorkommen, dass sich die Fußabdrücke auf der Stelle drehen, wenn abrupt die Richtung gewechselt wird. Damit wird man wohl leben müssen.

    3. Am einfachsten wird es wohl sein, die Fußabdrücke in die einzelnen Laufframes zu packen. Die Animation der verblassenden Abdrücke wäre auch gleich in der Lauf-Animation mit verankert. 
    Dann wäre die Standpose entweder mit oder ohne Abdrücke. Immerhin hätte man so gleich die korrekte Richtung. Auf Untergrund ohne Fußabdrücke würde man einfach das Outfit wechseln.

    4. An eine Lua-Lösung traue ich mich nicht heran. Man könnte sicher Position, Richtung und Größe des Charakters jedesmal abfragen und demensprechend Grafiken anhängen, aber wie der Versatz usw. berechnet werden muss, kann ich nicht sagen. 
    Es gibt auch ein Phänomen, das mich seit Monaten ärgert: innerhalb von Lua ergibt z.B. die ausgelesene Richtung einen Wert von 5,87°, aber die Figur wird natürlich auf einen gerundeten Wert gesetzt, je nach Anzahl der Winkel, meist sind es vier oder acht. Ich muss also Bereiche benutzen, in denen ich vor der Werteausgabe alle krummen Werte auf vier oder acht runde.

    Thread Captain

    1097 Posts

  • #8, by LebosteinTuesday, 09. January 2018, 16:56 6 years ago
    Wäre das nicht eine ideale Aufgabe für das Partikelsystem? Als Quelle müsste man halt eine bestimmte Koordinate auf einer Person angeben können, die bei bestimmten Frames ein Partikel emittiert. Als Emitter-Winkel könnte man die aktuelle Ausrichtung der Person abfragen und übernehmen. Jetzt weiß ich natürlich nicht, wie tief man das Partikelsystem beeinflussen kann....

    Key Killer

    621 Posts

  • #9, by sebastianTuesday, 09. January 2018, 23:54 6 years ago
    i guess you have to use the lua particle functions to draw specific things at character positions. The in engine particle workspace is only appliable to whole scenes or scene objects

    Thread Captain

    2346 Posts

  • #10, by SimonSWednesday, 10. January 2018, 10:35 6 years ago
    I made a small demo how it could work.

    You need essentially an object on the scene that holds the particle system and move the emitter via lua. I also added scaling the particles and rotating them. It could also be possible to fine tune this more for advanced animations.

    About documentation, I have started more systems that I want to finish first, then there will be videos for the particle system and the sound system and the other coming system.

    Thread Captain

    1580 Posts

  • #11, by dionousWednesday, 10. January 2018, 11:38 6 years ago
    that's a fantastic example indeed!

    Forum Fan

    246 Posts