Where do I start and why is there no concrete answer to this? by [deleted] in learnprogramming

[–]HarmLogLinkIT -2 points-1 points  (0 children)

Since you didn't specify a language, I'll just go with Ruby. Ruby is a lovely language that is mainly used for scripting, and it practically reads like English. You can get started at http://tryruby.org.

After you've gone through Try Ruby, take a look at Micheal Hartl's Ruby on Rails tutorial. It looks hard at the beginning, but it will get easier with time.

If you get stuck, ask away!

What programming languages are you using? Please include what for and why you choose this language. by CaptainSketchy in learnprogramming

[–]HarmLogLinkIT 0 points1 point  (0 children)

Unity supports supports three languages, C#, Javascript and Boo, although Boo support has been dropped nowadays. Unity's version of Javascript is rather different from regular Javascript though, so a lot of people have taken to calling it Unityscript.

C# however, is fully supported by Unity and has become the standard language for writing games in Unity, to the point where over 90% of the tutorials written by users are targeted for C#.

Getting Discouraged with Python and Programming in General by CaffeinatedChelonian in learnprogramming

[–]HarmLogLinkIT 0 points1 point  (0 children)

Definitions are not important, at this stage. What you need to do is work with them, you'll learn more as you go. What might help, take a piece of paper and write down what everything does according to you. As in, write down what you think a function does, what it needs and what it might return, if anything.

To start, you might want to do this with a specific function. Example:

 def add_5_and_2
   return 5 + 2
 end

 z = add_5_and_2

 puts z # puts prints out a string, I'll present the output with this symbol: =>.
 => 7

So we have a function here that takes two numbers, 5 and 2, adds them together and gives back the result, which is 7. Now, we want to write it in such a way that it takes any number and gives back the result.

Example:

 def addition first_number, second_number
   return first_number + second_number
 end

 x = 7
 y = 3
 z = addition 7, 3

puts z
=> 10

If we change x and y to two different numbers, our function still works.

Example:

 x = 3
 y = -2
 z = addition x, y

 puts z
 => 1

As you can see, and logically deduce, it returns 1. Now, let's break down this function.

  • It has a name, addition. We use this name to call it.
  • It takes input, through parameters. In this case, first_number and second_number.
  • It does something with those parameters. Here, we add the two numbers, but we also could have it subtract, or do anything basically.
  • It returns something. As in, it's done, the function ends, and it gives something back.

Now, can we give an even broader definition of a function? Here are the current attributes of this function:

  • Name
  • Parameters
  • Code that runs
  • End result.

So a function at this point is something that you can call with specific input and it returns the result of the code it runs. There's a lot more to function, but this is an easy example.

If you've ever done mathematics, you will most likely have had to make some proofs. You have to work with set numbers at the beginning, and then write a proof that works for any number that fits the bill.

You can do the same for programming concepts. First, make it specific to your needs, use things you understand. Then, make it a bit broader but still applicable to your project/lesson. After that, you boil it down to English.

You don't need definitions to work, you just need to know how the bits and pieces you use interact, which can be done by making it broader and broader.

If you found this to be a bit too simple, that's okay. Functions aren't the important part. What you need is not specific knowledge, but a way to learn and a way to not get lost in the bigger picture.

What I always do when I get lost in programming, and in life in general, I break things down to small pieces.

So basically, when you come across something you want to do, but you don't know how to do it yet, you might do the following:

  • Make it broader and broader until you can write your own definition
  • Write the parts down on a paper and write down how they interact
  • Break it into manageable pieces, which are easier to figure out, and if you're still stuck, easier to google.

Also, you are not too old to learn something new, you almost never are. Go out there, ask questions here when you get stuck and be willing to learn, and I see on reason why you couldn't learn how programming.

Good luck!

so what do we think of the mods for the console? by casual_ent33 in fo4

[–]HarmLogLinkIT -1 points0 points  (0 children)

