• Breaking News

    Friday, February 2, 2018

    People who have worked in developing a game with a team of people or as part of their day job - what was it like? Ask Programming

    People who have worked in developing a game with a team of people or as part of their day job - what was it like? Ask Programming


    People who have worked in developing a game with a team of people or as part of their day job - what was it like?

    Posted: 02 Feb 2018 03:48 PM PST

    I know programming is so much more than game development, but as a digital media artist I am particularly interested in the evolution of games and 'transitional/interdisciplinary' media. Especially since VR is becoming big, more and more artists are developing a consciousness of software and how to utilize it to create unique experiences.

    I've always wanted to work with a company developing games, as I feel it would help me learn the specific programming skill sets that are valuable to artists.

    I am genuinely curious as to what working on the development of a game is like on a day to day basis, especially when it involves a large team of people. Not necessarily triple-A development, but not standalone 'braid' type ventures where it's just a single person slaving away at the application.

    I've heard some programmers compare it to slave labor, and I actually don't encounter much favor. Some people act like the entire industry is a bubble that is about to burst. I am curious if anyone has any interesting anecdotes, or could tell me what skills were actually expected of them during the development cycle that were specific to game development and not just programming in general?

    submitted by /u/Tsundokuu
    [link] [comments]

    Unity TANKS! 6 of 8

    Posted: 02 Feb 2018 08:36 PM PST

    When I start the test of the game my aim slider is at max. I can't seem to find how to fix this. https://imgur.com/gallery/CNYdN

    Edit: I set the default in the code to max instead of min on accident.

    submitted by /u/game_plete
    [link] [comments]

    [Python] What's the best way to know when a YouTube user has posted a new video?

    Posted: 02 Feb 2018 09:55 PM PST

    I'm doing a little personal project where I build what is essentially a desktop GUI for YouTube. You add one or two channels, and when they post, it pops up and starts playing muted.

    So far my biggest question is getting instant access to videos. I've thought of scraping the channel manually or using youtube.search(), but that requires me to be constantly pinging the API every second or so. Is there any passive way to receive a notification?

    To be clear, it doesn't need to be instant for my project, I'm just wondering what the fastest possible way is.

    submitted by /u/PresentlyInThePast
    [link] [comments]

    In Java or C++, how is the translation for formal logic?

    Posted: 02 Feb 2018 05:42 PM PST

    For instance, I'm aware very few language support if-then statements, so I need to write (~P v Q)

    Also, I know how to write De Morgen's Laws, and everything. I am assuming things like commutativity and association work the same.

    What things do not translate well, and I must improvise?

    Also, I am assuming I'm most languages, I must do

    if ( !(P && Q) ) 

    As:

    If !(P && Q) 

    Is a syntax error?

    Anything else I should know?

    submitted by /u/WindowsKidd
    [link] [comments]

    What programming concept can't you simply wrap your head around?

    Posted: 02 Feb 2018 03:19 AM PST

    For me it's relational databases. Every time a project that requires sql or the like comes across, it feels like I have to relearn how foreign keys work, and other basic concepts.

    submitted by /u/CounterNexie
    [link] [comments]

    Issue with rounding float numbers in Java

    Posted: 02 Feb 2018 08:50 PM PST

    I made a gradebook that asks the user for the amount of points they got on assignments then divides it by the total points possible.

    Here's my code:

    import java.util.Scanner; public class Gradebook1 { public static void main(String args[]){ Scanner scanner = new Scanner(System.in); System.out.println("Enter your total points for all 6 homework assignments"); float Homework = scanner.nextFloat(); System.out.println("You have received" + " " + Homework + " " + "points out of the 600 points possible."); float HomeworkPercentage = Homework/600; HomeworkPercentage = Math.round(HomeworkPercentage * 100.0); System.out.println("This gives you" + " " + HomeworkPercentage + "% on the Homework Assignments."); 

    If I make an input of 550 for example, It outputs:

    "This gives you 92.0% on the Homework Assignments." 

    Instead of

    "This gives you 91.7% on the Homework Assignments." 

    How can I fix this?

    submitted by /u/YasuoMainBTW
    [link] [comments]

    C# How to make threads that stop running to R/W in a serialport once take the info and return to execution

    Posted: 02 Feb 2018 06:41 PM PST

    Im new in c#, please help

    I have 8 threads to do a test of 8 devices at one. they are doing the same stuff all the time, and they have to be in the same step to send a command to a single serial device that applies that command to all of the 8 devices.

    my code now derives of an old implementation that was done to test a single device, so if i made 8 instances, i had to have 8 serial devices, with defeats the purpose

    submitted by /u/ipubi15
    [link] [comments]

    What does "spaghetti code" actually mean?

    Posted: 02 Feb 2018 02:28 PM PST

    Seemingly it just means "any kind of bad code." Does it have a more specific meaning?

    submitted by /u/EyesEmojiPeachEmoji
    [link] [comments]

    (C++) Getting error "expected primary-expression before 'num' " when compiling

    Posted: 02 Feb 2018 01:31 PM PST

    I am trying to get a boolean output stating whether (the function) detects whether there is an integer or not.

    bool is_int(string num);

    int main(){

    return 0;

    }

    bool is_int(string num) {

     for (int i = 0; i < num.length(); i++) { if (check_range(48, 57, string num)) <--- error this line return true; else return false; { { 

    The check_range function works, and I am looking through the ASCII values 0 through 9 (48 through 57). I get the error "expexted primary-expression before 'num' " and I can't seem to figure it out.

    submitted by /u/SomeKindaAsian
    [link] [comments]

    How best can I limit the execution of a script in Java?

    Posted: 02 Feb 2018 05:07 PM PST

    I have an idea for a game. The core mechanic involves players uploading code to control their players, more than a little like Screeps.

    The problem is I haven't found a satisfying way to limit how many resources are used. I haven't found any ways to limit memory and I don't like saying "you have 500ms to run your code for this game tick" because that will vary from machine to machine, and even based on server load.

    Does anybody know of a best-practice way to do this?

    I'm tempted to make my own assembly standard so I can say "you have 10k ops to run every tick and 2 million words of memory" but I fear that'll scare away players. I'd much rather use a scripting language like Lua or JavaScript.

    submitted by /u/TomatoCo
    [link] [comments]

    Really stuck on some (probably) simple code.

    Posted: 02 Feb 2018 04:49 PM PST

    using System; public static class Assignment1 { public static void Main() { // Declare variables and constants int NumberPurchased; const double CoverCharge = 0.25; double Cost, HST, DohnutCost; string lastName;

     // prompt the user to enter NumberPurchased Console.Write("Enter number of Dohnuts => "); NumberPurchased = Convert.ToInt32(Console.ReadLine()); // prompt the user to enter customer's last name Console.Write("Enter customer's last name => "); lastName = Console.ReadLine(); // Determine the DohnutCost if (NumberPurchased < 0) Console.WriteLine("*** Invalid Number"); else if (NumberPurchased <= 7) DohnutCost = 1; else if (NumberPurchased < 15) DohnutCost = 0.90; else if (NumberPurchased >= 15) DohnutCost = 0.75; // Determine the cost of HST if (NumberPurchased < 12) HST = 1.13; else if (NumberPurchased >= 12) HST = 1; // calculate cost Cost = NumberPurchased * DohnutCost + CoverCharge * HST; // output results Console.WriteLine("Customer {0} {1}, (Bought: {2}) Paid {3}", lastName, NumberPurchased, Cost); } 

    }

    For some reason HST and Dohnut cost can't be calulated in the cost. If anyone could point me in the right direction it would be much appreciated. (yes I know I didn't spell Doughnut correctly.)

    submitted by /u/rickles99
    [link] [comments]

    Why there is not one regexp syntax?

    Posted: 02 Feb 2018 09:07 AM PST

    It drives me mad... i want to move my regexp from one language to the other, and guess what happens? Errors.

    Why do we complicate our lives so much?

    submitted by /u/bukens
    [link] [comments]

    [C] Program asks for user input before printing the question itself

    Posted: 02 Feb 2018 11:18 AM PST

    So here's this small program I wrote. For some reason, when you run it, it expects 2 inputs before even printing anything. When you enter the 2 inputs is when it prints the questions and runs the program.

    Any help would be appreciated! Thank you.

    #include <stdio.h> #include <stdlib.h> #include <dirent.h> #include <string.h> int main(void) { char wordtoreplace[256]; char directory[256] = "./test"; printf("Please enter the word you want to replace: \n"); scanf("%s", &wordtoreplace); printf("Please enter the directory the search should begin in ('.' being main program folder) \n"); scanf("%s", &directory); printf("Search begins in folder: %s \n", directory); listDir(directory); return 0; } 
    submitted by /u/notyourdaddy
    [link] [comments]

    I need to make a web based Q/A form

    Posted: 02 Feb 2018 02:23 PM PST

    Hey,

    this might be simple but can anyone guide me to right direction to where to start? I am stopping the use of paper exam for my programming class and trying to go all web.

    Can anyone guide me how I should make a web based exam? The logic would be great, all I need is Q/A type where after submitting the answers gets sent or saved somewhere.

    submitted by /u/Ahanaf
    [link] [comments]

    Is Salesforce appropriate for what I’m trying to do?

    Posted: 02 Feb 2018 01:13 PM PST

    I'm trying to build a web interface for a database, and the idea is that people would pay monthly access to the database. It's not my company/idea, I'm just trying to build it.

    They don't want to use WordPress anymore, and they suggested that I use Salesforce for security purposes. Does this seem right? Are there better frameworks / options for going about this?

    I've built web apps using React and vanilla JS for internships and whatnot, but I haven't had experience building a website from the ground up.

    submitted by /u/secularshepherd
    [link] [comments]

    This website (top of /r/worldnews) automatically attempts a download of a file that is completely blank (0 bytes in size) upon visit, what's happening here exactly?

    Posted: 02 Feb 2018 06:38 AM PST

    How to get Selenium running with Maven? Specifically, what is my jdk.level?

    Posted: 02 Feb 2018 11:15 AM PST

    I'm trying to get Selenium set up through IntelliJ to begin automatic testing. Here is the tutorial I've been using so far I'm stuck on this specific plug-in implimentation:

    <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.5.1</version> <configuration> <source>${jdk.level}</source> <target>${jdk.level}</target> </configuration> </plugin> 

    What is the jdk.level variable?

    submitted by /u/thingkr
    [link] [comments]

    Want to build a mobile app to connect with smart luggage, factory has api for a specific function but won't give it to us until we place a large order. Can we build the app first and then efficiently / cheaply integrate the api later?

    Posted: 02 Feb 2018 10:00 AM PST

    Hello,

    We'd like to write an app for a smart luggage product in development. The app's smart lock functionality will need to rely on a Bluetooth locking mechanism built into the luggage, but the manufacturer will not provide the API for the locking mechanism until we make a large order.

    1. If we hire a programmer to write the application now, how difficult is it to add the API code later? Could there be bugs in the app that will only be evident once used with the locking mechanism?

    2. Is it difficult for an intermediate programmer (such as the one we will likely hire from an online freelancer site) to make this app secure, bug-free, and updatable? This app should work on both Android and iPhone will include a Bluetooth alarm that locks the luggage when it reaches the end of the Bluetooth range, and Bluetooth tracking that relies on the Tile network (Tile network firmware supposedly easily integrates with Bluetooth chips).

    3. Any specific coding skills we should look for in an online freelancer? (e.g., knowledge of specific languages, certain type of work experience, etc.) would you recommend building a cross-platform or hybrid app?

    Thanks for your help!

    submitted by /u/OtherwiseStable
    [link] [comments]

    Question regarding Game playing AI's. (ex OpenAI)

    Posted: 02 Feb 2018 09:32 AM PST

    I've been fascinated by these new kind of AI's that play for example Starcraft and Dota. The thing that I can't wrap my head around is how they manage to train these AI's? How doesn't the AI playing the game not trigger the Anti-Cheat of the said game? How does the AI even learn? Does it read the input/output from the game? The player? Etc I was just wondering if anyone here could help me wrap me head around this?

    submitted by /u/Tuz1e
    [link] [comments]

    I've got zero experience with coding, and want a good book on python.

    Posted: 02 Feb 2018 09:25 AM PST

    I've done a very minimal amount of research on this, and have come to the conclusion that learning python is the easiest for someone with no experience. That said, what is a good book for learning python under 50 dollars?

    Thank you in advance!

    submitted by /u/Kappakace
    [link] [comments]

    How do you handle working with an unwieldly test suite?

    Posted: 02 Feb 2018 08:54 AM PST

    IIRC, if one were to follow TDD principles appropriately, it requires you to run tests and run tests often while you work on a change to the codebase. My problem is that I joined a team that has pretty spotty test suite that can run extremely slow at times (it's a Python project that uses pytest). It could take 30-40 minutes for just a single run of the suite.

    What ends up happening is that team members (myself included), unfortunately put tests on a backburner only up until it's time to submit a pull request to master, and at that time it reveals that their changes are breaking tests all over the place. Fixing them all could take a whole day's worth of work just to get everything in line.

    I have to assume there's got to be a better way of going about this. We are all trying to improve the test suite as we go along, but "improve" seems to kind of a moving target as no one on the team really has strong knowledge of how to write a test suite that is both fast and comprehensive and maintainable. Personally, I've been scouring the internet for resources that can touch on this at a higher level, but I've come up short.

    Does anyone have any tips for handling this?

    submitted by /u/gogogadgetmeatloaf
    [link] [comments]

    Working on a weapon creation for a tabletop RPG System. What design pattern should I use to manage tags?

    Posted: 02 Feb 2018 07:35 AM PST

    Hi /r/AskProgramming,

    I'm developing a combat tracker for a tabletop RPG. The goal is to automate opponents combat and health to make combat a bit quicker overall.

    Each person has a specific weapon. Each weapon has a multitude of tags that give them different effects.

    In example: Straight Sword: Lethal, Melee, Balanced

    Lethal: This weapon does lethal damage during a decisive attack.

    Melee: Attacks with this weapon uses Melee Stat

    Balanced: Give Overwhelming 1 point higher than usual.

    There is a whole list of tags with different effects. What patterns would work best so any individual weapon only inherits a few tags during creation?

    Edit: I think what I'm going to do is have a weapon superclass, that contains all of the tag functions. Then, program each subweapon to inherit the superclass, and only call the tags it will use.

    submitted by /u/JoePrau96
    [link] [comments]

    Conflicting answers from colleagues - performance testing of applications, pointless or not?

    Posted: 02 Feb 2018 02:32 AM PST

    Hi!

    I presented two colleagues of mine with the concept of writing software to test the actual performance of other software with the same constraints as the actual users of that software (wait for animations, wait for elements to be clickable, wait for load etc, wait for net/wifi latency etc), in terms of how long actions take.

    One of them was enthusiastic and immediately saw applications such as tracking performance metrics across versions and over time.

    The other one sort of dismissed it and said any problems would be caught and handled in development by people better qualified to have a say about this.

    What's your opinion?

    submitted by /u/Alarinth
    [link] [comments]

    How do I make similar seed numbers make very different results (with noise generators)? C#

    Posted: 02 Feb 2018 05:57 AM PST

    So lets say I'm using perlin noise to generate a 2D map of terrain heights, and I use a seed number to 'shift' the perlin noise to give me different terrain maps for different seeds.

    If I simple shift the whole function over using the seed, then similarly numbered seeds will only be slightly different, for example seed number 5086 will be nearly the same as 5087 and 5088 and so on, as the map would only shift one coordinate number over.

    With games like Minecraft, seed 5086 and 5087 are extremely different maps, but 5086 will always make the same map every time so it's not random, it's procedural.

    My guess is the seed isn't used to shift the generator over a bit directly, but the seed is fed into a noise function that gives non-similar but procedural results; basically using the seed to get a position on 2D grid where X is the input and Y is the result, but that function has infinite possible Y values that are never the same for each x and... it's beyond my capabilities to figure that out.

    TL;DR: How do I shift a noise function less predictably with similar seed numbers? (I'm using C# if that helps)

    submitted by /u/R3D24
    [link] [comments]

    What do you think about the automation of programmers?

    Posted: 02 Feb 2018 03:15 AM PST

    There's this 2013 study from Oxford University (link below) that ranks the probability of many jobs to be automated. It is used very often as a source, I've seen the 48% probability of a programmer to lose its job many times.

    However, I don't get how can one say that there's a risk so high as 48% for programmers. And I explain why.

    Imagine that you need a computer to do some task for you. How do you communicate what you want to the machine? If you speak it, you may lose yourself on the way, it's confusing; you better write it. But if you write it, you may want to write it in a structured manner, otherwise the computer will have to guess some parts of your text and and the result may end up not the way you wanted it. That is, in order to communicate what you want the computer (the machine, the robot) to do, you have to code.

    Programing itself is the automation work. The only way to automate the job of a programmer is enhancing the communication between human and machine. But while that can happen and simple codes for simple tasks require just speech to be made, there always will be the need to speak as clearly as you can to a machine, there always will be coding.

    https://www.oxfordmartin.ox.ac.uk/downloads/academic/The_Future_of_Employment.pdf

    submitted by /u/8Clouds
    [link] [comments]

    No comments:

    Post a Comment