News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > BeyondUnreal > Off Topic

Reply
 
Thread Tools Display Modes
Old 27th Aug 2003, 04:48 PM   #1
The Twiggman
Instagib 4 Life
 
The Twiggman's Avatar
 
Join Date: Feb. 7th, 2002
Location: Canadian Ghetto
Posts: 647
Question Anyone Here Do VB?

Im just wondering if any of you do any Visual Basic programming in your spare time. Im a little stuck, but I've yet to find an answer on alot of the sites.

How to read and write treeviews?

You see im building a web browser, no apparent reason, just for style and speed. So far I got the built in media player so you can surf and listen to tunes, has favorites, sourcecode downloader (.txt and .html) and a popup blocker. Not too bad.

So I just started coding up the treeview so it builds itself as you search sites just like the history does. But when its time to save, ya, lol its nearly impossible to load it back in due to the branches in the keys needed to form the tree.

Other than that umm, I was going to put in its own searching tool to parse a pile of search engines for a keyword, or whatnot just to give it more flexibility.

EDIT # 2
=======
Oh ya if your intrested in an animated picture of what it looks like, click "My Website" in my sig.

Last edited by The Twiggman; 27th Aug 2003 at 04:51 PM.
The Twiggman is offline   Reply With Quote
Old 27th Aug 2003, 06:40 PM   #2
Syri
Who are you calling short?
 
Syri's Avatar
 
Join Date: Aug. 18th, 2000
Location: Nottingham, England
Posts: 4,586
hm, i've played a little with the treeview, i'll see if i've got any stuff lying around that may help
__________________
You wanna be a big cop in a small town? **** off down the model village!

The artist formerly known as D-Stroya
Syri is offline   Reply With Quote
Old 27th Aug 2003, 06:53 PM   #3
FireSlash
Whats a FireSlash?
 
FireSlash's Avatar
 
Join Date: Feb. 3rd, 2001
Location: Central Ohio
Posts: 4,300
I did some projects. My most nutty was an RTS using Direct Draw (Bitblt was too slow, and lacked the ROPs for what I wanted to do)

I can post some screenies, but its not much to look at. I never developed a real tileset for it (In fact, I just used my wallpaper ), and the buildings and such were all ripped from TA... movement code (sorta) works, but lacks pathing abilities, etc.

In short, I dropped it right around when i realized VB was too goddamn slow to do anything fun in
__________________
Theory is when you know everything and nothing works.
Practice is when things work, and no one knows why.
Here we combine theory and practice.
Nothing works and no one knows why.
FireSlash is offline   Reply With Quote
Old 27th Aug 2003, 10:59 PM   #4
The Twiggman
Instagib 4 Life
 
The Twiggman's Avatar
 
Join Date: Feb. 7th, 2002
Location: Canadian Ghetto
Posts: 647
Thanks D-Stroya. BTW 3300 post dude cheers!

Quote:
In short, I dropped it right around when i realized VB was too goddamn slow to do anything fun in
Exactly, you can build things but its not dynamic enough. I wanted to get into bitblt but only got as far as a cruddy screensaver. Hehe, whatever its better than nothing, and if your creative then there ya go.
The Twiggman is offline   Reply With Quote
Old 28th Aug 2003, 03:59 PM   #5
The Twiggman
Instagib 4 Life
 
The Twiggman's Avatar
 
Join Date: Feb. 7th, 2002
Location: Canadian Ghetto
Posts: 647
As for games wise, I've done a few games in my time.

VB Dope Wars, that was quite intresting, it eventually got right unstable as I put so much into it. It was mint though, it was real time, like the prices for drugs were changing all the time, just had to buy and sell and not be busted at the wrong time. But you could also buy rocket launchers to shoot the cops with. The game was nuts.

I tried to build a top down game like "Total Carnage" for SNES. I had it working with guns and collision detection, but I couldn't figure out how you would really move around farther than the screen so I just turned it into a game where you have enemys moving towards you from all sides and you have to shoot them. Every minute they move faster.

