Flutch - Erobert die Welt

  • Jopp.. da geb ich dir recht..

    Aber wir sind schon auf die Idee gekommen eventuell Minigames zu machen..
    Oder kleine Speziallevels die man gegeneinander oder zusammen spieln kann..

    Und das wär dann schon möglich, glaub ich...
    Aber das lassen wir noch auf uns zukommen..

    MFG Schnacko

  • So Leute..

    Wir arbeiten mehr oder weniger fleißig an Flutch und haben auch schon win paar Ergebnisse..
    Ich kann euch noch nicht sagen wann das nächste Update kommt, aber wenn es kommt dann wird es richtig toll...

    Um euch einen Vorgeschmack zu geben stell ich hier mal ein Bild vom derzeitigen roten Flutch und vom derzeitigen grünen Flutch rauf.. ich hoffe er gefällt euch..

    MFG Schnacko & Team

  • Ganz nett :)
    Aber:
    -Der Sprung sollte realistischer aussehen (Schwerebeschleunigung (9.81 m/s^-2)) und auch nicht ewig hoch in die Luft gehen.
    -Die Figur sollte die Beine beim Stehen nicht bewegen.
    -Die Schatten bei der Figur sollten entgegen des lichts sein und nicht immer auf der Vorderseite der Figur

    und im Skript hatte ich einen include Fehler, den hab ich bei mir behoben.

  • danke für deine Bemerkungen..

    Der Sprung ist auch nur dazu da um manches auszuprobieren..
    Ich weiß noch nicht wie ich die Animation stoppe bzw. abspiele, da müsste ich die Animationgeschw. auf null stellen aber dan hat er irgendeine Pose... damit werde ich mich selbsteverständlich noch beschäftigen.
    Ich weiß nicht warum der Schattenfehler ist, den hab ich auch gewusst und am ersten Beitrag auch bekanntgegeben.

    MFG Schnacko

  • @ Name und Marsi..

    Also ich verwende Win7 32bit Version .. obs in der 64bit Version Probleme gibt weiß ich nicht..
    Selbstverständlich braucht man die Irrlicht-Engine und die MouseOnEvent.au3..
    sonnst wüst ich von keinen Fehlern..

    Bitte schreibt wenns funkt und was ihr gemacht habt..

    MFG Schnacko

  • Hab den Include Fehler beseitigt..

    Gibts sonst noch Rückmeldungen?

    MFG Schnacko

    Soviel zum Thema du. :P

    BtT: Ich finde die Entwicklung sehr interessant, war ja bei der Entstehung der Idee dabei und hätte nicht gedacht dass es wirklich soweit kommt.
    Wirklich Respekt an dich.

    MfG,
    H2112.

    Zitat

    [Heute, 11:39] Raupi: Soll ich es dir machen?
    [Heute, 11:47] BugFix: "Soll ich es dir machen? " - also Raupi !! bitte nicht so öffentlich :rofl:

    Zitat

    [Heute, 11:51] BugFix: und ich werde es mir jetzt machen - das Mittagessen :P

    AMsg UDF v1.00.00 IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 100%
    OwnStyle UDF Version 1.10.00 IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 100%

  • Ehrlich gesagt..

    Ich hätte ja auch nie gedacht dass wir es soweit schaffen ^^

    Aber wenn man will, kann man einiges!

    MFG Schnacko..

  • Hallo!
    Also ich habe mir das Script mal angeschaut - Du (oder Ihr) habt ein Problem mit der Animation? Ich habe einfach mal bei Zeile 179-187 was eingebaut - so könnte man das lösen. Besser geht das aber durch direktes ansteuern der Animationen mit '_IrrPlayNodeMD2Animation' - dafür müsst Ihr die Animationen aber auch Korrekt erstellen bzw. an die richtige Position setzten.

    Spoiler anzeigen
    [autoit]

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_UseX64=n
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

    [/autoit] [autoit][/autoit] [autoit]

    #include <au3Irrlicht2.au3>
    #include <Misc.au3>
    #include <File.au3>

    [/autoit] [autoit][/autoit] [autoit]

    opt("MustDeclareVars", True)
    HotKeySet("{ESC}", "_exit")

    [/autoit] [autoit][/autoit] [autoit]

    Global $degree = -180
    Global $degZ = 70

    [/autoit] [autoit][/autoit] [autoit]

    Global $MapMesh, $MapNode, $Camera, $Charakter, $CharakterNode, $MapTexture, $CharakterTexture, $selector, $outHitPosition, $outFalling
    Global $screen_width, $screen_height, $gravity[3], $velocity[3], $ellipsoidRadius[3],$pMouseEvent
    Global $aMousePos[2], $aPoint[3], $aDirect[3], $aCamPos[3], $aDirectCha[3], $DifV[3], $DivL, $aAlpha, $Light[5], $RotFaktor
    Global $Entfernung = 5, $i[5]

    [/autoit] [autoit][/autoit] [autoit]

    Global $dir = _PathFull( @ScriptDir & "\Meshes\md2\" ) ;

    [/autoit] [autoit][/autoit] [autoit]

    $screen_width = 800
    $screen_height = 600

    [/autoit] [autoit][/autoit] [autoit]

    _IrrStartAdvanced ( $IRR_EDT_OPENGL, @DesktopWidth, @DesktopHeight, $IRR_BITS_PER_PIXEL_32, _
    $IRR_Windowed, $IRR_SHADOWS, $IRR_CAPTURE_EVENTS, $IRR_VERTICAL_SYNC_OFF, _
    0, $IRR_ON, 2, $IRR_ON)

    [/autoit] [autoit][/autoit] [autoit]

    _IrrSetWindowCaption( "Flutch - Das neue Rollenspiel" )

    [/autoit] [autoit][/autoit] [autoit]

    $MapMesh = _IrrGetMesh( $dir & "map/map.obj" )
    $MapTexture = _IrrGetTexture( $dir & "map/map.png" )
    $MapNode = _IrrAddMeshToSceneAsOcttree( $MapMesh )
    _IrrSetNodeMaterialTexture( $MapNode, $MapTexture, 0 )
    _IrrSetNodeMaterialFlag( $MapNode, $IRR_EMF_GOURAUD_SHADING, $IRR_ON )
    _IrrSetNodeScale( $MapNode, 1, 0.5, 1 )

    [/autoit] [autoit][/autoit] [autoit]

    $Charakter = _IrrGetMesh( $dir & "flutch.md2" )
    $CharakterTexture = _IrrGetTexture( $dir & "flutch.bmp" )
    $CharakterNode = _IrrAddMeshToScene( $Charakter )
    _IrrSetNodeMaterialTexture( $CharakterNode, $CharakterTexture, 0 )
    _IrrSetNodeMaterialFlag( $CharakterNode, $IRR_EMF_GOURAUD_SHADING, $IRR_ON )
    _IrrSetNodeScale( $CharakterNode, 26/40, 26/40, 26/40 )
    _IrrSetNodeAnimationSpeed($CharakterNode, 120)

    [/autoit] [autoit][/autoit] [autoit]

    $selector = _IrrGetCollisionGroupFromComplexMesh( $MapMesh, $MapNode )
    _IrrAddLight( $IRR_NO_PARENT, 0, 500, 0, 255, 255, 200, 1)

    [/autoit] [autoit][/autoit] [autoit]

    $aPoint[0] = 0.0
    $aPoint[1] = 1500.0/40
    $aPoint[2] = 0.0

    [/autoit] [autoit][/autoit] [autoit]

    $gravity[0] = 0.0
    $gravity[1] = -0.2
    $gravity[2] = 0.0

    [/autoit] [autoit][/autoit] [autoit]

    $velocity[0] = 0.0
    $velocity[1] = 0.0
    $velocity[2] = 0.0

    [/autoit] [autoit][/autoit] [autoit]

    $aCamPos[0] = 1750.0
    $aCamPos[1] = 149.0
    $aCamPos[2] = 1369.0

    [/autoit] [autoit][/autoit] [autoit]

    $aDirectCha[0] = 0.0
    $aDirectCha[1] = 0.0
    $aDirectCha[2] = 0.0

    [/autoit] [autoit][/autoit] [autoit]

    $ellipsoidRadius[0] = 0.3
    $ellipsoidRadius[1] = 0.8
    $ellipsoidRadius[2] = 0.3

    [/autoit] [autoit][/autoit] [autoit]

    $Camera = _IrrAddCamera( $aCamPos[0], $aCamPos[1], $aCamPos[2], $aPoint[0], $aPoint[1], $aPoint[2] )
    _IrrSetNodePosition($CharakterNode, $aPoint[0], $aPoint[1], $aPoint[2])

    [/autoit] [autoit][/autoit] [autoit]

    _IrrHideMouse()
    MouseMove( @DesktopWidth/2, @DesktopHeight/2, 0 )
    $aMousePos[0] = 0.0
    $aMousePos[1] = 0.0

    [/autoit] [autoit][/autoit] [autoit]

    WHILE _IrrRunning()
    _IrrBeginScene( 255,255,0 )

    [/autoit] [autoit][/autoit] [autoit]

    _Direction_calc()

    [/autoit] [autoit][/autoit] [autoit]

    while _IrrMouseEventAvailable()
    $pMouseEvent = _IrrReadMouseEvent()
    if __getMouseEvt($pMouseEvent, $EVT_MOUSE_IACTION) = $IRR_EMIE_MOUSE_WHEEL then
    if (__getMouseEvt($pMouseEvent,$EVT_MOUSE_FDELTA) < 0 And $Entfernung < 12) Or _
    (__getMouseEvt($pMouseEvent,$EVT_MOUSE_FDELTA) > 0 And $Entfernung > 2) then
    $Entfernung -= __getMouseEvt($pMouseEvent, $EVT_MOUSE_FDELTA)/2
    endif
    endif
    wend

    [/autoit] [autoit][/autoit] [autoit]

    _IrrGetCollisionResultPosition ( _
    $selector, _
    $aPoint, _
    $ellipsoidRadius, _
    $velocity, _
    $gravity, _
    0.0005, _
    $aPoint, _
    $outHitPosition, _
    $outFalling )

    [/autoit] [autoit][/autoit] [autoit]

    _move()

    [/autoit] [autoit][/autoit] [autoit]

    _IrrSetCameraTarget( $Camera, $aPoint[0], $aPoint[1], $aPoint[2] )

    [/autoit] [autoit][/autoit] [autoit]

    _IrrDrawScene()

    [/autoit] [autoit][/autoit] [autoit]

    _IrrEndScene()
    WEND

    [/autoit] [autoit][/autoit] [autoit]

    Func _exit()
    _IrrStop()
    Exit
    EndFunc ; _exit

    [/autoit] [autoit][/autoit] [autoit]

    Func _Direction_calc()
    Local $pKeyEvent, $keyCode

    [/autoit] [autoit][/autoit] [autoit]

    $aMousePos = MouseGetPos()
    MouseMove( @DesktopWidth/2, @DesktopHeight/2, 0 )
    $aMousePos[0] -= @DesktopWidth/2
    $aMousePos[1] -= @DesktopHeight/2

    [/autoit] [autoit][/autoit] [autoit]

    Local $aDirectLength = ( $aDirect[0]^2 + $aDirect[2]^2 )^(1/2)
    Local $MoveSpeed = 0.07
    If $velocity[1] > 0 Then $velocity[1] -= 0.25

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    If $aMousePos[0] < 0 Then
    $degree -= $aMousePos[0]/15
    If $degree >= 180 Then $degree = -180
    ElseIf $aMousePos[0] > 0 Then
    $degree -= $aMousePos[0]/15
    If $degree <= -180 Then $degree = 180
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    If $aMousePos[1] < 0 Then
    If $degZ < 179 Then $degZ -= $aMousePos[1]/15
    ElseIf $aMousePos[1] > 0 Then
    If $degZ > 1 Then $degZ -= $aMousePos[1]/15
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $aDirect[0] = $aPoint[0] - $aCamPos[0]
    $aDirect[1] = $aPoint[1] - $aCamPos[1]
    $aDirect[2] = $aPoint[2] - $aCamPos[2]

    [/autoit] [autoit][/autoit] [autoit]

    $velocity[0] = 0.0
    $velocity[2] = 0.0

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("57") Then ; W drücken
    $velocity[0] = $aDirect[0]/$aDirectLength*$MoveSpeed
    $velocity[2] = $aDirect[2]/$aDirectLength*$MoveSpeed
    $RotFaktor = 180-$degree + 90
    ElseIf _IsPressed("53") Then ; S drücken
    $velocity[0] = -$aDirect[0]/$aDirectLength*$MoveSpeed
    $velocity[2] = -$aDirect[2]/$aDirectLength*$MoveSpeed
    $RotFaktor = 180-$degree - 90
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("41") Then ; A drücken
    $velocity[0] = -$aDirect[2]/$aDirectLength*$MoveSpeed
    $velocity[2] = $aDirect[0]/$aDirectLength*$MoveSpeed
    $RotFaktor = 180-$degree
    ElseIf _IsPressed("44") Then ; D drücken
    $velocity[0] = $aDirect[2]/$aDirectLength*$MoveSpeed
    $velocity[2] = -$aDirect[0]/$aDirectLength*$MoveSpeed
    $RotFaktor = 180-$degree + 180
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("20") Then ; Leer drücken (springen)
    $velocity[1] = 1
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    If not _IsPressed("57") and not _IsPressed("53") and not _IsPressed("41") and not _IsPressed("44") Then
    ; Nicht bewegen
    ;~ _IrrPlayNodeMD2Animation($CharakterNode, $IRR_EMAT_STAND)
    _IrrSetNodeAnimationSpeed($CharakterNode, 0)
    Else
    ; Bewegen
    ;~ _IrrPlayNodeMD2Animation($CharakterNode, $IRR_EMAT_RUN)
    _IrrSetNodeAnimationSpeed($CharakterNode, 120)
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    ;~ while _IrrKeyEventAvailable()

    [/autoit] [autoit][/autoit] [autoit]

    ;~ $pKeyEvent = _IrrReadKeyEvent()
    ;~ $keyCode = __getKeyEvt($pKeyEvent, $EVT_KEY_IKEY)

    [/autoit] [autoit][/autoit] [autoit]

    ;~ Switch $keyCode
    ;~ case $KEY_KEY_W ; "W" drücken
    ;~ $velocity[0] += $aDirect[0]/$aDirectLength*$MoveSpeed
    ;~ $velocity[2] += $aDirect[2]/$aDirectLength*$MoveSpeed
    ;~ $RotFaktor = 180-$degree + 90

    [/autoit] [autoit][/autoit] [autoit]

    ;~ case $KEY_KEY_D ; "D" drücken
    ;~ $velocity[0] += $aDirect[2]/$aDirectLength*$MoveSpeed
    ;~ $velocity[2] += -$aDirect[0]/$aDirectLength*$MoveSpeed
    ;~ $RotFaktor = 180-$degree + 180

    [/autoit] [autoit][/autoit] [autoit]

    ;~ case $KEY_KEY_A ; "A" drücken
    ;~ $velocity[0] += -$aDirect[2]/$aDirectLength*$MoveSpeed
    ;~ $velocity[2] += $aDirect[0]/$aDirectLength*$MoveSpeed
    ;~ $RotFaktor = 180-$degree

    [/autoit] [autoit][/autoit] [autoit]

    ;~ case $KEY_KEY_S ; "S" drücken
    ;~ $velocity[0] += -$aDirect[0]/$aDirectLength*$MoveSpeed
    ;~ $velocity[2] += -$aDirect[2]/$aDirectLength*$MoveSpeed
    ;~ $RotFaktor = 180-$degree - 90
    ;~ EndSwitch
    ;~ wend

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _move()
    Local Const $pi = 3.14159265358979323846264338327950288419716939937510582097
    Local Const $deg2rad = $pi/180
    Local $rad = $degree * $deg2rad
    $aCamPos[0] = $Entfernung * Sin($degZ * $deg2rad) * Cos($rad) + $aPoint[0]
    $aCamPos[2] = $Entfernung * Sin($degZ * $deg2rad) * Sin($rad) + $aPoint[2]
    $aCamPos[1] = $Entfernung * Cos($degZ * $deg2rad) + $aPoint[1]

    [/autoit] [autoit][/autoit] [autoit]

    _IrrSetNodePosition($Camera, $aCamPos[0], $aCamPos[1], $aCamPos[2])
    _IrrSetNodePosition($CharakterNode, $aPoint[0], $aPoint[1], $aPoint[2])
    _IrrSetNodeRotation($CharakterNode, 0, $RotFaktor, 0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit]

    Grüsse!

  • Danke Techmix..

    Wenns nur so einfach wäre ... Bin grad bei dem Problem..
    Wenn man _IrrPlayNodeMD2Animation($CharakterNode, $IRR_EMAT_RUN) schreibt fängt er immer wieder von forne mit der Rotation an. Ich hab bereits die Animation so gemacht, dass das stimmt.. aber ich müsste machen, dass er nur alle sechs der $IRR_EMAT_RUN durchgelaufen ist, dass er dann wieder ..
    Ahh.. da fällt mir gerade was ein ^^

    MFG Schnacko

  • So funkts schon fast perfekt:

    [autoit]

    If not _IsPressed("57") and not _IsPressed("53") and not _IsPressed("41") and not _IsPressed("44") and $Ani <> "STAND" Then
    ; Nicht bewegen
    _IrrPlayNodeMD2Animation( $CharakterNode, $IRR_EMAT_STAND )
    _IrrSetNodeAnimationSpeed($CharakterNode, 1/20000)
    $Ani = "STAND"
    ElseIf $Ani <> "RUN" Then
    ; Bewegen
    _IrrPlayNodeMD2Animation( $CharakterNode, $IRR_EMAT_RUN )
    $Ani = "RUN"
    EndIf

    [/autoit]


    Nur beim Stehen da spielt er nicht die "STAND" ab sonder macht die "RUN" und beginnt sie jedes mal..
    Also zittert er .. hmm wo ist der Fehler?

    MFG Schnacko