Search:
Type: Posts; User: joaquim
Search:
Search took 0.13 seconds; generated 43 minute(s) ago.
-
i found the math problems here:
'Check for horizontal intersections:
If RayRadians >= 0 And RayRadians <= Math.PI Then 'Facing down
HorizY =...
-
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...
-
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
-
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
-
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:...
-
endeed lol
but why, on basic, that happens?
-
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...
-
heres another print: https://imgur.com/iCCH5zy
you see a different color on same vertical(or even horizontal) walls... it happens on object size
-
finally fixed:
Function GetPositionMap(ByVal valor As Double) As Integer
If valor < 0 Then
GetPositionMap = 0
ElseIf valor > MapWidth Then
...
-
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...
-
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...
-
why the programming books(or general programming books) don't speak about optimization code?
-
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 ;)
-
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......
-
thank you so much for all to all
-
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 :(
-
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...
-
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
...
-
almost done... the best was with ExtFloodFill() API function:
Private Const FLOODFILLSURFACE = 1
Private Const FLOODFILLBORDER = 0
Private Declare Function ExtFloodFill Lib "gdi32" (ByVal...
-
is there another method more faster?
-
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...
-
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 ;)
-
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...
-
-
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...
-
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
-
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
-
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...
-
i'm sorry my English... but yes... is what i mean
-
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?
-
on design form, how can i convert a control to a control array?
can i see what control was clicked?
-
understood.. thanks for all
-
the VB2010 'message' type don't have the const members?
thanks for all.. thank you
-
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?
-
i'm sorry, but can you share a sample?
-
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...
-
now i can get much more precision:
Imports System.Runtime.InteropServices
Public Class clsTimer
Private timerID As Integer
Private timerInterval As Integer
Private...
-
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
...
-
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))?
-
on my head is like think: more FPS is more accurate than less FPS
|
Click Here to Expand Forum to Full Width
|