Page 1 of 2 12 LastLast
Results 1 to 40 of 41

Thread: How To Turn C++ Into VB.Net

  1. #1

    Thread Starter
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    How To Turn C++ Into VB.Net

    I'm bored so I did this just to screw around. Instead of using common C++ datatypes such as int or char, I called them Integer and String, and just outputted the value into a messagebox. You can learn a lot from a bored dummy

    c++ Code:
    1. #include <stdio.h>
    2. #include <windows.h>
    3.  
    4. typedef int Integer;
    5. typedef char String;
    6.  
    7. Integer main(void); //Preprocessor directive
    8.  
    9. Integer main(void)
    10. {  
    11.     String Text[255];
    12.     Integer Number = 5;
    13.     sprintf(Text,"%i", Number);
    14.     MessageBox(NULL, Text, "typedef test", MB_OK);
    15.     return 0;
    16. }

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: How To Turn C++ Into VB.Net

    You can learn a lot from a crash test dummy, too, but it costs more.
    My usual boring signature: Nothing

  3. #3
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,713

    Re: How To Turn C++ Into VB.Net

    sprintf always reminds me of Sprint for some strange reason

  4. #4
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: How To Turn C++ Into VB.Net

    You must be very bored Jacob lol.....
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  5. #5

    Thread Starter
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: How To Turn C++ Into VB.Net

    Im spicing up my C++ skills. Nevermind strengthening C# or VB.Net. If Im gonna be a pro game designer, Im going where the skills are and where the speed is at. Although I know C++, Im still a noob at it if I compare my skills to someone who works at EA. Although personally I dislike EA cause of the DRM policies. I have a question though. Im interested in becoming an indy (independent) developer for the Sony Playstation 4. Where can I get the software development kit online for it?

  6. #6
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: How To Turn C++ Into VB.Net

    You seriously wanna be a pro game programmer ? I can't fault that but I think you can make as much or even more money from writing programs that amount to little more than a few textboxes, grids and ADO.Net calls. Data is where the money seems to be. You have to have a solid hit to make money with games.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  7. #7

    Thread Starter
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: How To Turn C++ Into VB.Net

    Senior Game Designers (one who has at least 7 years experience) make about $150,000 a year. Game programming is the hardest most complex programming in existence. And they are high in demand because of new technologies such as the next gen consoles, as well as pc gaming. Sounds to me like theres more money out there in that. Also I might be able to get a degree in it through Full Sail using online classes. Its getting to the point to where game budgets are as big as film making budgets.

  8. #8
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: How To Turn C++ Into VB.Net

    I'm not disputing that its a rich field with the potential to make more money than you can spend in a lifetime. I'm just saying that there are programming projects that are orders of magnitudes less competitive while being much much easier to do yet one can still manage a good living from it. I'm not telling you not to follow your dream, I'm just being practical. Personally, I'd love to do that for a living, you know, write game engines and stuff but people aren't exactly lining up for that. I probably have like 20 unfinished projects here that all at one time was in demand all of which had to do with data. Had I finished them, I'd have had quite a bit of cash.....I donno, maybe its different where you are. Where I am, if I started writing games, I really don't know how I'd make money from that.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  9. #9
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: How To Turn C++ Into VB.Net

    Quote Originally Posted by Jacob Roman View Post
    Game programming is the hardest most complex programming in existence.
    No. No it isn't. But thanks for contributing.

    Try writing code where there are some real consequences if it goes wrong. Life support, military control systems, civil avionics, industrial plant control... the list is long and illuminating. Game coding is at the trivially-easy end of the spectrum.
    Last edited by wossname; Jun 21st, 2013 at 04:10 PM.
    I don't live here any more.

  10. #10
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: How To Turn C++ Into VB.Net

    Hmmm... never thought of it like that... maybe that's why I prefer to do enterprise-level business development instead of games... clearly it's much more dangerous and risky.

    Seriously though, I can't fault that either... I gave it a shot once... found out early on that I really didn't enjoy it nearly as much as I did solving business problems.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  11. #11
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: How To Turn C++ Into VB.Net

    Game programming is the hardest most complex programming in existence.
    Pah! A child could do it! Come to think of it, it's usually a child that does! (How did I ever get so old!)
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  12. #12

    Thread Starter
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: How To Turn C++ Into VB.Net

    Yoy obviously never created a complex game. It can get pretty complex, and require more math than einstein and newton can handle. When doing 3D though, there is an even higher order of coding such as visual surface determination, advanced lighting and shading techniques, volumetric shadows, realistic physics, etc.

  13. #13
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: How To Turn C++ Into VB.Net

    There is a tendency to confuse volume and complexity. My experience of 3D modelling and so on is that there's a lot of it (so much that I now live by the motto "Life is too short for 3D modelling!) but I wouldn't really characterise it as complex! If I, a mere Humanities student, can master it sufficiently to have once written tutorials on it then anybody can!
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  14. #14
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: How To Turn C++ Into VB.Net

    Cutting edge games have always required the most out of computers. The whole area wanders into AI and problem solving, too, so it has all the complexity and intellectual challenge anybody can ask for. Of course, it is simple to create a simple game. Most games aren't life and death, either (except for Ender's Game, which is funny, since I've now made two references to that book in the last month or so), so I can see Wossname's point, but I agree more with JR. For life-critical systems, the challenge is not being a screw-up. For intellectual challenge, games are the hardest as long as the game in question is sufficiently hard. After all, we can all, relatively easily, come up with a game that is beyond the capabilities of any known computer, and it has always been so. The truly innovative games do something that wasn't thought possible. That's the pinnacle of creativity, and the reason that lots of us got into coding in the first place. On the other hand, there are very mundane problems that can be equally challenging. I eventually figured out that a certain problem I've been working on was as interesting and challenging as the robot brain I was working on. Better still, I can get paid for it. However, it makes extensive use of game designs to solve a very fuzzy business problem on which a few million dollars has already been wasted.

    Games are life, life is games. Life is hard. Programming a game that is life is hard.
    My usual boring signature: Nothing

  15. #15
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,957

    Re: How To Turn C++ Into VB.Net

    I'm inclined to agree with JR that games programming can be amongst the most challenging (though not misson critical) forms of programming. I'd disagree with it being well paid though. While it is possible to pull $150,000 pay packets it's extremely rare and basically involves you being the lead on some previous major hit. It's a bit like saying that being a musician is well paid on the basis that Kylie Minogue is minted. She is, but to judge the industry average on her example is to ignore the thousands of struggling jobbers who who barely make enough to cover their expenses. I've got freinds in various parts of the game industry and they're all poorly paid with the single exception of one who started his own mobile phone games company and made a go of it. The problem is that there are an awful lot of people who'd really love to be games programmers and any job that lots of people want to do is saturated and therefore underpaid.

    On the other hand it's a very emotionally rewarding choice. My freinds may be underpaid but they love what they do. And I can't deny that it's so much cooler when they show me the latest physics engine with fully destructable whizz-bangs than it is when I show them the ordering sstem I wrote for a conservatory blinds company.

    So, JR, if you want to program games because you want to make money then I'd suggest you're going to be dissapointed. But if you want to program games because you want to program games then go for it, I suspect you'll enjoy it and the lack of money won't really matter.

    Personally I tried games programming for a while and decided it wasn't for me. All that trigonometry was a pain in the ass and I just lacked the imagination to come up with cool ideas. Business apps, on the other hand, just seem to gel for me.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  16. #16
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: How To Turn C++ Into VB.Net

    Quote Originally Posted by FunkyDexter View Post
    The problem is that there are an awful lot of people who'd really love to be games programmers and any job that lots of people want to do is saturated and therefore underpaid...
    I noticed that when people first make the connection in their mind on what programming is about or they have written their first "Hello world" type app, they always seem to think that they will be able to write the next WoW. All I can do is smile. I know that the reality will humble them in no time. They're just drunk on ignorance and the excitement of this new world they just discovered. DirectX would sober them up quickly.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  17. #17

    Thread Starter
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: How To Turn C++ Into VB.Net

    Ummmm I already have written the next WoW. Its called Bosskillers

    Its WoW in 2D though with you playing as Link from Legend of Zelda:


  18. #18
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: How To Turn C++ Into VB.Net

    Wow, that looks truly impressive. I think some glowing decors would really make that shine in terms of aesthetics. Perhaps some colored torches around the map with dynamic lighting.

    The colour of the tiles look a little washed. Are you using 8-bit images ?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  19. #19
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: How To Turn C++ Into VB.Net

    Quote Originally Posted by Niya View Post
    All I can do is smile.
    I can do more than that: I can snicker, giggle, and even, on occasion, guffaw!
    My usual boring signature: Nothing

  20. #20
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: How To Turn C++ Into VB.Net

    Quote Originally Posted by Shaggy Hiker View Post
    I can do more than that: I can snicker, giggle, and even, on occasion, guffaw!
    Well, I wouldn't want to discourage budding coders. They would discover in time on their own just what game programming truly requires.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  21. #21
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: How To Turn C++ Into VB.Net

    In that case, go with the guffaw. It's a nice, indecisive, kind of a retort that could be disguised as a sneeze, a cough, or a brain tumor.
    My usual boring signature: Nothing

  22. #22

    Thread Starter
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: How To Turn C++ Into VB.Net

    Quote Originally Posted by Niya View Post
    Wow, that looks truly impressive. I think some glowing decors would really make that shine in terms of aesthetics. Perhaps some colored torches around the map with dynamic lighting.

    The colour of the tiles look a little washed. Are you using 8-bit images ?
    No its 32 bit. You didnt see the whole dungeon. Its dark and lights up with lightning strikes, theres areas with bright lava that burns you when you stand on it. Theres grassy areas, and even a nice hallway with checker board tiles that reflect. And with my engine I can make the worlds as massive as I want with zero slowdown by using a technique I invented. The AI is exactly like wow, and with my new Astar Pathfinding technique, I can have the sprites chase you throughout the huge sized dungeons. It has a lot put into it. My map editor is pretty advanced too, and you can dynamically drag the tiles in the toolbar as well as add new tiles to it. Plus you can add foreground tiles as well as background tiles. I still need to add bosses with advanced strategies similar to WoW.

  23. #23
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: How To Turn C++ Into VB.Net

    Every time I see this thread I think of:

    "We can make beans into peas!"

  24. #24
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: How To Turn C++ Into VB.Net

    Quote Originally Posted by Jacob Roman View Post
    No its 32 bit. You didnt see the whole dungeon. Its dark and lights up with lightning strikes, theres areas with bright lava that burns you when you stand on it. Theres grassy areas, and even a nice hallway with checker board tiles that reflect. And with my engine I can make the worlds as massive as I want with zero slowdown by using a technique I invented. The AI is exactly like wow, and with my new Astar Pathfinding technique, I can have the sprites chase you throughout the huge sized dungeons. It has a lot put into it. My map editor is pretty advanced too, and you can dynamically drag the tiles in the toolbar as well as add new tiles to it. Plus you can add foreground tiles as well as background tiles. I still need to add bosses with advanced strategies similar to WoW.
    I see....how long have you been working on that game anyway ?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  25. #25

    Thread Starter
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: How To Turn C++ Into VB.Net

    Quote Originally Posted by Niya View Post
    I see....how long have you been working on that game anyway ?
    About a few months. But I havent touched the project in awhile. Last thing I added was the spell cooldown effect, where itll darken the spell icon and rotate around lighting it back up until the cooldown time has expired. But that was a while ago. I should finish up this project. Just that I got caught up doing others.

  26. #26
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: How To Turn C++ Into VB.Net

    Quote Originally Posted by Jacob Roman View Post
    Last thing I added was the spell cooldown effect, where itll darken the spell icon and rotate around lighting it back up until the cooldown time has expired.
    I think I've seen something like that in Dota. Its a practical effect that can tell you how far along you are on a glance.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  27. #27
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: How To Turn C++ Into VB.Net

    Quote Originally Posted by Jacob Roman View Post
    areas with bright lava that burns you when you stand on it.
    Boring! That's just like any other lava. You need to make some that does something ELSE when you stand on it.
    My usual boring signature: Nothing

  28. #28

    Thread Starter
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: How To Turn C++ Into VB.Net

    Quote Originally Posted by Niya View Post
    I think I've seen something like that in Dota. Its a practical effect that can tell you how far along you are on a glance.
    Heres the source code in VB6 on how to pull off the World of Warcraft "Spell Cooldown" effect. I had to figure this out on my own which was not easy because there is no code examples online on how to do it. So I had to guess and use common sense approaches. Then it hit me. I had to put a dark square diamond over the squared spell icon, split up the diamond square into 8 slices, like a pizza, while cutting off the edges so it can only be seen as the regular square. Then I have each slice kinda shrink into each vertex, and it freaking worked like a charm, at any time I desire. If anything it'll probably be the only code in existence on the internet that involves this. If you want me to make a VB.Net version, I can whip one up but itll take a day. I included the EXE if you don't have VB6 to test the code. I made the cooldown 10 seconds on this one. Just click anywhere in the form window to fire off the spell cooldown:
    Attached Files Attached Files

  29. #29
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: How To Turn C++ Into VB.Net

    Quote Originally Posted by Jacob Roman View Post
    Heres the source code in VB6 on how to pull off the World of Warcraft "Spell Cooldown" effect. I had to figure this out on my own which was not easy because there is no code examples online on how to do it. So I had to guess and use common sense approaches. Then it hit me. I had to put a dark square diamond over the squared spell icon, split up the diamond square into 8 slices, like a pizza, while cutting off the edges so it can only be seen as the regular square. Then I have each slice kinda shrink into each vertex, and it freaking worked like a charm, at any time I desire. If anything it'll probably be the only code in existence on the internet that involves this. If you want me to make a VB.Net version, I can whip one up but itll take a day. I included the EXE if you don't have VB6 to test the code. I made the cooldown 10 seconds on this one. Just click anywhere in the form window to fire off the spell cooldown:
    Yea, I still install VB6. I had to get dx8vb.dll for it to work though, but that took only a few seconds to find and download from dlldump.com

    I must say, the code itself is frightening. I wrote a screen saver once that used DirectX but it didn't use it for much more than blitting. This is so outside my zone. I can only hope to be half as knowledgable as you about this type of thing in the future.

    As for the effect, its the same one I saw in Dota. Though I think their own makes several cycles, each cycle gradually lightening the image but its the same basic effect exactly. Its surprising how smooth it is. If I tried implementing that using GDI, I doubt it would be so smooth for such a large image. DX is truly impressive. By the way, is there a variable I can change that will affect the speed of the dial ?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  30. #30
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: How To Turn C++ Into VB.Net

    Nvm...I found the variable in Spell_Setup().
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  31. #31
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: How To Turn C++ Into VB.Net

    Wow even at 0.3 cooldown its still very fast and very smooth. GDI definitely cannot do this as good.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  32. #32

    Thread Starter
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: How To Turn C++ Into VB.Net

    Of course theres room for improvement hehe. I noticed I have too many Offset / 2 over in the Create_Spell_Cooldown_Polygon sub. Too many divisions is bad and it really only needs to be done once. So you can just make a variable called Half_Offset, have it equal Offset / 2, and replace all the Offset / 2's with Half_Offset. Also if you wanna see the "pizza pie" that I was talking about at work, I made the background blue, and changed the mode into wireframe, so replace this Render code here:

    vb Code:
    1. Private Sub Render()
    2.     Device.Clear 0, ByVal 0, D3DCLEAR_TARGET, D3DColorRGBA(0, 0, 255, 0), 1#, 0 '<-------CHANGED THE BACKGROUND COLOR
    3.     Device.BeginScene
    4.     Device.SetRenderState D3DRS_FILLMODE, D3DFILL_WIREFRAME '<-------ADDED THIS
    5.     Draw_Spell_Polygon Spell
    6.     Draw_Text "Seconds: " & CStr(Spell.Cooldown_Time), 50, 25, 500, 25, "ariel", 8, D3DColorRGBA(255, 255, 255, 255)
    7.     Device.EndScene
    8.     Device.Present ByVal 0, ByVal 0, 0, ByVal 0
    9. End Sub

  33. #33
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: How To Turn C++ Into VB.Net

    Quote Originally Posted by Jacob Roman View Post
    Of course theres room for improvement hehe. I noticed I have too many Offset / 2 over in the Create_Spell_Cooldown_Polygon sub. Too many divisions is bad and it really only needs to be done once. So you can just make a variable called Half_Offset, have it equal Offset / 2, and replace all the Offset / 2's with Half_Offset. Also if you wanna see the "pizza pie" that I was talking about at work, I made the background blue, and changed the mode into wireframe, so replace this Render code here:

    vb Code:
    1. Private Sub Render()
    2.     Device.Clear 0, ByVal 0, D3DCLEAR_TARGET, D3DColorRGBA(0, 0, 255, 0), 1#, 0 '<-------CHANGED THE BACKGROUND COLOR
    3.     Device.BeginScene
    4.     Device.SetRenderState D3DRS_FILLMODE, D3DFILL_WIREFRAME '<-------ADDED THIS
    5.     Draw_Spell_Polygon Spell
    6.     Draw_Text "Seconds: " & CStr(Spell.Cooldown_Time), 50, 25, 500, 25, "ariel", 8, D3DColorRGBA(255, 255, 255, 255)
    7.     Device.EndScene
    8.     Device.Present ByVal 0, ByVal 0, 0, ByVal 0
    9. End Sub
    Ah...Its a little clearer what you did now. Are all those divisions by 2 are what you used to create the "pizza" ? You can create those slices by continually halving a polygon which seems to be what you did but I'm not sure.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  34. #34

    Thread Starter
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: How To Turn C++ Into VB.Net

    No not quite. If you notice in that sub, I created seperate polygons depending on the angle the timers at. It starts with 8 polygon triangles, with the first poly cutting down as it rotates and gets clipped to stay within the square, then 7, then six, then 5, then 4, then 3, then 2, then 1. The half offset is half the size of the entire width or height of the polygon from the center of the spell icon.

  35. #35

    Thread Starter
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: How To Turn C++ Into VB.Net

    And for your viewing pleasure VB.Net lovers, here's the VB.Net version of the World of Warcraft Spell Cooldown effect I created just for you.....because I like you a lot

    This was compiled using VB.Net 2008. Although I can do 2010 if you need me to.
    Attached Files Attached Files

  36. #36
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: How To Turn C++ Into VB.Net

    Quote Originally Posted by Jacob Roman View Post
    And for your viewing pleasure VB.Net lovers, here's the VB.Net version of the World of Warcraft Spell Cooldown effect I created just for you.....because I like you a lot

    This was compiled using VB.Net 2008. Although I can do 2010 if you need me to.
    Cool

    Its better you leave it in 2008 since later versions of VS can convert it but lower versions of VS cannot later solutions. As a matter of fact VS2008 cannot even open VS2010 solutions.

    This one seems different. Instead of lightening it, it starts off blank and its drawn by the dial. Also it has a bug. When its started, it has a blue tint and clicking it gives no visible response. I had to re-size the form after running the program for it to work properly. This also means full screen mode doesn't work since you can't re-size in full screen.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  37. #37

    Thread Starter
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: How To Turn C++ Into VB.Net

    Really? Funny thing is that it works perfectly in both fullscreen and windowed mode in my computer. Maybe you could help me make it compatible for all computers. I set the resolution to 1024x768 32 bit color when going fullscreen. But then again, Im using a gaming laptop with a nice NVidia based GeForce card.

  38. #38
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: How To Turn C++ Into VB.Net

    1024x768x32 is also my working graphic mode. I also have an NVidia GeForce card(an 8400 GS). I am running Win7 Ultimate with SP1. Are you running XP by any chance ? I've seen some DirectX games like Starcraft demonstrate graphical anomalies under Win7.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  39. #39
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: How To Turn C++ Into VB.Net

    This is what I'm seeing on my PC:-

    Name:  Cooldown.png
Views: 374
Size:  133.3 KB

    If I re-size that form, it works better but still not like the one in VB6. It draws the image instead of lightening it:-

    Name:  cooldown2.png
Views: 339
Size:  37.7 KB
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  40. #40

    Thread Starter
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: How To Turn C++ Into VB.Net

    No im using Win 7 Pro. Ill look into it when I get home from work.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width