• As part of the relaunch of Skullheart, ALL previous threads have been archived. You can find them at the bottom of the forum in the Archives (2021) section. The archives are locked, so please use the new forum sections to create new discussion threads.

Learning to Program (because that's really important) (altered thread name)

You may as well - the pure programming discussion seems a little thin anyway.
 
  • Like
Reactions: WrestlerGuile
I've already scoured this thread for stuff for my project, it's probably best to transition into talking about actual issues with actual projects instead of just advice on up-in-the-air plans.
 
It's probably best to transition into talking about actual issues with actual projects instead of just advice on up-in-the-air plans.

wow implying I don't have a project already how RUDE.
https://github.com/Midiman/Verde

I was actually going to inquire if anyone has implemented slopes for their platformer, because I've slightly got an idea of how I want to do it (Height maps), but I dare ask while I slap myself with implementing part of the aformentioned stuff

Seriously though, what the hell with the assumption.
 
wow implying I don't have a project already how RUDE.
https://github.com/Midiman/Verde

I was actually going to inquire if anyone has implemented slopes for their platformer, because I've slightly got an idea of how I want to do it (Height maps), but I dare ask while I slap myself with implementing part of the aformentioned stuff

Seriously though, what the hell with the assumption.

I don't think he was directing that at you.

Anyway slopes? No idea, I thought of that issue on the last platformer thingy I worked on in Unity, but it was a Classic Castlevania style platformer (a series that has never had slopes) so I didn't have to worry about it. For Unity at least, the only thought that came to mind was just to make slopes a separate kind of object that causes the player to move based on an altered vector (diagonal instead of horizontal) when they detect it underfoot.

Of course that's just for Unity and its premade collision detection. If you're making your own engine or more "from sratch" collision detection and physics, then you'd probably want to do something similar to this. I'm nowhere near that level yet though, still just a script kiddy.

Myself, after I'm done with my shmup project (I'm more just testing out design concepts right now), I was planning on making a turn based strategy using the A* Star Algorithm for pathfinding. I also bought a book on agnostic game programming algorithms, which also features tips on implementing A*. Looking forward to that.
 
I actually have read this article multiple times and have never seen the part about slopes, hark. I was reading most of the asm for Sonic 3 and Knuckles and following the Sonic Physics guide beforehand http://info.sonicretro.org/SPG:Solid_Tiles

of course when I would ask about a thing it is in plain sight. Thanks.

EDIT: For myself as a note for later, I need to make sure to peer at how OpenSurge does slopes since it has a whole gigantic tile system I can look at.

I haven't made a project where A* is relevant yet. Perhaps once all these things were fixed up I can, hah.
 
Last edited:
Do you need just linear slopes, or do you have something more complicated in mind?
 
Sort of off topic at this point, but some of the discussion from Page 1 of this thread reminded me of the PS1 video game 'Carnage Heart'. It's basically a puzzle/programming sim game where you can build and program a mech-fighter and it will then fight against other mechs based upon the "software" that you programmed for it.

anyway its my first post here so I'll dump some links, coming from the perspective of a firmware engineer - I write C and some ASM, high-level languages are for nerds :P

http://www.w3schools.com/ - useful website for quick and basic tutorials on various languages

Understand the concept of Programming Pasta - http://en.wikipedia.org/wiki/Spaghetti_code

Test-Driven Development, I actually haven't read this article but it's a common practice in industry - http://en.wikipedia.org/wiki/Test-driven_development

most importantly, if your code doesn't work, it MUST be a hardware issue...
 
Since this is being switched over to development in general, is it okay to talk about design and whatnot along with scripting/programming?
 
Do you need just linear slopes, or do you have something more complicated in mind?
I would basically care about having just linear ones, but heightmaps and what not intrigue me just so that I don't have to worry about having to retool it later.

I don't think I need anything sonic-level yet, thankfully.
 
I've been watching a lot of Handmade Hero. I'm not completely sold on Casey Muratori's insistence that object oriented features like virtual functions are almost always bad, but I'm trying to keep an open mind on his coding style, and I do find the low level, data-oriented approach to be a nice change of pace from object orientation. I'm looking forward to seeing how he'll implement things like AI and game object management. If anyone here has only used more high-level languages or language features and isn't too familiar with stuff like pointers, memory, or binary, you should totally check out his Intro to C videos.
 
