Thanks alot everyone! I''ve decided to drop software support. If they don''t have a 3d graphics card, that''s their problem! Actually, I might implement a nice and simple 2d D2D system. The idea is that: a) you have a 3d graphics card. This Is Good. Use d3d. Have wonderfull graphics. b) you don''t have a card. This Is Bad. Go buy one. The graphics are bearable, but without the great effects. Is this a good idea? and if so, how should I implement this. I am thinking along the lines of a virtual base class. Is this a good idea?
To Bracket or Zombie, but anyone who can help actually.
I know its a long post but it has all the code sample specific to my question.
I pulled down the source for vb you made, compared it against my own and found that I had forgotten to But the D3DDEVICE option on the back buffer. :/ anyways with that fixed all worked well. Now i have a new question concerning this code
I made it so that by placing the mouse over the far left and right edges of the form it will change directions for the scrolling.
I added the ability to scroll up and down but this is making the screen jump alot.. I can tell its working but its not clean like the left to right motion.
here is a snipet from the code that checks the direction:
Select Case Direction Case Is = 0 ScrollXOffset = ScrollXOffset - 1 If (ScrollXOffset < 1) Then ScrollX = ScrollX + 1 ScrollXOffset = 127 If (ScrollX > 20) Then Direction = 1 End If Case Is = 1 ScrollXOffset = ScrollXOffset + 1 If (ScrollXOffset > 127) Then ScrollX = ScrollX - 1 ScrollXOffset = 0 If (ScrollX < 1) Then Direction = 0 End If Case Is = 2 '' up ScrollYOffset = ScrollYOffset + 1 If (ScrollYOffset > 127) Then ScrollY = ScrollY - 1 ScrollYOffset = 0 If (ScrollY < 1) Then Direction = 3 End If Case Is = 3 ''down ScrollYOffset = ScrollYOffset - 1 If (ScrollYOffset < 1) Then ScrollY = ScrollY + 1 ScrollYOffset = 127 If (ScrollY > 20) Then Direction = 3 End If End Select
Sub RenderVertex(WorldX As Integer, WorldY As Integer, OffsetX As Integer, OffsetY As Integer) Dim ScreenX As Integer Dim ScreenY As Integer Dim WhereX As Integer Dim WhereY As Integer
Sub MakeDemoMap() Dim X As Integer, Y As Integer Dim DeltaX As Integer '' Multiplier Dim Value As Integer '''' Used to calculate height Dim color As Long '' Used to calculate vertex shading Dim Percentage As Integer Dim testHeight As Integer ''Value = 100 For Y = 2 To 126
For X = 2 To 126
DeltaX = 1 - (Y Mod 2) '''' 1 for even, 0 for odd ''Value = Int((Rnd * 128) + 1) ''the bigger random value, the sharper ground. Value = 10 ''If x = 21 Then Value = 10 '' I want a flat walkway! If Y < 10 Then Value = 128
''Percentage = Value * 200 ''the bigger number, the better lighting Percentage = Value * 15 color = RGB(Percentage, Percentage, Percentage)
'' This tile''s west most vertex Map(X, Y).VertexHeight(0) = Value Map(X, Y).VertexColor(0) = color Map(X, Y).h = testHeight '' SW tile''s northern vertex Map(X - DeltaX, Y + 1).VertexHeight(1) = Value Map(X - DeltaX, Y + 1).VertexColor(1) = color
'' NW tile''s southern vertex Map(X - DeltaX, Y - 1).VertexHeight(2) = Value Map(X - DeltaX, Y - 1).VertexColor(2) = color
'' West Tile''s East most vertex Map(X - 1, Y).VertexHeight(3) = Value Map(X - 1, Y).VertexColor(3) = color