Hacking C programing

  • Thread starter Thread starter sightlight
  • Start date Start date
  • Views Views 11,060
  • Replies Replies 96
  • Likes Likes 1
I don't understand what that is for. I would like a C++ Realtime compiler or in C. Thise are the only programing languages that ever matter.. or do you guys know any other programing
language that has this?

Real programming isn't like scratch, or like doing HTML with a WYSIWYG editor, real programming isn't like "drag 'n' drop functionality" it's write it yourself, thus there cannot be something that displays every change you make to it, the one exception would be windows forms, they have an editor with drag 'n' drop of the controls to design the form, other then that tho there is nothing that'll show you exactly how your code runs...

There is a possibility to make something called a "unit test" this will basically run the code for you to test out each of the functions in each possible situation (that you created yourself)

If you really want to get into programming start of with something that is fairly easy to understand, Java/C# are good examples, you don't have difficult names of the built in functions such as "printf();" what does that tell you compared to "Console.Write();"?

When i first started programming for real i did it with C#, been working with C# for about 2½ years now and started moving over to C/C++ which are mostly the same (there are a few things that differ, but most of the commonly used functions and such are the same between both of them)

Before i started programming for real tho i spent some time about 9 years ago just messing around with computers, at the time i didn't know alot about computers, i just wanted to learn how to hack stuff... well, i spent some time learning basics of C++, Java, VB.Net and many others, just didn't use the knowledge any... didn't fully understand anything i was doing and such... but hey, now that i started off with C# instead it gave me a boost in knowing what i'm doing by having an easy to understand set of functions to begin with :)

Scratch i would defenietly NOT call programming, since all it is (from what i've seen in their video) is drag 'n' drop a few functions and voila, it's running... that's not even close to how programming really works...

Oh... also, when i do make programs i always use Visual Studio (for C/C++/C# which is what i use most of the time) and Eclipse/NetBeans for Java
 
Basically C++ development is different in many respects to HTML, but that's just how it works and there are plenty of tools to help with it. Just the live preview thing isn't feasible.
HTML editors aren't the only things with previews, VB and .NET have had them forever (which is why Visual Basic was called Visual Basic). They're examples of statically compiled languages with design previews. Visual C++ also has a form designer, so you can live preview the look of your application before compilation. It's not the language that is important with regards to this, it's the target platform. Because these are all designed to run on Windows, most of the work drawing the form can be done for you using the visual editor. It's not just Windows, there's visual Java IDEs, Qt and others, people have made 3D game creators that compile C++ and do all the rendering. It isn't possible with the 3DS because nobody has made a visual editor―and it's unlikely that one will be made―that can do most of the rendering work for you.
 
The only thing you'll get that's close to that is the likes of Unity3D and GameMaker with basic WYSIWYG editors. But obviously they don't export to the 3DS, and if they did, you'd have to pay huge licensing fees and wouldn't work with homebrew loaders most likely. Really what us coders do is just mentally visualise what we're creating while we're typing it. If we're not sure exactly what something did, that's when we compile and test. With something like "DrawSprite(mySprite, 20, 30)" though, we know where it is and we can mentally visualise it pretty easily relatively to other objects.

If you have no coding experience however, which from the sounds of it you don't, then I strongly recommend downloading Eclipse and start learning some Java. Avoid game-programming until you get basic programming experience. Java in Eclipse is great because it has so much built-in error checking before you even compile and run your code, and it will provide very good suggestions to help fix your code so that it compiles. Even when you're running your code, all of the exceptions you get are very descriptive so it'll only take a few minutes to fix your code. All of the programming concepts you learn in Java are also most likely common with the majority of programming languages out there, and it really doesn't take that long at all to learn the basics of a new language if you're proficient with Java.

Jumping into C++ from the get go is going to just confuse you. The error messages that C++ can give are the most cryptic things ever. When I first tried learning programming, I started learning at home by myself using a C++ book, and it just confused me and frustrated me whenever I got an error and the book couldn't help explain it. When I went into college however, we started with Java, and everything just started to make perfect sense even though the lecturer wasn't that great. Once we were experienced with Java, that's when we started learning C++. The additional concepts such as pointers and references can also be very confusing for newbies, especially if they're confusing for experienced coders. I do think C++ is something that all software developers need to learn at some point, but it's not the best place to start at all.

Just to give you some background on myself, I'm a software developer with a 4-year software development degree (with Games Development add-on modules), currently working with Ericsson.
 
I started with Java, but that really hurt me later on trying to move on to C++. It holds your hands too much. You're better off learning a variant of Lisp called Dr.Racket (http://racket-lang.org/) and the guide at http://www.htdp.org . The easiest one I've dealt with was Visual Basic, but if you're looking to do anything other than native windows applications, you're out of luck.

The program you are describing sounds like making flash games or maybe GameMaker (http://www.yoyogames.com/gamemaker/) which is not going to help you learn anything.
 
I started with Java, but that really hurt me later on trying to move on to C++. It holds your hands too much.

I'm curious, explain what about Java is holding hands too much, and why that's bad for an absolute beginner to programming? o.O
 
HTML editors aren't the only things with previews, VB and .NET have had them forever (which is why Visual Basic was called Visual Basic). They're examples of statically compiled languages with design previews. Visual C++ also has a form designer, so you can live preview the look of your application before compilation. It's not the language that is important with regards to this, it's the target platform. Because these are all designed to run on Windows, most of the work drawing the form can be done for you using the visual editor. It's not just Windows, there's visual Java IDEs, Qt and others, people have made 3D game creators that compile C++ and do all the rendering. It isn't possible with the 3DS because nobody has made a visual editor―and it's unlikely that one will be made―that can do most of the rendering work for you.
UI design might as well be like previewing your resources in photoshop cobbled together in the right place before splitting them into the individual parts to use.
 
I remember a few years ago seeing a video about some program for making games. it had a realtime view and allowed you to do rewinds and frame by frame. I remember in the video where they was demonstration of a platformer and kept changing a variable too see how the jumping physics changed in real time. wish i remember what it was called.
 
UI design might as well be like previewing your resources in photoshop cobbled together in the right place before splitting them into the individual parts to use.
Whatever works best for the individual, right? ;) Personally, I'd rather just code the damn thing myself and use an emulator to debug.
 
  • Like
Reactions: Rydian
Why dont you just step-by-step debug your C code? Most developing softwares has this feature. And you could always compile your code to test it out :) Whats the problem?
 
If you really want to get into programming start of with something that is fairly easy to understand, Java/C# are good examples, you don't have difficult names of the built in functions such as "printf();" what does that tell you compared to "Console.Write();"?
printf = print formatted, allows you to format the text to be printed out e.g. inserting tabs, variables, new lines etc. It's also less code to type "printf();" than "Console.Write();" ;) (although if you use an IDE with auto completion, that's not much issue I guess).
So I can get realtime compiler with C or C++ on visual studio?
No. There is no such thing and probably never will be. There is a C interpreter, but it's still probably not really what you're looking for. (It is interactive though) [For the record, here's a link: http://root.cern.ch/drupal/content/cling] There is no Windows distribution, although it can be built for Windows. (Windows build instructions here: http://solarianprogrammer.com/2012/09/02/building-cling-cpp-interpreter-windows/)
 
I'm curious, explain what about Java is holding hands too much, and why that's bad for an absolute beginner to programming? o.O
Java is a higher level language and hides a ton of things like pointers and memory management from the programmer, which for some people can become a huge stumbling block later in their language learning. It took me two years to finally get the concepts down that many of my peers jumped right into.
 
I've thought about making a game programming environment where the programmer can rapidly make changes and see them reflected in the game instantly... I could extend a game I'm developing to include such a feature (since the game is mostly written in Lua and only uses C for processor intensive operations, e.g. vector graphics), but it'd be a waste of time since it's just me working on it :). Using a fast scripting language, such as Lua (with LuaJIT) or JavaScript (with V8) or even C# (with Mono), it wouldn't be too difficult to implement, just difficult to properly design.