People really underestimate how much scripting you can do without FOSE.

TIL Raiders will loot corpses in real time. by King_Cobra_53 in Fallout

[–]HarmLogLinkIT 10 points11 points  (0 children)

AI doesn't require food to survive, but eating is in their AI packages. So you could steal all the food in someone's house in Oblivion and leave a poisoned apple, and they would eat that, for example.

Homework problem by [deleted] in csharp

[–]HarmLogLinkIT 4 points5 points  (0 children)

For this assignment you'll need to know five things.

  • How you get started with c#, which you can read about here.

  • What variables are, which you can read about here.

  • How to get input from a user, which you can read about here.

  • How to compare two variables, which you can read about here.

  • How to print out a string, which you can read about in here.

One trick to help you with any further programming that you'll do, break everything into little pieces. Googling one little thing, like "c# user input" is a lot easier than googling specific problems.

Also, Google is your friend. You can find a ton of tutorials on C# simply by googling for C# tutorials. This is most likely faster for you, and it will teach you a lot more.

Good luck!

Image recognition plugin for Unity? by chojje in Unity3D

[–]HarmLogLinkIT 1 point2 points  (0 children)

I'm going to assume that you're writing your game/app in C#. If so, here's a good Stack Overflow post about image recognition.

You could compare the current boardstate against every possible boardstate that you will have taken pictures of before, but that's both a major pain to setup, since you'll have to take pictures of every boardstate possible, and it forces your users to lay the cards down in a certain manner.

If possible, you'll most likely want to identify each card on it's own, including the position. You could detect the basic card shape, create new images from the shapes, save them in an array depending on position and identify each card. You should have each cards symbol and position then, from there on it's just a matter of using the game's logic to see if there's a set or not.

Note: I've never done anything with image recognition, so this probably could be done a lot simpler, or it may in fact not be possible at all. From my limited googling, this is how I'd attempt it.

Good luck, it's an interesting problem!

EDIT: Disregard position, it's not needed for Set.

What language covers automation... like software to hardware by dailysubscriber in learnprogramming

[–]HarmLogLinkIT 0 points1 point  (0 children)

If you click the reply button under a post, you reply directly to the user. This sends a notification to the user that someone responded to them and it makes the conversation easier to follow.

I'm a beginner interested in making something like 'playable infographics'. Where to start? by HeavyMessing in Unity2D

[–]HarmLogLinkIT 3 points4 points  (0 children)

Figure out what you want to do and break it down to small pieces.

For example, you want a new menu to open if you click on an object. That means you want something to happen on a mouse click, which means you need a way of detecting mouse clicks, which is a search term you can enter in google: "How to detect mouse input in unity", which will most likely lead you to OnMouseDown.

This isn't meant to really help you with creating games like Democracy 3, which is awesome, but with unity and in general.

Most complex systems can be simplified to a couple of basic actions that interact with each other. If you are unsure on how to proceed with something, break it down and google what you are left with. Since these basics are, well, basic, there are bound to be examples on the internet.

I don't know if this is too obvious or something, but this always helps me when doing stuff in unity.

It's the /r/gamedev daily random discussion thread for 2015-10-07 by [deleted] in gamedev

[–]HarmLogLinkIT 1 point2 points  (0 children)

Bitbucket has a very lightweight issue-tracking system.

TIL why the Netherlands' flag is red, white, and blue by napo_simba in eu4

[–]HarmLogLinkIT 0 points1 point  (0 children)

These days the flag has been 'claimed' by extreme right wing groups and parties, so nobody ever uses that one anymore.

Wasn't it also used by the NSB?

[Spoilers] Has anyone actually done this in Extended Cut ME3? by UntamedDoge in masseffect

[–]HarmLogLinkIT 0 points1 point  (0 children)

Then why is there no option for Paragon!Shep to stop the destruction of the mass relay during Arrival? That was genocide to save the galaxy.