Hey guys! In two days, I'm going to finally learn C++ and how to properly utilize it. I've been watching this course grinder series in preparation for this summer programming class I'm going to take. I decided to take the class because I'm learning C++ on a school computer and I can't download a thing, not even Visual C++(which is what the compucamp class is using), so I'm finally going to learn how to use it hands on rather than just taking notes upon notes!
 
Congrats!

Ugh, that reminds me, I need to catch myself back up with my lessons on Java and C++...I'm still a beginner and so much has been happening I'm falling behind...but its all for the sake of the game...
 
I'm not completely sold on Casey Muratori's insistence that object oriented features like virtual functions are almost always bad,
I will interject here and say that templating and virtualization make debugging EXPONENTIALLY harder, and from lots of experience I've learned to basically completely stay away from them when possible.

This is, uh, a very useful thing that I may or may not have personal experience with having used. Or something.
It pretty much covers everything you need in order to build a character that can run around a world and not fall through it.

It's a great resource, and it's a little sad the creators of Sonic 4 have obviously never read it.
 
This is, uh, a very useful thing that I may or may not have personal experience with having used. Or something.
It pretty much covers everything you need in order to build a character that can run around a world and not fall through it.

It's a great resource, and it's a little sad the creators of Sonic 4 have obviously never read it.
Or Sonic Boom. Or even Sonic 06. I'm starting to think that SEGA doesn't do many QAs.

EDIT: I'm so glad I read through all of that. It taught me about ensuring that your game should behave the way you imagine by going over every type of position the character should be in and how to properly lay out a stage though both art and code.
 
Last edited:
Hey guys! In two days, I'm going to finally learn C++ and how to properly utilize it. I've been watching this course grinder series in preparation for this summer programming class I'm going to take. I decided to take the class because I'm learning C++ on a school computer and I can't download a thing, not even Visual C++(which is what the compucamp class is using), so I'm finally going to learn how to use it hands on rather than just taking notes upon notes!

I don't mean to sound negative with this post at all - this is genuine advice. You started this thread nearly a year ago and are just now getting into actually learning a programming language (which is fine, life happens), but I see a lot of people say they're going to become a programming wizard and then don't even make rudimentary progress.

You need to work. It's going to feel like a grind. Everything will seem useless and irrelevant for a long time. You need to seriously sit down and finish whatever book/course/etc. you start from beginning to end and then go and flail around trying to make a bunch of programs that don't do what you want them to no matter how much you try. You're not going to 'learn' C++ two days from now, you're going to take the first few steps on a long journey, and there will be days where you'd rather play Skullgirls or watch anime or eat a bag of nails or do literally anything but stare at a screen of Courier New for another few hours, but that's how you learn.

I guess what I'm saying is that a lot of people who fall into the stop-start pattern of trying to learn programming think that it's something they can just pick up in a few days and then go on to create That Cool Project™ when in reality it's work (there's a reason that Software Engineering is a 4-year degree even without specialisation). Expect it to be hard and require a lot of persistence, and be pleased if it turns out to be easy - don't fall into the trap of approaching it the other way around.

Good luck with the course, btw. Programming really is great fun once you get into it.
 
you start from beginning to end and then go and flail around trying to make a bunch of programs that don't do what you want them to no matter how much you try.

Hey, it can be fun! My first program I wrote after finishing my first course was a random team generator for Marvel Vs Capcom 2. It even logged battle stats (which team members died, how much hp remained, time remaining, etc. )and win/lose ratio's and stuff like that!
 
snip.
I know. I took your advice on finding one source and sticking to it (for the most part) and, to me, the course grind C++ videos will help me learn exactly the language I'm looking for.

I know I can't pick this up in two days. I can learn in two days but I absolutely need practice for years. When doing something new, people have to apply both all the time, which is why I'm doing that hands-on course in a couple days. I'm just watching those videos so that I don't hit a wall of "I don't know what to do!" when something in the class comes out of left field. I promised myself, no matter what I do, I'd put 100% of myself into it, including programming.
 
snip.
Haha yeah. As someone who's been on off learning programming, specifically in Java, but also trying to learn C++ at the same time, or at least keep up with my rudimentary knowledge of it, its something that definitely takes time XD