Then recently I just started making a game like everwars style. Like an rpg text bases fighting game, not that bad but it had some style to it. I called it "Ghetto Wars" because you fight with guns, knives, chains and bats. Toss on a backwards hat and get an extra 2 armour points. The battle engine was neat though. For every round it takes to fight and defeat the opposing player the fight jackpot would go up by $5, so if it takes like 10 rounds to defeat the player then someone wins $50 bucks and the other player loses $50 bucks.
The Twiggman is offline   Reply With Quote
Old 28th Aug 2003, 04:42 PM   #6
FireSlash
Whats a FireSlash?
 
FireSlash's Avatar
 
Join Date: Feb. 3rd, 2001
Location: Central Ohio
Posts: 4,300
Moving the screen tiles takes a bit of thinking. I just put them in a matrix, and moved the tiles in relation to the absolute and partial positions of the character. (Round to a tile, get the tiles we need, and draw them with an offset relational to the offset from the character to the tile you rounded off too.

I think I have some sample code here somewheres...
__________________
Theory is when you know everything and nothing works.
Practice is when things work, and no one knows why.
Here we combine theory and practice.
Nothing works and no one knows why.
FireSlash is offline   Reply With Quote
Old 28th Aug 2003, 05:58 PM   #7
The Twiggman
Instagib 4 Life
 
The Twiggman's Avatar
 
Join Date: Feb. 7th, 2002
Location: Canadian Ghetto
Posts: 647
Smart thinking. I should have just looked for a sample instead of just trying to figure it out myself. But I like to be independant on this stuff.

Hmm, im going to go figure out this read/write treeview stuff. Im sure I can figure out a way to write to an ini and call it all back. If I got any success then I'll post the code here and at PSC just because I've yet to see anything done.
The Twiggman is offline   Reply With Quote
Old 28th Aug 2003, 07:45 PM   #8
The Twiggman
Instagib 4 Life
 
The Twiggman's Avatar
 
Join Date: Feb. 7th, 2002
Location: Canadian Ghetto
Posts: 647
Thumbs up Holy Jeeze, Mind Numbing Stuff

Well this will work reads and writes just fine for what I need. A little bit sloppy and makes the folders look pretty jumbled up, but hey, either that or nothing. Lol.

Code:
'Read And Write Treeviews, A Little Demo For Use For Web Browser History
'Still A Bit Buggy, But Nothing Half As Bad As It Was 10 Minutes Ago
'All you need is a folder named Cache within the directory of the programhttp://forums.beyondunreal.com/editpost.php?do=editpost&p=1196128

'By Twiggy

'Define Variables
Dim a As Integer
Dim z As Integer

'Each click saves the special number to a cache folder
'Also saves two files per address, one with date, one with time

Private Sub Command1_Click()
'Adding One To Special Number
a = a + 1
Label2 = a

'Saving Special Number
Open App.Path & "\Cache\a.ini" For Output As #2
Print #2, a
Close #2

'Adding Node Displaying Site Under The Date
TV1.Nodes.Add "Date" & Date, tvwChild, a & "Site", Text1

'Saving The Two Files For The Address
Open App.Path & "\Cache\t" & a For Output As #2
Print #2, Text1
Close #2

Open App.Path & "\Cache\d" & a For Output As #2
Print #2, Date
Close #2

End Sub

Private Sub Form_Load()

'When The Program Loads It Creates A New Parent Node For Todays Date
TV1.Nodes.Add , , "Date" & Date, Date

'Loads In The Special Number
Open App.Path & "\Cache\a.ini" For Input As #1
Input #1, x
a = x
Label2 = a
Close #1

'A Loop To Load In The Previous History From 1 to The Speical Number
'See where it comes into play

For p = 1 To Label2
Open App.Path & "\Cache\t" & p For Input As #1
Open App.Path & "\Cache\d" & p For Input As #2
Input #1, t
Input #2, D
t1 = t
d1 = D
TV1.Nodes.Add "Date" & Date, tvwChild, p & "Site", t1
Close #1
Close #2
Next p

End Sub

'When You Click The History Item, It Will Appear In A Text Box Below
Private Sub TV1_NodeClick(ByVal Node As MSComctlLib.Node)
Text1 = TV1.SelectedItem.Text
End Sub
Make not I didn't use d1 yet, it gives me missing element, so until I figure that bit out, im stuck with it always showing todays date instead of a new big date everytime, no big deal. Its only a number. Lol I should have just used a listbox in the first place.

Last edited by The Twiggman; 28th Aug 2003 at 07:47 PM.
The Twiggman is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:43 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer