Hello Everyone,
I am creating the maze game in vb.net
I found the way of creating the maze game is easy way.
But now I want this to access the auto updates. - Fine I can do this.
Now the

problem is:

How can I set the levels?
I think I should create Dll File for each level.
so whenever I update the level.dll and the user will be downloaded with it and he want to appear all level in game.
**Is this Possible? **

I am thinking of, I dont want the user to download the full program (game) again and again...

I am just thinking to create this as I get this can be done and the way then all I will post my coding here.

Check This
in this link the levels are in a method.

hmmm,
I vote your Game and I played it when you upload it too.
But my question is i want to create new levels but the way is different/.

On the main form i add many others form responding to that level almost 10-14 level, I added. but this is not my problem.

My problem is: now I am just adding much more levels (each level have its own form) Now when i done, then I will upload to my site, then the user who have downloaded the game will get the notification to download the new level.

I dont want the user to update the full program,
I want to create dll files for each level.
example: levelxxxx1.dll, levlxxxx2.dll, etc...
and i want my main form to run the level with this dll files.

This will also make my exe launcher (small size) and the second thing is that the program will not allow him to download the latest level unless he complete the Levels.

I find this interesting, hope it help. Click Here

(This isn't an answer, just reminising) I remember when I used to make oooooold games like packman etc (2d) the map data was stored in a simple 2d array. One of the easiest methods known to man. There were different arrays fo each level, one held floor\wall data, others held special event data, buttons, traps, teleports etc eg as basic as it get's 1=wall 0 = floor 6=teleport

1111111111111111111111111
1600000000000000000000001
1010111111111111111110101
1010000000000000000000101
1010011111110011111110101
1010010000000000000010101
1010010011110011110010101
1010010010000000010010101
1010000010000000010000101
1010010011111111110010101
1010010000000000000010101
1010011111111111111110101
1000000000000000000000061
1111111111111111111111111

Are those days really gone? boooooooooooo

each level was a simple text file called Level1.level, level2.level

Jay
Can u plz explain me more

I was only remembering the old days. I don't know how you've saved your map data, or what format it is.

However what I was demonstraighting above was. Imagine you have two square images let's say 32 pixels by 32 pixels. One image 1 is a wall tile, Image 0 is a floor tile. If you look at the "Array Data" abouve, and look closely it represents a very basic pac-man style maze you can follow the 0s round with your finger. When the program reads the test file, it draws the relevant tile based on the arrays location and value. It might look something like this

lets say the map tile area 100 by 100 and the tile images dimensions are 32x32. Lets imagine the map data is stored in an array (Like Above) MapData(100,100) and you have two images in an ImageList called MapTiles. MapTiles.Images(0) = Floor Tile, MapTiles.Images(1) = Wall Tile

Image You Have A Function That Draws A Tile called DrawTile(Image, XPosition, YPosition) which draws the image "Image" at position "XPosition", "Yposition"

for X = 0 to 99
    For Y = 0 to 99

        DrawTile(MapTiles.Images(MapData(X,Y)), X x 32, Y x 32)

    Next
Next

you would now have a table\grid\map 3200pxls by 3200pxls where ever a 0 was in your array there would be a floor tile, wherever there was a one a wall tile

like I say this is ooooooold school 2d game development stuff.... when it was fun

the only reason I suggested this would be you could easily upload a new level to your server eg Level69.level. Your program could check for files it didn't already have. Assuming you kept the level file name in a specific format the game would know in which order the levels would increment eg(Level69 comes after Level68)

I can't resist, give me a second I'll build you an example.

Ok,
You are very near to my question,
what you told me in the last msg. (upload the new level ex: level.level)
the same i want to create it.

but the thing is that Maze game is created with

labels only, ( i mean map )
I just make the autosize of label off. and allow the mouse event here,
I used label as wall.

let me show you: this is how I create the maze game. CLICK HERE TO REVIEW

But How can I create levels.?
I try once that if this level complete I close the initial form and reopen the new form which I label it as Level 2 and continue....

But when I update my programs level are stored in the program so what happen the full program is updated instead of updationg only levels.

I also know that I can create the Textfile and add the level like you mention
but How can i measure the wall label, Picturebox and starter line ?
So instead of this I like to create graphics form and want to handle the other forms too that were updated.

ok that guy is totally wrong DO NOT COPY THAT. I'll have the example for you in 5 mins.

I can't believe that video, it is such a bad way to do it.

Here, Have a look at this. I still can't believe that example... the s***t that gets published on youtube.

29e844d1741d786ae872bfd545e1cb0f

Becomes

5ecc1ea94f486e5d4ac3337b1fd7d7ae

Infact, the code is so simple I can post it here too. Extract the Zip file below and add it as a resource to your project then paste this code.

Public Class Form1

    Dim MapData(19, 19) As String

    'DOUBLE CLICK ON LEVEL1.LEVEL TO VIEW ITS CONTENTS

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        'Because I've included a res file I've had to read this data, all you would
        ' do with a file is read it line by line and split each line with ","

        'POPULATE MAP DATA FROM LEVELDATA (Level1.Level)

        'Get The Resource File Text
        Dim strLevelData As String = System.Text.Encoding.UTF8.GetString(My.Resources.Level1)

        'Split The String By VBCRLF (This will get our rows (Like ReadLine)
        Dim MapDat As String() = Strings.Split(strLevelData, vbCrLf)

        Dim Tiles As String()

        '(-2) because I think I did the map data file too large

        For MapY As Integer = 0 To MapDat.Length - 2

            'We Split Each Row\Line By The ,
            Tiles = Strings.Split(MapDat(MapY), ",")

            For MapX As Integer = 0 To 19

                'populate The MapData element with the relevent Map Data
                MapData(MapX, MapY) = Tiles(MapX)

            Next

        Next

        DrawMap()

    End Sub


    Private Sub DrawMap()

        'Create A board bitmap
        Dim Board As Bitmap = New Bitmap(32 * 20, 32 * 20)
        'And a graphics object
        Dim G As Graphics = Graphics.FromImage(Board)

        'Iterate through each value of your mapdata
        For y = 0 To 19
            For X = 0 To 19
                'and draw the relevant image at the relevant x\y location
                G.DrawImage(ImageList1.Images(CInt(MapData(X, y))), New Point(X * 32, y * 32))
            Next
        Next

        Me.BackgroundImage = Board


    End Sub

End Class

You also need an imagelist (ImageList1) with two images both 32x32

Your going to have to program the code logic based on the mouses x and y position. To get the relevent mapdata from the mouse position you would simply do MapData(Mouse.X\32,Mouse.Y\32) this will return what kind of tile the mouse is over.

Apart from writing the game for you that's pretty much it... and no I'm not writing the game for you =0)

please do not be lazy like this video... Live, Love Code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.