I know. I took your advice on finding one source and sticking to it (for the most part) and, to me, the course grind C++ videos will help me learn exactly the language I'm looking for.

I know I can't pick this up in two days. I can learn in two days but I absolutely need practice for years. When doing something new, people have to apply both all the time, which is why I'm doing that hands-on course in a couple days. I'm just watching those videos so that I don't hit a wall of "I don't know what to do!" when something in the class comes out of left field. I promised myself, no matter what I do, I'd put 100% of myself into it, including programming.
This is a good outlook. However, I was once starry-eyed like this. My project, Invocation, was a silly little idea a long time ago, and even now, the coding on it that has been done in super light. Because despite all the time I've put into learning...I've yet to actually go about creating things on my own without supervision. That big project you go to make yourself, one in which you don't quite know how its all gonna fit together as you make it...its a monolithic wall. I had to take a large break from learning to program myself for awhile. As of right now, I wouldn't say I'm all that good at programming...I'd say I'm actually pretty bad. But I'm mostly self taught from videos and simple tutorials. I had other things to work out before learning this on the side.

If you say you're gonna put 100% into this, don't just go through with it and then drop it for a bit, and don't go like I'm doing. I started my own mess, so I'm gonna finish it, but since you're still starting out, make sure to pace yourself and always have some project, no matter how small, going o, so you don't lose interest, until it becomes a method of enjoyment for you instead of a hobby.
 
I finished that C++ class recently and I've had so much fun with it. One thing my teacher said was to write code on a piece of paper to practice, so, to me, the excuse of not being able to download a program that could help me is not going to work anymore. He was especially happy when I asked about classes because he explore the header and all of that. I think that's a large part of creating your own code, as he said creating class are essentially creating new data types. I know him more personally now and even teaches at a high school close to mines. Now that I've seen a small glimpse of programming, I know I have a hell of a lot ahead of me, which means that, even if I could be taught this in college, it's best to try and learn right now.
 
So, it turns out that, before yesterday, all of Course Grinder's videos have vanished, including the C++ videos I've been watching. What this means now is that...I give up. That was the only video series worth learning from and no other series matches that series' power to educate. I took actual notes on it and was planning to even take advantage of these notes. I can't program anymore because of this.

I'm just fucking around! I found a new web series that focuses on both C++ programming and videogames! That's a plus plus for me!
 
You should use jdownloader if you plan on watching tons of series' on youtube or are worried about things like that. It's super useful, of course if the thing you were watching was on youtube

I used it to keep up with Handmade Hero and grabbed all the KOF2k2um master class vids. hella $.
 
If you're just learning to program, I'd personally steer away from anything that goes too far into gamedev, at least until you can do a standard basic project like making console blackjack/poker game without any problem. That will teach you more about the basics (types, enums, functions, OOP, search/sort etc.) rather than telling you to write these specific words and you get stuff appearing on your screen.

You should use jdownloader if you plan on watching tons of series' on youtube or are worried about things like that. It's super useful, of course if the thing you were watching was on youtube

I used it to keep up with Handmade Hero and grabbed all the KOF2k2um master class vids. hella $.
I use video download helper on firefox, even though I don't really use ff anymore.
 
I would like to say, for those that are looking into development, the best thing to have is a proper toolset! SO, for those developing on Windows 7 (or newer) and starting out, heeeere's a few tips.
For C++ development on Windows, aside from using Visual Studio, I highly suggest installing and using MSYS2 https://msys2.github.io/ . MSYS2 is arguably, and at least what I find, to be the best and most current and updated command line Unix-like shell, a complete rewrite of the older MSYS and based on Cygwin, a POSIX compatibility layer, and MinGW-w64, a more actively developed and updated port of the GNU toolset than the regular MinGW, with the added benefit of 64-bit support, amongst other various improvements. Using the package manager pacman and the huge library of packages, libraries and tools that you can retrieve with it and use in the shell, makes it utterly invaluable. C++, C++ libraries for physics and other things, such as box2d, bullet, allegro, OpenGL and OpenAL... you can have python, perl, openssl, ruby, Lua, Qt... Linux tools like vim and nano, and you can use git, subversion, mercurial, ssh. Which is, I find, better than having to install everything through typical, repetitively tedious installers, or other programs you canse for like one thing (I'm looking at you, PuTTY). It's godlike.

