Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[.NET] .NET Runner - Visual Basic Game [VIDEO] [*UPDATED* - DOWNLOAD LINK NOW]

That's what I did man.. All picturebox are set manually.

[Image: 1riOqZa.png]
Basicly you want to generate a random X variable for the location points and leave the Y variable the same here is a psudo example(untested notepad):

Dim R as new System.Random
Dim Int as integer
Int = R.Next(1,9000)
Picturebox.location = new System.Drawing.Point(Int,5)'Here is where u add the random X varible to the picturebox location. Your Y variable will always be the same to keep the objects horizontally level. It doesn't have to be 5 tho this is just an example code.
(Feb 29, 2012 03:19 PM)DJ BrU Wrote:  Basicly you want to generate a random X variable for the location points and leave the Y variable the same here is a psudo example(untested notepad):

Dim R as new System.Random
Dim Int as integer
Int = R.Next(1,9000)
Picturebox.location = new System.Drawing.Point(Int,5)'Here is where u add the random X varible to the picturebox location. Your Y variable will always be the same to keep the objects verticly level.

That doesn't help him at all for generating levels. I can help you if you add me on MSN: [email protected]
I was like "Oh this is too good, he must have protected it..."

then I was like "OH SHIT ITS NOT PROTECTED!! LEECHH"

GG OP, Protect your shit, or give open source. Either way I would have gotten it, but you really SHOULD attempt to protect your .net framework programs better.
Spoiler (Click to View)

Edit: Hope in future you can make a API. That would be PRETTY BADASS if you know what i mean.
I was helping him genereate the picturebox locations, generate levels was my in my other post.
Man seriously... I wrote in BIG in RED that I will release the source later because it's too ugly for the moment, but I didn't obfuscated it anyway. Read the thread properly next time..

[Image: 1riOqZa.png]
If you want to draw the cubes instead, use the system.drawing.pens class.

Private Sub UsePensClass(ByVal e As PaintEventArgs)
e.Graphics.DrawEllipse(Pens.Red, _
New Rectangle(40, 40, 140, 140))
End Sub

Off of the MSDN website.

(Feb 29, 2012 03:31 PM)DJ BrU Wrote:  If you want to draw the cubes instead, use the system.drawing.pens class.

Private Sub UsePensClass(ByVal e As PaintEventArgs)
e.Graphics.DrawEllipse(Pens.Red, _
New Rectangle(40, 40, 140, 140))
End Sub

Off of the MSDN website.

Please, stop considering me as a fucking noob right now ><. I know how to draw a rectangle, and I know how to use google. Thanks for trying to help me, but you are just spamming the thread :/. Thanks again anyway.

[Image: 1riOqZa.png]
Is this what you need (En GDI)?
(Feb 29, 2012 03:52 PM)SIM-263922 Wrote:  Is this what you need (En GDI)?

Is the video drawing things based on key strokes..?
(Feb 29, 2012 03:54 PM)(╯°□°)╯︵ ┻━━┻ Wrote:  
Is the video drawing things based on key strokes..?

No, i did this using :

Code
Public Function RandomPosX()

  Dim r As New Random(System.DateTime.Now.Millisecond)

  If r.Next(0, 10) > 5 Then
  Me.Text = "Floor"
    Return "210"

  Else
  Me.Text = "Up"
    Return "130"

  End If
  'Return r.Next(0, 1)

    End Function

    Public Function DrawBlock()
  Dim RecTBoxR As New Rectangle(SpaceBetweenBlocks, RandomPosX, 20, 20)
  SpaceBetweenBlocks += 20
  Return BoxR.DrawRectangle(Pens.Red, RecTBoxR)
End Function
And then i did a loop using the function.

This was just an example. I'm just starting with GDI. So i'm training.
It's awesome man, but it generate the map a little slowly :( ! Today I made a huge improvement with my code (even if I'm still using Timer), I should release the source in a few days :) ! I'll make the fully random map in a future version.

[Image: 1riOqZa.png]
If you need help for the random map, i can help you.

Edit :

It's a bit better.
(In the video, the level.txt seems to be messed up.)
As i said, it's just an example on how to do it. I can help you in PM, if you want.
What you did seems to be awesome man ! I'm just wondering how I'll detect collision with drawn cube, but I'm sure I only need to search a bit ! Thanks for helping me !

[Image: 1riOqZa.png]
I love it, its awesome! Great game really bro
Just a hippie in his bag.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Source] by SIM-5420967May 26, 2024 09:50 AM 2 373 May 26, 2024 09:50 AM
Last Post: xiaowanga8
by HackersDec 20, 2023 06:28 AM 0 129 Dec 20, 2023 06:28 AM
Last Post: Hackers
[.NET] by BladabindiMay 17, 2023 12:20 AM 1 178 May 17, 2023 12:20 AM
Last Post: NyQuil