Relevant to this topic is Light Table, which is a very interesting "IDE" that uses a similar concept. Unity3D allows you to edit source code and recompile it midgame, but it's a lengthier process than you'd expect...

As far as using C/C++ in such a way outlined by the original poster, it's not feasible. C and C++ are, at their heart, native languages and require compilation. Even an optimized interpreter wouldn't be effective. To properly allow and edit-and-continue system, you must be able to sandbox the individual parts of the game and be able to easily avoid "global state."
 
Why dont you just wait till a devkit gets made (like Palib) and learn that? In the mean time, try practicing with things like mods (most games use Lua or Javascript) or simple android apps (its either Java or Javascript, I cant be bothered to look now), hell even give development on the DS a try (they have GameMaker-like programs for it now and if you really want some coding Palib is there too).
 
Java is a higher level language and hides a ton of things like pointers and memory management from the programmer, which for some people can become a huge stumbling block later in their language learning. It took me two years to finally get the concepts down that many of my peers jumped right into.

That's a good thing that Java abstracts that though. Newbies shouldn't have to deal with pointers or memory management when they don't even understand basic control structures. And considering how crucial pointers and references are to even do some basics in C++, it's just going to overload a newbie's mind and will probably cause them to give up very quickly. My peers and managers consider me to be an awesome coder, and I was almost going to give up on programming when I tried learning C++ first by myself.

Pointers are just a naturally confusing topic. Some people quickly get it, most don't. It really depends on how it's explained to the person, but I definitely would not see pointers as a reason to not start off with Java. If you don't understand what a for loop is, or what a function is, there's no way you're going to be able to understand pointers and memory. Especially if you get an error, a beginner coder is not going to understand the errors and is going to get absolutely frustrated. But do remember that Java actually does involve pointers when it comes to explaining why objects get passed by reference and primitives get passed by value, or why you can't use double equals with strings.

Although I do believe people should learn C++ eventually, we shouldn't tell newbies to jump into the deep end, and make them waste hours Google searching for basic errors. Honestly, I just can't figure out how Java could be to blame. Some people get pointers, some don't. Some people think it takes ages to learn a new programming language, whereas to others it doesn't. Only took me a week to understand pointers coming from a Java background, while it took others in my course a bit longer. I still think languages like Python are annoying because of its syntax, whereas others love it.

It all depends on the person, but the learning curve for Java is significantly less steep thanks to the huge support it has.
 
@peps, and a bit offtopic

If you think the python syntax is annoying, try taking a look at PERL


And I agree that JAVA does a bit more handholding than C++ does (as in none)
 

Site & Scene News

Popular threads in this forum