2014-07-31 18:32:01

I decided to start this topic, because I'm quite curious about something.
There is a language out there called pure basic, which is actually the language used to code games such as death match and snow race, and also the one I'm using, that is if I can get a patent for games.

  But that aside, the language is relatively easy to learn, the only symbols used being parenthesis, backslashes, and maybe a : or ;. With the right libraries, it's capable of producing powerful games, dare I say even better than bgt.

  So, has anyone ever heard of this language before?

I only started this topic in the development room because it has to do with programming. If any moderator feels that the placement was wrong, feel free to move it.

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2014-07-31 19:04:48

I have used it many years ago.  I suspect I will be ignored, but just skip to Python or even C++ for that matter.  Purebasic is basically C with a pretty syntax and a bigger standard library.
It's been a long time since I touched it, so it is possible that it has changed (but I hear from others that it hasn't, so...).  Firstly, it's not free, and you have literally 100 free options and at least 10 that I would call better.  Secondly, the higher level constructs are missing--garbage collection, classes, inheritance.  Everyone I know who has used it has "graduated" to something better and looks back on it with horror.
There's two things worth saying here.  First is what I think of as the "PHP Phenomenon."  All the sane programmers hate PHP, including most if not all of the major programming bloggers, everyone I know at my college who can actually program, and everyone I know outside college.  PHP is pretty much universally agreed to be awful, huge articles have been written about why this is true, and people seem to have finally stopped using it for new projects.  But PHP has two things: at first glance, it's great and fun and helpful, and you only find out later that it's awful.  The second is that everyone looks at how much of the web it powers, and automatically assumes that it's somehow this fantastic thing-in reality, everyone just bolted on stuff with no thought to the future, there's 5 or 6 ways to do everything and you have to know them all because who knows what today's project did (and a lot of them use more than one), and to really drive it home this is a web programming language that requires a server and yet it even has openAL bindings.  My point is that a good programmer can work with anything.  Having a game written in  specific language tells you only that it is technically possible, and gives no statement one way or the other as to the actual quality of that language.  For example, I see no reason I couldn't do space invaders in assembly, though it would take a while and I'd never suggest that anyone try such insanity.
the second thing worth saying is that, if you choose a less capable and less well-tested language, you never find out about all the nice things you're missing and why you wish you had them.  It's like asking someone from the 1800s if they think they need this thing called electricity or that thing called running water.  Until you have and understand the features, it's not even possible to understand why you'd need or want them.  I rate Purebasic as the 1800s of programming: it's C with nice syntax.  Modern programming languages automatically manage memory, clean up stuff, provide very nice ways to reinitialize levels and such (a ton of the bugs in BK3 are because he doesn't have classes with constructors in HSP), and a bunch of other stuff.  Even C++ has seen the light now, providing first-class functions and a limited form of garbage collection (I don't exactly recommend it, but I do recommend it over PB).
Here's the secret.  I suspect that everyone is going to ignore or disbelieve this.  The programmers who forgo or move on from BGT are likely to realize that BGT was hiding 30 years of literature, code examples, forum posts, and best practices from them.  When you go with BGT, you can get going quickly.  But you also give up the 30 years of almost every programmer's attempt to make a game including, most importantly, the failures.  The coding habits of this community as a whole tend to be 20 years outdated at least, and all the problems that come up here have already been solved by the sighted (a quick Google search can be very informative on most of them).  The reason that we don't see a ton of Shades of Doom clones written in BGT is this, and not anything to do with the language.
I'm curious why you need a patent and why you think that Purebasic uses less symbols.  C/C++ is a bit heavy on them, but everything else only really uses the math operators and the ; these days (and ; is super, super optional now).

My Blog
Twitter: @ajhicks1992

2014-07-31 19:38:14

Camlorn,
  This forum is for sharing opinions, thus you have the right to do so. In your opinion, and the opinions of others you've talked to, pure basic is, um, questionable in quality.

  One of the main reasons I don't use c++ is because of it's complexity.
  And yes, pure basic is more along the lines of a scripting language/programming language, and I've seen c++ code and didn't know what the heck to do with it. I'm sure you know more about programming than me, since you are in college and all, which is why you know a lot of programming languages. However, pb is easy for me to understand, and can do things well beyond the scope of what I need it for, so I don't see the point of learning c++, or pithon at this time.

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2014-07-31 21:25:20 (edited by stewie 2014-07-31 21:29:34)

I remember liking pure basic when I used it, but I wouldn't pay the $70 price to purchase it. I didn't delve too far into the language itself when I used it. I was unaware it lacked most standard concepts.
One thing I liked about pure basic that I literally had a simple GUI program running in an hour or two.

If you are looking for other languages that are easier, try python. Python I would rate as easier than pure basic, at least for simple tasks. Python comes bundled with a number of libraries, including wx wigits for creating GUI driven applications.

I personally wouldn't recommend starting with a language such as C or C++. They are often more complicated and lower level, and the tutorials assume prior programming experience. I would recommend to avoid the basic languages however, as they are out of date and using older technology and programming concepts. Your past programming experience I believe comes from visual basic. I think you used visual basic for some of your applications, but some of the features of the language are painful to use. You could try a language such as C#, but I would recommend that after you learn the fundimental concepts first.

Deep in the human unconscious is a pervasive need for a logical universe that makes sense. But the real universe is always one step beyond logic.

2014-08-01 02:08:57

I personally am a fan of pure basic. Here's what I say. You pick whatever language suits you. Though's who have been following me and my games know I switched from bgt because I found I was rappidly out growing it. In fact if I hadn't switched to pb, a lot of the features you see in snow race and death match: project alpha wouldn't have even been their to begin with, but that's my personal choice. I still say bgt is a grate starting place if your new to audio game creation and you want to create games. And @camlorn, pure basic has changed a lot since you last used it. Its up to version 5 now, and they have added a lot of new features and made the language more stable. And I have coded in visual basic, though wasn't a fan of that stile of basic at all.

Check out the new reality software site. http://realitysoftware.noip.us

2014-08-01 02:11:52

lololol!
lol!
I would personally like to know why it is that you believe I used visual, basic. Never have I touched the language, nor has there been any past projects of mine.

  As for pithon, I personally wouldn't prefer it, especially because of the indentions. And also, I might add, that you guys are against this language partly because it's not free? And you actually would complain, about a $70 language, but not apose a $400 pro licence, as you had to obtain in bgt, which isn't, even, a, real, programming language?
wow.
  And why must you guys try and tell me to switch languages? What if someone told you to switch from, say, pithon or c++ to pascal or vb6? Sure you wouldn't like that.
It's okay to share opinions, but seriously? Don't try and convert people to other languages, pleas.

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2014-08-01 03:07:27

I can see why people would like PureBasic (love the name--pure, as in not like that awful old BBc Basic you might have remembered), just like I can see why people liked Delphi or FreePascal; it's a nicer wrapper to the APIs than most mainstream languages, and it's arguably the end result that matters. Still, yeah, I'm with those in favour of investing your intellect elsewhere, closer to the mainstream, or to home. I'm personally of the old-school and think that "Modern" language features are just bloat with no good justification, but each to his own. If you've got to be realistic about it, use a language that gives you what you need, and gives you a chance of further programming work in the future; whatever you pick will give you experience, and there's nothing like trying to do something useful with it to test its utility. Me? ANSI/ISO C for portable code, with Tcl for a hosted scripting environment. Never fails, but hardly suitable for a newbie, and barely suitable to audiogame development, so probably not the best choice for that unless you want to boil all your eggs at once.

Just myself, as usual.

2014-08-01 03:21:17

I completely agree with you sebby

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2014-08-01 03:25:51 (edited by stewie 2014-08-01 03:30:17)

I would like that. I've used python, c++, visual basic 6, visual basic.net, pure basic, bgt, html, php, javascript and lua for a variety of purposes. There isn't really one defined programming language used to solve all purposes. I wasn't trying to convert anyone to a language of choice. I am currently using python, which I noticed to be simple and easy to learn, so I mentioned that aspect of it. One problem with python is the line indentation, which I still find kind of annoying.

I agree the licensing fee for bgt was incredibly high. I don't think there's anything wrong with paying for a language, I was just mentioning free alternatives.

Sorry about the vb6 thing, I was thinking of another person with a similar name.

My personal philosophy has always been to go with whichever language you want to, as I often find that people have a predefined set of standards they will rigidly stick to. I've always found this a problem within the programming community. Everyone seems to have a widely differing viewpoint. Just use what you want for any purpose, but take suggestions under advisement.

Deep in the human unconscious is a pervasive need for a logical universe that makes sense. But the real universe is always one step beyond logic.

2014-08-01 04:13:24

I know, that wasn't aimed direcly at you, stewie

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2014-08-01 07:29:53

I tried Pure Basic sometime last year, perhaps last summer, and had mixed opinions about it. Keep in mind that I am a fully trained and fully qualified C++ programmer so coming from my background and training Pure Basic was in certain ways a bit of a step down so to speak. That said, I can fully see why it is becoming popular among newbies, people who just can't grasp lower level languages like C or C++, because from the demo Pure Basic seems to be fairly simple and easy to learn, has a lot a power for a Basic language, and is of course cross-platform. I also noticed they were beginning to come out with tools like a simple but functional visual designer all which is useful for a newbie.

While I would not personally choose to use Pure Basic for my own game projects I can not come up with any reason why someone else couldn't based on my personal experiences which are fairly limited in scope. However, that isn't the important thing to keep in mind here. In my experience both developing accessible games as well as a few products for the mainstream public end users don't care how you make the product. All they care about is if it is stable, works well, and the performance is acceptable on their PC. They could really care less what language you use so long as it works.

Put another way when someone buys an automobile from a dealer they probably don't care about what makes the wheels turn as long as the car or truck gets them from point a to point b. Its only the mechanics who will argue about the technical specifications of the engine, the gearing, and other aspects of how the car works.

So seen from that perspective my feeling about programming is as long as it works, can make a decent product, its okay to use. Do what works best for you, and don't worry about what other developers think, because ultimately every language has pros and cons. A lot of times there is no absolutely right answer, but only opinions formed by end user experiences and of course personal preferences. So for that reason I am not going to get into the old debate of language x is better or worse than language y.

As far as Python and line indention goes I can see why many blind newbies don't like it, but the fact of the matter is you should properly indent your code regardless of what language is being used.  One reason is if you wish to collaborate with a sighted programmer he or she will not be easily able to follow your code without the proper formatting. If you try and get a job with a company either for full time or as a contractor they will demand that the code is properly formatted. If you ever have a chance to use a braille display and can follow along with the code in braille the reasons for proper formatting will become immediately clear to you. For all those reasons it is a good idea to get in the habit of properly formatting your code anyway even if it doesn't seem that important to you now.

What I like about Python is that it forces people to adopt those standards from the get-go, and even the laziest coders have to do it or else. For those coders like me who have been coding for years and know how to properly format code it serves as good practice, keeps us in the habit, so if we are called upon to write a program in C++, Java, or some other language we will automatically format weather formatting is required or not. People who are new to programming, haven't already been formatting for years, will likely find it a bit irritating until it becomes second nature to them. Especially, when that newbie is blind and the formatting has no immediate value to him/her since they can't see it.

Sincerely,
Thomas Ward
USA Games Interactive
http://www.usagamesinteractive.com

2014-08-01 11:12:13

Hi,
Personally, I prefer bgt. And what danny's saying isn't entirely true. Ok, it doesn't have graphics for seriously. Audio, game. Its sort of in the name, isn't it? I think the reason danny's not a big fan of it is because of its serialisation, which, I will agree, is difficult to grasp. I have, however, used a variaty of languages, including PureBasic, python, PHP, html, ASP.NET, c#, and c++. They're all useful for different things. I wouldn't even consider making a low-level console applicatoin in PB, but I would in c# or c++.
So, in conclusion, I agree with tward. It doesn't matter what language you use, as long as it works.

Underworld Tech.
Accessibility from us, to you.
Visit us

2014-08-01 11:40:29

No, I didn't just ditch bgt because of its serialization. I gave it up simpply because I found some of the things I wanted to do in it wern't possible at least for me, i'm not saying for everyone. And grafics was only a very small part of that reason. But I do agree with everyone here. Its your choice, whatever programming language you use, whatever works for you. While we are on the subject of c++, I gave it ago but found it to be too complex for me. The same isn't true for visual basic 6, in fact I managed to develop quite a few test apps with it, but after a while I just couldn't stand the language itself and whent back to pb.

Check out the new reality software site. http://realitysoftware.noip.us

2014-08-06 17:58:31

I find that the VB6 IDE just doesn't work out for me. Sure, I've used .NET as well, but that's different. In C/C++, you have to include headers to do even the simplest operations, while in PB you hardly ever need to include things. Its all ready for use.
In C/C+: Hello World is:
C:
#include <stdio.h>
int main()
{
printf ("Hello world! \n");
return 0;
}
That's like writing the entire stdio.h file in your C file and then using printf. It's just too much code.
With PB, a hello world is:
OpenConsole()
PrintN ("Hello world!")
Input()
CloseConsole()
Its a lot simpler, see? No inclusion of a file probably named "pbstdio.pbi" or "pbcio.pbi". It's all included automatically by the compiler. The only time you need to include things is if someones made an external include file which adds more functions to PB than it already has. It's got 80 libraries with over 400 functions builtin. This is mainly the main reason I like PB. It's got everything I need.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2014-08-06 18:59:35

Hi all,
I just looked at PureBasic, because I have some ideas that are not games that I'd like to make, especially for Mac. I know that I can't publish my PB apps to the store, but I'd just make them freely available on my website.
The problem I have is, do we really have to create forms (windows) manually when the sighted have it easier with the form designer? Heck, I have issues with visualizing levels when I want to design something in BGT. Plus, Dannie, do you use the PB IDE or do you just write it Notepad? A lot of the features in the app I could see like goto is great but what about syntax hi lighting, etc? a ton of those features I don't think would be useful. True, screen readers can speak colors of a word but does that help in this instance?
Ah, I love the "Show_game_window" function in BGT because I don't have to worry about a window size. I took a Visual Basic class online once and the teacher couldn't even find an alternative way to create the window for his first program, so he's said something along the lines of "Figure it out and get back to me." Gosh I hate that. It was the same thing with my last computer teacher, but yeah. Don't give me the answer but give me a goal with little help if its pretty obvious I'm struggling or if I ask for it.
How does a blind person create Windows for GUIs using the editor? If BGT had an IDE I'm pretty sure a ton of people would be using it and Philip would still be asking for money.

2014-08-06 20:13:39

Regarding different languages:

C++ is a lower level language. therefore including headers etc is going to be standard. C++ is basically entirely configurable. You don't have to use the stdlib, you could create one entirely yourself (good luck).


Using pure basic, yes you can create a GUI. See the examples in the examples directory.

Deep in the human unconscious is a pervasive need for a logical universe that makes sense. But the real universe is always one step beyond logic.

2014-08-06 20:15:46

@Ethin, I completely agree. You got a thumbs up

@Orin, as far as I know, the function you'd best want to use for games would be open screen, and it'd be like this:

InitSprite()
OpenScreen(640, 480, 16, "screen name")

  As for windows, you will need sighted assistance with that. You don't nesesarily have to use the visual form designer, you can design it with code.

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2014-08-06 21:53:02

The #include directive doesn't include an entire library, it only includes a header file. The header file consists of prototypes and variables. Really, "Hello world" is the simplest program because it dedicates all the actual printing functionality to printf, which is actually a very complex C library routine.

As to IDEs, IMHO Windows users have it bad, and Apple users have it better (but not great). So far, it seems your best option for self-built UIs is to stick with WinForms and use XML. I don't know of an easier way. For writing C/C++ you invariably need help visually placing objects, by coordinate, and then you build your resources by hand using IDL (you probably also need artwork to make it look really pretty). It sucks, but it is what it is.

Just myself, as usual.

2014-08-06 23:34:25

Here is the documentation entry for OpenScreen:
OpenScreen()
Syntax
Result = OpenScreen(Width, Height, Depth, Title$ [, FlipMode [, RefreshRate]])
Description
Opens a new screen according to the specified 'Width', 'Height' and 'Depth'. InitSprite() has to be called successfully before using this command. The opened screen is created with 2 video buffers to allow double buffering, especially useful for games. The buffers can be manipulated with the FlipBuffers() function.
Parameters
Width, Height
The screen resolution, in pixels. The specified resolution has to be supported or the screen won't be created. ExamineScreenModes() can be used to get a full list of supported resolution.
Depth
It can be one of the following values:
  16: 65000 colors, fixed palette
  24: 16 Mo colors, fixed palette
  32: 16 Mo colors, faster than 24-bit mode, allows alpha blending
Title$
The title for the application which will be displayed when switching back to the desktop. (Windows only). It will be displayed in the taskbar, so it's recommended to use a title related to the application name.
FlipMode (optional)
Sets the screen synchronization methods used when flipping buffers (also known as 'Vertical blank synchronization'). It can have one of the following values:
   #PB_Screen_NoSynchronization   : disable synchronization
   #PB_Screen_WaitSynchronization : enable synchronization (default value)
   #PB_Screen_SmartSynchronization: enable synchronization, with a CPU saver routine when the program doesn't consume
                                    all the CPU time (full screen mode only)
Waiting for the screen synchronization allows the flip to be perfect (no 'tearing' or other visible artifacts) because the flip is performed when the screen has been fully drawn (and when the screen spot is outside of visible screen area). This also link the flip frequence to the actual screen refresh, ie: for 60Hz screen it could have at most 60 flip per seconds, etc.
RefreshRate (optional)
Set the refresh rate (in Hz) for the new screen. If it can't be handled, then OpenScreen() will fail. ExamineScreenModes() can be used to get a full list of supported refresh rates.
Note: on Windows, the refresh rate could be locked or forced by the video card drivers, so it could be inaccurate.
Return value
Nonzero if the screen has been successfully opened, zero otherwise.
Remarks
The Requester functions cannot be used on screens created with OpenScreen.

To open a screen area on a regular window, see OpenWindowedScreen().
See Also
OpenWindowedScreen(), FlipBuffers()
Supported OS
All
I could print the docs for OpenWindowedScreen(), but I don't want to.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2014-08-07 01:59:49

You might not need sighted assistance. You might want to for the end product, but.

A number of GUI libraries have support for containers that automatically lay out controls within them. for example the .net libraries, such as microsoft's windows forms thing, have flow layout panels and table layout. A table layout would let you put controls within table cells to form a grid obviously. A flow layout panel will move the next control to the nearest available space (configurable).

Wx wigits has a similar feature, but table layout panel is renamed to grid sizer etc.

Deep in the human unconscious is a pervasive need for a logical universe that makes sense. But the real universe is always one step beyond logic.

2014-08-07 19:41:22

Hi,
PB 5.2 and up has a Dialog library that allows you to open windows and add controls via an xml file. The xml library can be used to generate this xml file in memory, on the fly.

Rob

----------
Robjoy, AKA Erion
Visit my site for all the things I do and to contact me.
You can also stop by for a slice of Pi

2014-08-07 23:48:06

I always have problems with openscreen when it comes to other platforms then windows. No matter what screen resolution ethin and I use the screen refuses to come up. Any help on that would be grate because ethin and I are intrested in making our games cross platform.

Check out the new reality software site. http://realitysoftware.noip.us

2014-08-13 01:15:29

@ Stewie, I don't like .NET because it can be easily disassembled. For instance, I built a registration system in VB.NET, and I am able to disassemble it with the following command:
C:\Users\Ethin\Documents\Visual Studio 2013\Projects\RGAUI\RGAUI\bin\Debug>ildasm rgaui.exe
Of course, I can obfuscate the code, but obfuscators cost lots of money, and its just not worth it. Plus, MSIL is very easy to read.
Example: keyrwzrd : void():
.method private instance void  keyrwzrd() cil managed
{
  // Code size       548 (0x224)
  .maxstack  5
  .locals init ([0] valuetype [System.Windows.Forms]System.Windows.Forms.DialogResult correct,
           [1] string email,
           [2] class [mscorlib]System.Random Generator,
           [3] string name,
           [4] string oldkey,
           [5] string oldpidn,
           [6] string phone,
           [7] int32 pidn,
           [8] string pnames,
           [9] string[] VB$t_array$S0,
           [10] bool VB$CG$t_bool$S0)
  IL_0000:  nop
  IL_0001:  newobj     instance void [mscorlib]System.Random::.ctor()
  IL_0006:  stloc.2
  IL_0007:  ldloc.2
  IL_0008:  ldc.i4     0x3e8
  IL_000d:  ldc.i4     0x270f
  IL_0012:  callvirt   instance int32 [mscorlib]System.Random::Next(int32,
                                                                    int32)
  IL_0017:  stloc.s    pidn
  IL_0019:  ldstr      "Enter the name of the person who the product will "
  + "be registered to: "
  IL_001e:  ldstr      "Key Replacement Request Wizard"
  IL_0023:  ldstr      ""
  IL_0028:  ldc.i4.m1
  IL_0029:  ldc.i4.m1
  IL_002a:  call       string [Microsoft.VisualBasic]Microsoft.VisualBasic.Interaction::InputBox(string,
                                                                                                 string,
                                                                                                 string,
                                                                                                 int32,
                                                                                                 int32)
  IL_002f:  stloc.3
  IL_0030:  ldstr      "If available, enter your old product key. It must "
  + "be exactly as was given in your email that was sent to you upon complet"
  + "ion of your order, and must match the registration name entered and the"
  + " PIDN given to you at the start of this order. Note that, if you do not"
  + " enter your old product key, a new one will have to be generated, despi"
  + "te the name entered here, even if it is in our records, and may delay t"
  + "he generation and transmission of your product key."
  IL_0035:  ldstr      "Key Replacement Request Wizard"
  IL_003a:  ldstr      ""
  IL_003f:  ldc.i4.m1
  IL_0040:  ldc.i4.m1
  IL_0041:  call       string [Microsoft.VisualBasic]Microsoft.VisualBasic.Interaction::InputBox(string,
                                                                                                 string,
                                                                                                 string,
                                                                                                 int32,
                                                                                                 int32)
  IL_0046:  stloc.s    oldkey
  IL_0048:  ldstr      "If applicable, enter the old four digit PIDN that "
  + "was used when you last ordered this product."
  IL_004d:  ldstr      "Key Replacement Request Wizard"
  IL_0052:  ldstr      ""
  IL_0057:  ldc.i4.m1
  IL_0058:  ldc.i4.m1
  IL_0059:  call       string [Microsoft.VisualBasic]Microsoft.VisualBasic.Interaction::InputBox(string,
                                                                                                 string,
                                                                                                 string,
                                                                                                 int32,
                                                                                                 int32)
  IL_005e:  stloc.s    oldpidn
  IL_0060:  ldstr      "Enter a telephone number in case we need to contac"
  + "t you: "
  IL_0065:  ldstr      "Key Replacement Request Wizard"
  IL_006a:  ldstr      ""
  IL_006f:  ldc.i4.m1
  IL_0070:  ldc.i4.m1
  IL_0071:  call       string [Microsoft.VisualBasic]Microsoft.VisualBasic.Interaction::InputBox(string,
                                                                                                 string,
                                                                                                 string,
                                                                                                 int32,
                                                                                                 int32)
  IL_0076:  stloc.s    phone
  IL_0078:  ldstr      "Enter your e-mail address."
  IL_007d:  ldstr      "Key Replacement Request Wizard"
  IL_0082:  ldstr      ""
  IL_0087:  ldc.i4.m1
  IL_0088:  ldc.i4.m1
  IL_0089:  call       string [Microsoft.VisualBasic]Microsoft.VisualBasic.Interaction::InputBox(string,
                                                                                                 string,
                                                                                                 string,
                                                                                                 int32,
                                                                                                 int32)
  IL_008e:  stloc.1
  IL_008f:  ldstr      "Enter the product names that you wish to order, e."
  + "g.: Snow Race. Separate them with commas: "
  IL_0094:  ldstr      "Key Replacement Request Wizard"
  IL_0099:  ldstr      ""
  IL_009e:  ldc.i4.m1
  IL_009f:  ldc.i4.m1
  IL_00a0:  call       string [Microsoft.VisualBasic]Microsoft.VisualBasic.Interaction::InputBox(string,
                                                                                                 string,
                                                                                                 string,
                                                                                                 int32,
                                                                                                 int32)
  IL_00a5:  stloc.s    pnames
  IL_00a7:  ldc.i4.s   15
  IL_00a9:  newarr     [mscorlib]System.String
  IL_00ae:  stloc.s    VB$t_array$S0
  IL_00b0:  ldloc.s    VB$t_array$S0
  IL_00b2:  ldc.i4.0
  IL_00b3:  ldstr      "Is this information correct\? \r\nKey replacement req"
  + "uest\r\nRegistered user: \r\n"
  IL_00b8:  stelem.ref
  IL_00b9:  nop
  IL_00ba:  ldloc.s    VB$t_array$S0
  IL_00bc:  ldc.i4.1
  IL_00bd:  ldloc.3
  IL_00be:  stelem.ref
  IL_00bf:  nop
  IL_00c0:  ldloc.s    VB$t_array$S0
  IL_00c2:  ldc.i4.2
  IL_00c3:  ldstr      "\r\nOld product key: \r\n"
  IL_00c8:  stelem.ref
  IL_00c9:  nop
  IL_00ca:  ldloc.s    VB$t_array$S0
  IL_00cc:  ldc.i4.3
  IL_00cd:  ldloc.s    oldkey
  IL_00cf:  stelem.ref
  IL_00d0:  nop
  IL_00d1:  ldloc.s    VB$t_array$S0
  IL_00d3:  ldc.i4.4
  IL_00d4:  ldstr      "\r\nOld PIDN: \r\n"
  IL_00d9:  stelem.ref
  IL_00da:  nop
  IL_00db:  ldloc.s    VB$t_array$S0
  IL_00dd:  ldc.i4.5
  IL_00de:  ldloc.s    oldpidn
  IL_00e0:  stelem.ref
  IL_00e1:  nop
  IL_00e2:  ldloc.s    VB$t_array$S0
  IL_00e4:  ldc.i4.6
  IL_00e5:  ldstr      "\r\nPhone number: \r\n"
  IL_00ea:  stelem.ref
  IL_00eb:  nop
  IL_00ec:  ldloc.s    VB$t_array$S0
  IL_00ee:  ldc.i4.7
  IL_00ef:  ldloc.s    phone
  IL_00f1:  stelem.ref
  IL_00f2:  nop
  IL_00f3:  ldloc.s    VB$t_array$S0
  IL_00f5:  ldc.i4.8
  IL_00f6:  ldstr      "\r\nEmail address: \r\n"
  IL_00fb:  stelem.ref
  IL_00fc:  nop
  IL_00fd:  ldloc.s    VB$t_array$S0
  IL_00ff:  ldc.i4.s   9
  IL_0101:  ldloc.1
  IL_0102:  stelem.ref
  IL_0103:  nop
  IL_0104:  ldloc.s    VB$t_array$S0
  IL_0106:  ldc.i4.s   10
  IL_0108:  ldstr      "\r\nProducts requested: \r\n"
  IL_010d:  stelem.ref
  IL_010e:  nop
  IL_010f:  ldloc.s    VB$t_array$S0
  IL_0111:  ldc.i4.s   11
  IL_0113:  ldloc.s    pnames
  IL_0115:  stelem.ref
  IL_0116:  nop
  IL_0117:  ldloc.s    VB$t_array$S0
  IL_0119:  ldc.i4.s   12
  IL_011b:  ldstr      "\r\nPIDN: \r\n"
  IL_0120:  stelem.ref
  IL_0121:  nop
  IL_0122:  ldloc.s    VB$t_array$S0
  IL_0124:  ldc.i4.s   13
  IL_0126:  ldloc.s    pidn
  IL_0128:  call       string [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.Conversions::ToString(int32)
  IL_012d:  stelem.ref
  IL_012e:  nop
  IL_012f:  ldloc.s    VB$t_array$S0
  IL_0131:  ldc.i4.s   14
  IL_0133:  ldstr      "\r\nTo confirm this, click yes. Otherwise, click no "
  + "to start over again."
  IL_0138:  stelem.ref
  IL_0139:  nop
  IL_013a:  ldloc.s    VB$t_array$S0
  IL_013c:  call       string [mscorlib]System.String::Concat(string[])
  IL_0141:  ldstr      "Key Replacement Request Wizard"
  IL_0146:  ldc.i4.4
  IL_0147:  call       valuetype [System.Windows.Forms]System.Windows.Forms.DialogResult [System.Windows.Forms]System.Windows.Forms.MessageBox::Show(string,
                                                                                                                                                     string,
                                                                                                                                                     valuetype [System.Windows.Forms]System.Windows.Forms.MessageBoxButtons)
  IL_014c:  stloc.0
  IL_014d:  ldloc.0
  IL_014e:  ldc.i4.6
  IL_014f:  ceq
  IL_0151:  stloc.s    VB$CG$t_bool$S0
  IL_0153:  ldloc.s    VB$CG$t_bool$S0
  IL_0155:  brfalse    IL_0219
  IL_015a:  call       class RGAUI.My.MyComputer RGAUI.My.MyProject::get_Computer()
  IL_015f:  callvirt   instance class [Microsoft.VisualBasic]Microsoft.VisualBasic.MyServices.ClipboardProxy [Microsoft.VisualBasic]Microsoft.VisualBasic.Devices.Computer::get_Clipboard()
  IL_0164:  ldc.i4.s   15
  IL_0166:  newarr     [mscorlib]System.String
  IL_016b:  stloc.s    VB$t_array$S0
  IL_016d:  ldloc.s    VB$t_array$S0
  IL_016f:  ldc.i4.0
  IL_0170:  ldstr      "Key replacement request\r\nRegistered user: \r\n"
  IL_0175:  stelem.ref
  IL_0176:  nop
  IL_0177:  ldloc.s    VB$t_array$S0
  IL_0179:  ldc.i4.1
  IL_017a:  ldloc.3
  IL_017b:  stelem.ref
  IL_017c:  nop
  IL_017d:  ldloc.s    VB$t_array$S0
  IL_017f:  ldc.i4.2
  IL_0180:  ldstr      "\r\nOld product key: \r\n"
  IL_0185:  stelem.ref
  IL_0186:  nop
  IL_0187:  ldloc.s    VB$t_array$S0
  IL_0189:  ldc.i4.3
  IL_018a:  ldloc.s    oldkey
  IL_018c:  stelem.ref
  IL_018d:  nop
  IL_018e:  ldloc.s    VB$t_array$S0
  IL_0190:  ldc.i4.4
  IL_0191:  ldstr      "\r\nOld PIDN: \r\n"
  IL_0196:  stelem.ref
  IL_0197:  nop
  IL_0198:  ldloc.s    VB$t_array$S0
  IL_019a:  ldc.i4.5
  IL_019b:  ldloc.s    oldpidn
  IL_019d:  stelem.ref
  IL_019e:  nop
  IL_019f:  ldloc.s    VB$t_array$S0
  IL_01a1:  ldc.i4.6
  IL_01a2:  ldstr      "\r\nPhone number: \r\n"
  IL_01a7:  stelem.ref
  IL_01a8:  nop
  IL_01a9:  ldloc.s    VB$t_array$S0
  IL_01ab:  ldc.i4.7
  IL_01ac:  ldloc.s    phone
  IL_01ae:  stelem.ref
  IL_01af:  nop
  IL_01b0:  ldloc.s    VB$t_array$S0
  IL_01b2:  ldc.i4.8
  IL_01b3:  ldstr      "\r\nEmail address: \r\n"
  IL_01b8:  stelem.ref
  IL_01b9:  nop
  IL_01ba:  ldloc.s    VB$t_array$S0
  IL_01bc:  ldc.i4.s   9
  IL_01be:  ldloc.1
  IL_01bf:  stelem.ref
  IL_01c0:  nop
  IL_01c1:  ldloc.s    VB$t_array$S0
  IL_01c3:  ldc.i4.s   10
  IL_01c5:  ldstr      "\r\nProducts requested: \r\n"
  IL_01ca:  stelem.ref
  IL_01cb:  nop
  IL_01cc:  ldloc.s    VB$t_array$S0
  IL_01ce:  ldc.i4.s   11
  IL_01d0:  ldloc.s    pnames
  IL_01d2:  stelem.ref
  IL_01d3:  nop
  IL_01d4:  ldloc.s    VB$t_array$S0
  IL_01d6:  ldc.i4.s   12
  IL_01d8:  ldstr      "\r\nPIDN: \r\n"
  IL_01dd:  stelem.ref
  IL_01de:  nop
  IL_01df:  ldloc.s    VB$t_array$S0
  IL_01e1:  ldc.i4.s   13
  IL_01e3:  ldloc.s    pidn
  IL_01e5:  call       string [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.Conversions::ToString(int32)
  IL_01ea:  stelem.ref
  IL_01eb:  nop
  IL_01ec:  ldloc.s    VB$t_array$S0
  IL_01ee:  ldc.i4.s   14
  IL_01f0:  ldstr      "\r\nContact information: \r\nPhone: 701-509-0166\r\nEmai"
  + "l: [email protected]; [email protected]"
  IL_01f5:  stelem.ref
  IL_01f6:  nop
  IL_01f7:  ldloc.s    VB$t_array$S0
  IL_01f9:  call       string [mscorlib]System.String::Concat(string[])
  IL_01fe:  callvirt   instance void [Microsoft.VisualBasic]Microsoft.VisualBasic.MyServices.ClipboardProxy::SetText(string)
  IL_0203:  nop
  IL_0204:  ldstr      "The information you have entered has been successf"
  + "ully copied to the clipboard. You may now transmit the information that"
  + " you have entered over the internet via email to [email protected]"
  + "m or [email protected]. If you wish to purchase a different produc"
  + "t, you may either use the ordering wizard or visit the store at http://"
  + "realitygaming.no-ip.net/store. Thank you for purchasing a reality gamin"
  + "g product! Press enter to continue."
  IL_0209:  ldstr      "Key replacement request completed!"
  IL_020e:  ldc.i4.0
  IL_020f:  ldc.i4.s   64
  IL_0211:  call       valuetype [System.Windows.Forms]System.Windows.Forms.DialogResult [System.Windows.Forms]System.Windows.Forms.MessageBox::Show(string,
                                                                                                                                                     string,
                                                                                                                                                     valuetype [System.Windows.Forms]System.Windows.Forms.MessageBoxButtons,
                                                                                                                                                     valuetype [System.Windows.Forms]System.Windows.Forms.MessageBoxIcon)
  IL_0216:  pop
  IL_0217:  br.s       IL_0221
  IL_0219:  nop
  IL_021a:  ldarg.0
  IL_021b:  callvirt   instance void [System.Windows.Forms]System.Windows.Forms.Form::Close()
  IL_0220:  nop
  IL_0221:  nop
  IL_0222:  nop
  IL_0223:  ret
} // end of method Form1::keyrwzrd

This translates to:
    Private Sub keyrwzrd()
        Dim Generator As System.Random = New System.Random()
        Dim pidn = Generator.Next(1000, 9999)
        Dim name = InputBox("Enter the name of the person who the product will be registered to: ", "Key Replacement Request Wizard")
        Dim oldkey = InputBox("If available, enter your old product key. It must be exactly as was given in your email that was sent to you upon completion of your order, and must match the registration name entered and the PIDN given to you at the start of this order. Note that, if you do not enter your old product key, a new one will have to be generated, despite the name entered here, even if it is in our records, and may delay the generation and transmission of your product key.", "Key Replacement Request Wizard")
        Dim oldpidn = InputBox("If applicable, enter the old four digit PIDN that was used when you last ordered this product.", "Key Replacement Request Wizard")
        Dim phone = InputBox("Enter a telephone number in case we need to contact you: ", "Key Replacement Request Wizard")
        Dim email = InputBox("Enter your e-mail address.", "Key Replacement Request Wizard")
        Dim pnames = InputBox("Enter the product names that you wish to order, e.g.: Snow Race. Separate them with commas: ", "Key Replacement Request Wizard")
        Dim correct = MessageBox.Show("Is this information correct? " & vbCrLf & "Key replacement request" & vbCrLf & "Registered user: " & vbCrLf & name & vbCrLf & "Old product key: " & vbCrLf & oldkey & vbCrLf & "Old PIDN: " & vbCrLf & oldpidn & vbCrLf & "Phone number: " & vbCrLf & phone & vbCrLf & "Email address: " & vbCrLf & email & vbCrLf & "Products requested: " & vbCrLf & pnames & vbCrLf & "PIDN: " & vbCrLf & pidn & vbCrLf & "To confirm this, click yes. Otherwise, click no to start over again.", "Key Replacement Request Wizard", MessageBoxButtons.YesNo)
        If correct = Windows.Forms.DialogResult.Yes Then
            My.Computer.Clipboard.SetText("Key replacement request" & vbCrLf & "Registered user: " & vbCrLf & name & vbCrLf & "Old product key: " & vbCrLf & oldkey & vbCrLf & "Old PIDN: " & vbCrLf & oldpidn & vbCrLf & "Phone number: " & vbCrLf & phone & vbCrLf & "Email address: " & vbCrLf & email & vbCrLf & "Products requested: " & vbCrLf & pnames & vbCrLf & "PIDN: " & vbCrLf & pidn & vbCrLf & "Contact information: " & vbCrLf & "Phone: 701-509-0166" & vbCrLf & "Email: [email protected]; [email protected]")
            MessageBox.Show("The information you have entered has been successfully copied to the clipboard. You may now transmit the information that you have entered over the internet via email to [email protected] or [email protected]. If you wish to purchase a different product, you may either use the ordering wizard or visit the store at http://realitygaming.no-ip.net/store. Thank you for purchasing a reality gaming product! Press enter to continue.", "Key replacement request completed!", MessageBoxButtons.OK, MessageBoxIcon.Information)
        Else
            Me.Close()
        End If

    End Sub
Of course, I won't, ever be using that again. We've got something else i mind. (No, don't raise your eyebrows in question like that! Your not getting the code for the new registration system!)
So, a good hint to all of you, do not use Microsoft's .NET languages if you can avoid it.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2014-08-13 04:40:33

Googling, I see at least 2 free .net obfuscators.
And as for other languages, like C++, it's also very easy there in a lot of cases.  Here's the general picture.  While this is a bit harder, it's only a bit; only one person need crack it, however:
1. Start your program under CDB, the Microsoft command line debugger.
2. Fix the windows symbol path (.symfix), enable line loading (.lines, may work in some cases if the developer is an idiot and embedded the debug symbols into the program), type g.
3. Do whatever is necessary to get a demo over message, as this is a point in the program where the program has just made a check for activation.
4. return to the debugger.  Press ctrl+c.
This is where it gets a bit tricky.  The command of interest is k, to examine the stack.  Also, l+* (if you can get lines) and l-* (to turn it back off so you see assembly again).  Specifically what you get from here depends on how the program was compiled.  You can skip any of the windows functions.  You're looking for the last few frames in the executable.  If you're fortunate, and you are in a lot of cases, you get function names; if not, it's a bit of guess and check.  You can disassemble with the debugger, though I've not yet had occasion to work at that level.  You're looking for something that looks like an if statement, i.e. uses the conditional jump commands.  Fortunately for us, we have one additional piece of information; we can allow the program to exit and see what happens, stepping through at the assembly instruction level.  Whether this is helpful depends a lot, and it's case-by-case.  But it may be possible to just delete a call to exit.  You're rarely going on no information at all; you usually have at least a little bit.
Finally, you patch the check to always be true, remove the check, or otherwise interfere with the check.  I'd suggest putting it in the activation checking function so that if the program checks elsewhere, it'll still work out.
I have not done this because why bother?  I only know how because I've been working with Cdb and similar for a good while now.  But the truth is that all software cracking is a why bother?  There is always, always someone smart enough to crack your software.  It doesn't matter what you use.  I've never done a C++ crack, but it'd take anywhere from an hour to a day regardless; depends on how much information I can extract and how quickly I can find guides.  Someone who has probably has it down to a science, has written custom tools, etc...and can do it in an hour or three.  I've seen it done a couple times, i.e. BGT music/sound extraction (yes, really).  It doesn't matter.  if someone wishes to crack it, they will.  And it only takes one for everyone.  You're not fighting everyone.  You're fighting the smartest programmer who would find it worthwhile to crack your software.  Since you don't know who this is, best to think "smartest programmer I know of anywhere" instead.  Even being tangentially aware of a way to crack the software means there is someone out there who can.

My Blog
Twitter: @ajhicks1992

2014-08-13 06:07:39 (edited by Sebby 2014-08-13 06:09:41)

Yep, MS debugging tools are a glorious gift from God. smile

Worth pointing out, too: CheatEngine has a cutesy little debugger embedded which is a little bit fiddly, but quite usable.

Just myself, as usual.