Search:

Type: Posts; User: joaquim

Page 1 of 13 1 2 3 4

Search: Search took 0.07 seconds; generated 46 minute(s) ago.

  1. Replies
    16
    Views
    4,769

    Re: VB6 - raycasting: how get the image line?

    i found the math problems here:

    'Check for horizontal intersections:
    If RayRadians >= 0 And RayRadians <= Math.PI Then 'Facing down
    HorizY =...
  2. Replies
    16
    Views
    4,769

    Re: VB6 - raycasting: how get the image line?

    i use Trignometry instead pixel a pixel ;) less calculations ;) unless my code is wrong lol

    Private Sub DrawRays()

    Dim StepX As Double
    Dim StepY As Double
    Dim VertX As...
  3. Replies
    16
    Views
    4,769

    Re: VB6 - raycasting: how get the image line?

    what is much more crazy!?!
    is that i created a dll on VB6 and i'm using it on VB2010.... on VB6 these don't happens, but only on VB2010 lol
  4. Replies
    16
    Views
    4,769

    Re: VB6 - raycasting: how get the image line?

    and more printed:

    PosX2: 39 Pos2Y: 31
    PosX2: 39 Pos2Y: 31
    PosX2: 39 Pos2Y: 31
    PosX2: 39 Pos2Y: 31
    PosX2: 39 Pos2Y: 31
    PosX2: 39 Pos2Y: 31
    PosX2: 39 Pos2Y: 31
    PosX2: 39 Pos2Y: 31
  5. Replies
    16
    Views
    4,769

    Re: VB6 - raycasting: how get the image line?

    from what you said, i did these print:

    Wall Height: 1231,6805742712 OffSetGrid: 7
    Wall Height: 1222,38967241935 OffSetGrid: 7
    Wall Height: 1213,13354863251 OffSetGrid: 7
    Wall Height:...
  6. Replies
    16
    Views
    4,769

    Re: VB6 - raycasting: how get the image line?

    endeed lol
    but why, on basic, that happens?
  7. Replies
    16
    Views
    4,769

    Re: VB6 - raycasting: how get the image line?

    what i only know is:

    OffSetGrid = HorizX - (Int(HorizX / ObjectSize) * ObjectSize)
    give me the X object vertical line.... is for texture.... but if OffSetGrid is the object width, these bug...
  8. Replies
    16
    Views
    4,769

    Re: VB6 - raycasting: how get the image line?

    heres another print: https://imgur.com/iCCH5zy
    you see a different color on same vertical(or even horizontal) walls... it happens on object size
  9. VS 2010 Re: VB2010 - why i don't move with the right radian?

    finally fixed:


    Function GetPositionMap(ByVal valor As Double) As Integer
    If valor < 0 Then
    GetPositionMap = 0
    ElseIf valor > MapWidth Then
    ...
  10. VS 2010 Re: VB2010 - why i don't move with the right radian?

    i say what i know..... but sorry...
    i have more errors, but now works:

    Private Sub Form1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
    Const Speed...
  11. VS 2010 VB2010 - why i don't move with the right radian?

    why i don't move on right radian?


    Dim playerposx As Double = 34.0
    Dim playerposy As Double = 34.0
    Dim playerradians As Double = 0.0

    Private Sub Form1_KeyDown(sender As Object, e As...
  12. Replies
    6
    Views
    1,318

    Re: how optimizate the programming?

    why the programming books(or general programming books) don't speak about optimization code?
  13. Replies
    6
    Views
    1,318

    Re: how optimizate the programming?

    i have 1 sub for change the brush\pen.... i must change the brush\pen, but i used an if for test if is the same, of previous, so i can win so much speed ;)
  14. Replies
    6
    Views
    1,318

    how optimizate the programming?

    i don't choose any programming language, because these question is for all programming languages...
    everyone can create their own algorithm, but some can be slow and others can be faster...
    ok......
  15. Replies
    14
    Views
    685

    Re: how clear a HDC\HBitmap?

    thank you so much for all to all
  16. Replies
    14
    Views
    685

    Re: how clear a HDC\HBitmap?

    before i 'close' these topic, please tell me, using an API memory function, how fill bDib() array with a color?
    i tried before, but always with a memory leak :(
  17. Replies
    14
    Views
    685

    Re: how clear a HDC\HBitmap?

    finally i fix it with speed.. i need learn much more about optimization code...

    Public Sub FillColor(color As Long)
    'if the color\brush is the same, we don't need rechange it
    If...
  18. Replies
    14
    Views
    685

    Re: how clear a HDC\HBitmap?

    tested.. the ExtFloodFill () API function is dependent of the brush color\style:

    Public Sub Fillcolor(Color As Long)
    If (OldBrush <> 0) Then
    SelectObject MemoryHDC, OldBrush
    ...
  19. Replies
    14
    Views
    685

    Re: how clear a HDC\HBitmap?

    almost done... the best was with ExtFloodFill() API function:



    Private Const FLOODFILLSURFACE = 1
    Private Const FLOODFILLBORDER = 0
    Private Declare Function ExtFloodFill Lib "gdi32" (ByVal...
  20. Replies
    14
    Views
    685

    Re: how clear a HDC\HBitmap?

    is there another method more faster?
  21. Replies
    14
    Views
    685

    [RESOLVED] how clear a HDC\HBitmap?

    i create a HBitmap using DIB's:

    Public Function NewImage(ByVal ImageWidth As Long, ByVal ImageHeight As Long, Optional color As Long = vbWhite) As Long
    If (Width > 0 Or Height > 0 Or hBitmap...
  22. Replies
    7
    Views
    846

    VS 2010 Re: VB2010: how get more timer precision?

    but only for:
    - clear bitmap;
    - draw 2 circles;
    - and draw it on form...
    if i use more, i will get less FPS.. that's the point ;)
  23. VS 2010 vb2010 - how add a VB6 dll on VB2010 project?

    i created a dll on VB6... i added using Referencies on Vb2010...
    when i did:

    Imports pjtImage
    Public Class Form1
    Dim s As New pjtImage.clsImage

    Private Sub Form1_Load(sender As...
  24. VS 2010 Re: [RESOLVED] VB2010 - how convert a control to a control array?

    endeed
  25. VS 2010 Re: vb2010 - how calculate the hit direction?

    now it's fixed.. thanks:

    Public Class Form1

    Structure Vector
    Public Sub New(ByVal PosX As Integer, ByVal PosY As Integer)
    X = PosX
    Y = PosY
    End...
  26. VS 2010 Re: vb2010 - how calculate the hit direction?

    i did these code:

    Public Class Form1

    Structure Vector
    Public Sub New(ByVal PosX As Integer, ByVal PosY As Integer)
    X = PosX
    Y = PosY
    End Sub
  27. VS 2010 Re: VB2010 - how convert a control to a control array?

    was hard, to me, understand the "....then open the Properties window, click the Events button and then double-click the event of interest...."
    but now i can do it.. thanks for all
  28. VS 2010 Re: VB2010 - how convert a control to a control array?

    thank you so much for all.. thank you
    PS: i'm sorry not Rate some people, but the forum rules don't let me :(
    heres the sample(just 4 buttons on form):

    Public Class Form1

    Private Sub...
  29. VS 2010 Re: vb2010 - how calculate the hit direction?

    i'm sorry my English... but yes... is what i mean
  30. VS 2010 [RESOLVED] vb2010 - how calculate the hit direction?

    imagine a ball(direction is 45ยบ... we can x=x+cos(45) and y=y+sin(45)... but yes the computer use Radians and not Degrees) hit the form limit... how can i calculate the next direction?
  31. VS 2010 [RESOLVED] VB2010 - how convert a control to a control array?

    on design form, how can i convert a control to a control array?
    can i see what control was clicked?
  32. Replies
    8
    Views
    563

    VS 2010 Re: VB2010 - how create a Game Loop?

    understood.. thanks for all
  33. Replies
    8
    Views
    563

    VS 2010 Re: VB2010 - how create a Game Loop?

    the VB2010 'message' type don't have the const members?
    thanks for all.. thank you
  34. Replies
    8
    Views
    563

    VS 2010 Re: VB2010 - how create a Game Loop?

    you said: "You can override the WndProc method if you want a more traditional Windows message pump approach."
    can you share a sample with(just) calling the game draw?
  35. Replies
    8
    Views
    563

    VS 2010 Re: VB2010 - how create a Game Loop?

    i'm sorry, but can you share a sample?
  36. Replies
    8
    Views
    563

    VS 2010 VB2010 - how create a Game Loop?

    how can i create a game loop(without libraries)?
    1 - the VB2010 don't have a normal message loop, like C\C++.... so we can use the events and timers for control the objects and update the...
  37. Replies
    7
    Views
    846

    VS 2010 Re: VB2010: how get more timer precision?

    now i can get much more precision:

    Imports System.Runtime.InteropServices


    Public Class clsTimer
    Private timerID As Integer
    Private timerInterval As Integer
    Private...
  38. Replies
    7
    Views
    846

    VS 2010 VB2010: how get more timer precision?

    the VS2010 timer class, give me 60FPS...
    using timeSetEvent() API, i get 250FPS
    (both timers with 10 milliseconds):


    Imports System.Runtime.InteropServices


    Public Class clsTimer
    ...
  39. Re: vb2010: why i get the 'NullReferenceException'?

    thank you so much for correct me...
    i need ask: getting 60FPS on VB2010 is normal(thinking on these way.. even if is technicall(i don't know if is))?
  40. Re: vb2010: why i get the 'NullReferenceException'?

    on my head is like think: more FPS is more accurate than less FPS
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width