Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




BitBit Help


first off, what is Bit Bit, and how do you use it, can someone give me a good place to learn it from, tutorials or something, thanks in advance




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Help With BitBit
Hello,

I am new to the gaming scene. I have picked up a little here and though however. I was wonder how to determine the size of the map window? Uhh...How to make it Show more of the map? The example I am looking at only has a small block, but I want to increase it to view more map at a time. Any suggestions on where to start?

Bitbit Help
hey i am making a character moving using bitblt to bit the character into a picture box
how to i make it so when i move the picture it will not leave the previous picture behind. so it will look like that character is moving.
thanks

Working With BitBit
Hi,

I've just began using BitBit now, so i'm not too good, i'm progressing slightly, but have a small problem...

Anyway, i've began making a square grid based maze game to get used to the functions of BitBit and cant seem to get something right, the game currently in no way resembles a maze, because I haven't started that bit yet...

To move the sprite properly, on a square-based grid i have set up an intXNow value to work with the intX, so that the character only moves so far at a time, by presetting intX to 10, then everytime you press to move, intXNow updates itself to equal intX, then runs the movement part on a timer...


Code:
Do Until intX >= intXNow + 50

-- movement code --

Loop

This works fine, but when you run it the first time he moves, he does four steps, the next time he does 5 steps, so he is no longer in the center of the x-axis grid...

I'm not sure what I have done wrong with this code.

Can somebody please look at my source code and tell me what i have done wrong to cause this uneven movement.

The source is in the zip below...

Your Help Is Greatly Appreciated.

Just Cant Understand BitBit!
Ok, ive tryed to understand this stuff for about 4 hours by now. And i just dont GET IT! I get NO ERRORS at all, but NOTHING HAPPENS either. So i wondered if anyone would post a newbie BitBit program for me.

thx

BitBit Error
When i try to initialize BitBit i get this error:
Help????

BitBit With MSChart
Can you use BitBit to make a realtime MSChart Graph not flicker? I've looked through some of the threads here and they seem to mainly use pictureboxes for gaming. Is the principle the same, if so how would i implemet it?

Thanks

Sean

DLLImport - GDI32.dll - BitBit -
hi,
the Issue is ,

I would like to crop part of image. (I know the rectangle to be cropped from the tiff image). I tried DrawImage. But some Pixel Information is lost.

So I am trying to use BitBit approach.

My Code is ::::::

---------------Declaration - ----------------------

<DllImport("gdi32.dll", EntryPoint:="BitBlt", SetLastError:=True, _
CharSet:=CharSet.Unicode, ExactSpelling:=True, _
CallingConvention:=CallingConvention.StdCall)> _
Public Shared Function BitBlt( _
ByVal hdcDest As IntPtr, _
ByVal nXDest As Integer, _
ByVal nYDest As Integer, _
ByVal nWidth As Integer, _
ByVal nHeight As Integer, _
ByVal hdcSrc As IntPtr, _
ByVal nXSrc As Integer, _
ByVal nYSrc As Integer, _
ByVal dwRop As Int32)
End Function
Private Const SRCCOPY = &HCC0020 ' (DWORD) dest = source
-----------------------

My function for cropping is
----------------------------
Dim g1 As Graphics = PictureBox1.CreateGraphics()
Dim imgCrop As New Bitmap(200, 200)
Dim g2 As Graphics = Graphics.FromImage(imgCrop)
Dim dc1 As IntPtr = g1.GetHdc()
Dim dc2 As IntPtr = g2.GetHdc()
BitBlt(dc2, 0, 0, 200, 200, dc1, 100, 200, SRCCOPY)
g1.ReleaseHdc(dc1)
g2.ReleaseHdc(dc2)
imgCrop.Save("c:Captured.jpg", ImageFormat.Jpeg)
MsgBox("Finished Saving Image")

------------
Error Msg :::

Unhandled Exception
PInvoke restriction: cannot return variants.


Anyone has idea about where I am doing wrong. Or any better approach for this

Transparency, BitBit() And Number Sorting
1. Transparency
Will a gif with a transparent background still have a transparent background on a form? If not then how can i get transparent backgrounds?

2. BitBit()
Unless it is very complicated and hard to explain could you show how to use BitBit() for animation?

3. number sorting
i have this code:

VB Code:
Dim dblAns As String Dim intDig As IntegerDim dbl As StringdblAns = "2856457889" For intNum = 1 To Len(dblAns)      intDig = Mid(dblAns, intNum, 1)                If (intDig Mod 2) = 0 Then          If Len(dbl) Then               dbl = dbl & ", " & Format(intDig)          Else               dbl = Format(intDig)          End If     Else           dbl = dbl & Format(intDig)     End IfNext intNum MsgBox "The numbers are:" & dbl

it splits the number 2856457889 into 2, 85, 6, 457, 8, 89
even numbers start a new number
rather than putting the split numbers into a string and displaying it in a msgbox i want it to load a new txtbox eg. txtNum fo each number.

thnx 4 help and i hope this post is more successful than last time

Make Bitmap Transparent With BitBit
Hi all -
Lets say I have a bitmap with a region that has been marked with a certain color to detone a transparent area - how could I go about BitBit'ing on top of another picture in VB so that the solid color becomes transparent? THanks
-Chris

Hmmm....bitbit Seems Easier Than Trying To Do Maps With An Editor?
Hello again,

I got my map working with bitbit, but the things are super small. I can barely see em hehe, anyone got a site that will show the break down of bitbit that what represents what? I had to just play with some and just do a row of numbers and see what I came out with. The last question is, to increase the actual size my bits display at do I need to increase the pixel size?

Thx for any help.

Questions: BitBit Moving, Walkmasks And Item Pickups.
Ok, so far have i quickly created a small program where a picture(the guy you control) moves instantly to the location of your click. Theres 3 things i must now:
1. How can i make my guy move slowly to the targeted location? not instantly.

2.How can i create walkmasks? Forexample if i create a tree, and i dont want my guy to walk right through the tree but around it.

3.How can i make my character pick up items? Forexample how can i make my guy get 10 score-points when he moves over an item, which in reality is a picture.

Edit*
I use BitBit.
This is not going to be a real game, iam just testing things out before i start creating a game.
Nothing is animated.

Copyright © 2005-08 www.BigResource.com, All rights reserved