Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Lavos

Members
  • Posts

    867
  • Joined

  • Last visited

Posts posted by Lavos

  1. In my result of lack of knowledge with math i have no idea how to fix this please help me out T_T

    ```

    Public Sub Build_Tile(ByVal Texture As String)

    Dim VA(0 To 7) As NEMO_VERTEX

    Dim i As Long

    Set Mesh = New cNemo_Mesh

    With VA(0)

    .X = 0

    .Y = 0

    .z = 0

    .tu = 0

    .tv = 0

    End With

    With VA(1)

    .X = .X + 32

    .Y = VA(0).Y

    .z = .z + 32

    .tu = 0 + 32 + 1

    .tv = VA(0).tv

    End With

    With VA(2)

    .X = VA(0).X

    .Y = .X + 32

    .z = VA(0).z

    .tu = VA(0).tu

    .tv = 0 + 32 + 1

    End With

    With VA(3)

    .X = VA(1).X

    .Y = VA(2).Y

    .z = VA(3).z

    .tu = VA(1).tu

    .tv = VA(2).tv

    End With

    With VA(4)

    .X = 32

    .Y = 32

    .z = 32

    .tu = 0

    .tv = 0

    End With

    With VA(5)

    .X = .X - 32

    .Y = VA(0).Y

    .z = .z - 32

    .tu = 0 - 32 - 1

    .tv = VA(0).tv

    End With

    With VA(6)

    .X = VA(0).X

    .Y = .X - 32

    .z = VA(0).z

    .tu = VA(0).tu

    .tv = 0 - 32 - 1

    End With

    With VA(3)

    .X = VA(5).X

    .Y = VA(6).Y

    .z = VA(7).z

    .tu = VA(5).tu

    .tv = VA(6).tv

    End With

    With Mesh

    .Add_Texture Texture

    For i = 0 To 7

    .Add_NemoVertex VA(i), 0

    Next

    .Set_CullMode D3DCULL_NONE

    .BuildMesh

    End With

    End Sub

    ```

    Draws everything wrong…

    ![](http://i.imgur.com/PHzTwpB.png)

    if you need more information on definitions let me know, ill post it n_n
  2. This is how i currently have it set up.

    ```

    Public TileGird as D3DVERTEX

    ```

    On the sub routine:

    ```

    Public Sub Build_TileGrid(ByVal x As Long, ByVal y As Long, ByVal z As Long)

    Dim i As Long

    Dim j As Long

    'we generate a grid with a random hight level for

    'each control point

    For i = -1 To 1

    For j = -1 To 1

    TileGrid(i + 1, j + 1).x = (i) * 1000

    TileGrid(i + 1, j + 1).y = (i) * 1000

    TileGrid(i + 1, j + 1).z = (j) * 1000

    TileGrid(i + 1, j + 1).tu = (i + 1) / 2

    TileGrid(i + 1, j + 1).tv = (j + 1) / 2

    Next j

    Next i

    End Sub

    ```

    Now I'm stuck at what step i need to do to draw everything. Can anyone help me create a formula?
  3. [VISUAL Basic 6]

    I'm trying to make a routine for a vertex array so i may draw 3d grid on a from using:

    ```

    DrawPrimitive, D3DPT_LINELIST, 0, mapsize / 2

    ```

    and the mapsize in parameter in the data. Can anyone point me to the right direction on create a vertex array to draw a grid?

    this is how i have it setup for now, i want it to be a tile grid with multiple polygons.

    Rendered Normal:

    [attachment=771:test1.png]

    Rendered Wireframe:

    [attachment=772:test2.png]

    I need it to look like this with the floor:

    [attachment=773:test3.png]
  4. Okay I did my code like so:

    ```

    Public WIREMODE As Boolean

    ```

    ```

    Public Function Init_Render_States()

    WIREMODE = Not WIREMODE

    'Setup render states

    With Nemo

    .Set_EngineCullMode D3DCULL_NONE

    .Set_EngineRenderState D3DRS_SRCBLEND, D3DBLEND_SRCALPHA

    .Set_EngineRenderState D3DRS_LIGHTING, True

    .Set_EngineRenderState D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA

    .Set_EngineRenderState D3DRS_ALPHABLENDENABLE, False

    If WIREMODE Then

    .Set_EngineRenderState D3DRS_FILLMODE, D3DFILL_WIREFRAME

    Else

    .Set_EngineRenderState D3DRS_FILLMODE, D3DFILL_SOLID

    End If

    .Set_EngineRenderState D3DRS_ZENABLE, False

    .Set_EngineRenderState D3DRS_ZWRITEENABLE, False

    .Set_EngineRenderState D3DRS_POINTSPRITE_ENABLE, 1

    .Set_EngineRenderState D3DRS_POINTSCALE_ENABLE, 0

    .Set_EngineAlphaBlendingOp D3DBLENDOP_ADD

    .Set_EngineSpecularEnable False

    End With

    End Function

    ```

    Under frmMapEditor i have this:

    ```

    Private Sub chkWireMode_Click()

    If chkWireMode.value Then

    WIREMODE = True

    Else

    WIREMODE = False

    End If

    End Sub

    ```

    With the check box on the form, i wanted to toggle renderstates using the chkbox, but it doesn't seem to update, I thought maybe adding:

    ```

    If WIREMODE Then

    .Set_EngineRenderState D3DRS_FILLMODE, D3DFILL_WIREFRAME

    Else

    .Set_EngineRenderState D3DRS_FILLMODE, D3DFILL_SOLID

    End If

    ```

    into the gameloop might work, but it froze and crashed the compiler. Any ideas on how to get around this?
  5. One of the best 3rd Party tools highly recommended for VB6 is "[Code Smart](http://www.axtools.com/products-codesmart-vb6.php)", then there is also this for an alternative: [Link](http://www.mztools.com/index.aspx)
  6. Okay I have been studying many methods to create a string array for cache files and I've seen many methods, It blew my mind all week. I just need to know which method would be better in a system.

    Method Referenced by eclipse:

    ```

    Public Tex_Floors() as string

    Public Count_Floor() as long

    Count_Floor = 1

    Do While FileExist(App.Path & PATH_FLOORS & Count_Floor & GFX_EXT, True)

    ReDim Preserve Tex_Floors(0 To Count_Floor) As String

    Tex_Floors(Count_Floor) = App.Path & PATH_FLOORS & Count_Floor & GFX_EXT

    Count_Floor = Count_Floor + 1

    Loop

    Count_Floor = Count_Floor - 1
    ```

    V.S.

    Referenced by google researches

    ```

    Public Tex_Floors(Floor_Count) as string

    Dim i as long

    For i = 1 To UBound(Tex_Floors)

    Tex_Floors(i) = App.Path & PATH_FLOORS & i & GFX_EXT

    Next
    ```

    Both blocks work fine, please be detailed on why you pick your answer, there is got to be a good reason in your theory or fact.

    Thank you.
  7. Okay for a few month of learning and building this engine, I've been stuck with a direction on which path I should take, Graphics Wise.

    Here are some screenshots any feedback from the community would help. Thank you.

    Overhead view:

    ![](http://i6.photobucket.com/albums/y226/Hazama_Masame/screenshot2_zps7a7b05fc.png)

    MidPoint 3rd Person:

    ![](http://i6.photobucket.com/albums/y226/Hazama_Masame/screenshot1-3_zpsa732cbd5.png)

    dont mind the player sprite not being centered, I fix that later XD

    My inspirations:

    Xenogears

    [http://www.youtube.com/watch?v=6vJ0um5HL88](http://www.youtube.com/watch?v=6vJ0um5HL88)

    Breath of fire 4

    [http://www.youtube.com/watch?v=zQAwCcyKH9c](http://www.youtube.com/watch?v=zQAwCcyKH9c)
  8. Christ, I spent the whole night trying to figure this out. For some reason vb6 doesn't like it when i create more buffers on a separate form or picturebox. I tried linking them to another picturebox though im having the problem of this code.

    ```
    DD_Clip.SetHWnd frmMain.picScreen.hWnd
    ```
    Its not allowing me to create a duplicate.

    Best bet is to just to just use bltfast, render the whole Menu with collision and get rid of frmMenu.

    but thats just too much to do. =(
  9. seriously? alright you know what, this is going to need a InMenu Boolean and a bunch of other stuff you need to declare and set it up on the gameloop above InGame.

    Create a sub routine for rendering that would replace NewCharacterBltSprite.and finally flip and render everything to frmMenu

    Have this below the routine after setting up a rect for the sprite:

    ```
    DX7.GetWindowRect frmMenu.picCreate.hwnd, dRECT

    DDS_Primary.Blt dRECT, DDS_BackBuffer, sRECT, DDBLT_WAIT
    ```

    This is just an idea on how it will work. Hence letting it be brief.

    I'm going to get started on this now so I could post a better idea on gettting this to work.
  10. You probably relocated the source directory where vb6 picks off modules. Just be sure to check if it exist o the same directory where everything else is. Set the destination that missing module or add it to your project box.
  11. > If you sit on your left hand until it has pins and needles, and whack off it's supposed to feel like someone else is doing it, or so I've heard…
    >
    > ![:ph34r:](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/ph34r.png)

    You're missing the picture here. I suggest using ^^^^^^^^^^^^^^^^^^^^^^^^^ ![:hitler:](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/hitler.gif)
×
×
  • Create New...