WHEN YOU DO INSTALL IT, and this goes also for Java Development Kits, install this to the lowest branch of your harddrive as possible, i.e. "C:\\msys2\" or "C:\\Java\jdk8u72\". In addition, you should set up your workspaces for each language also close to the root of your drive, so that it's easier and quicker to access with a command-line and something like, Git. For example, my workspaces are set up as "C:\\dev\ws\***\" where *** is the name of the programming language, such as "CPP" (C++) or "Java". The ws folder I have there that keeps these folders just stands for "workspace" in short. After having gone through multiple OS installs over multiple systems and longer times spent trying to reach my files during dev, I've found that keeping things close to the root of the drive and having good, meaningful, and shortly-written file-keeping locations and habits are incredibly good for you and it's always good to start clean.

Ssssecond, if you have Windows 7 SP1 and up, you should go get yourself Windows Powershell (v3 or greater) for yourself https://www.microsoft.com/en-us/download/details.aspx?id=34595, because it's also far more capable of scripting, which rersulted in Windows getting it's very own developed package manager, Chocolatey NuGet https://chocolatey.org/ , which can be easily installed by copy-pasting a line of code, and from there on, you're free to go wild and explore that entire library of software made available for installation through choco. So if you're going through a fresh computer or freshly installed OS, nothing beats installing every single program you need with one command line each and no nonsense. Even if you already have the programs installed, if you run the installation command through choco, it notices, and it makes it available to be upgraded through choco when possible. Which is great, especially for programs that don't have automatic updates, such as Blender, the 3d modeling software. There's also a few powershell scripts you can install to make your life easier/have more integration. Of those, my favorite is posh-git. It adds to git and makes it the best integration of git with windows in a native environment/shell.

Also, personally, I use Eclipse as my IDE for my smalltime programming, learning and development (for both Java, and C/C++, of which their are separate versions of that same IDE for) just cause it was one of the first ones I started using when I started programming out on Java, along with Netbeans, which I didn't come to like. Eclipse had a good dark theme, and just overall it's a pretty nice IDE, I have to say. Code:Blocks is also pretty great, and has quite a bit customizability, along with Visual Studio, which is I'm prrretty sure one very industry standard IDE. And with the release of the (FREEEEEE!!!!!) Community editions for VS, which is made for open source projects, personal education, learning, and small professional teams, you should have this installed. That's a very significant step up from a 90-day limited capability trials with the Express versions before you had to buy the thing, and I'm a broke programmer. Free things to me are like honey and I'm a bee. I invested alot of personal money on a big workstation/gaming computer a few years ago, sure, but, I can still use all of these tools and rather rapidly on an old repaired up toaster laptop of mine. SO. That's my contributions to this thread for awhile.

LASTLY, if you're beginning, start out small and work on the grasping and utilizing the concepts first. Java is good for beginners and picking up some concepts quickly with, sure, but there are certain things that are I feel incredibly important to work with and understand with C that aren't really available, say, in Java, such as pointers, pointer arithmetic, memory allocation, arrays of primitive data types and manipulation of arrays by the subtle difference of either reference or value, vectors, etc. And don't try to chew on big bites at once! Have a pace to it and explore the standard library you have available to you, before moving to the other stuff.

Happy programming and development!
 
Last edited:
Hey, to be fair, it was about as active beforehand as months between posts. And I know we have people interested in programming and design here. I just remembered this thread existed, so, I felt the need to drop some info to help out any other fledgling programmers who might read this one day, because some people don't like having to switch operating systems, or using a virtual, sandboxed OS, in addition to say that most games are developed for Windows in mind. :P Besides, I got SDL along with C++ too on Windows, I ain't losing out on a thing.
As far as grave goes, though, thiiiink we could use a new thread with a good informative OP post relevant to "Programming and GameDev". I dooooo.
 
As far as grave goes, though, thiiiink we could use a new thread with a good informative OP post relevant to "Programming and GameDev". I dooooo.
If you want to make one and think it'd be useful, please feel free and I'll lock this one with a link or something. I could just butcher WrestlerGuile's OP here but that's probably not the best idea.

Also I wasn't trying to say that you shouldn't have gravedug, just that I wasn't expecting someone to put that much effort into a post after so long.
 
Last edited:
  • Like
Reactions: Wenzel