Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 549 550 [551] 552 553 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 906792 times)

TheBiggerFish

  • Bay Watcher
  • Somewhere around here.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8250 on: October 19, 2015, 04:35:48 pm »

We are talking about a school project here. Introducing new concepts that haven't been covered in the class probably isn't helping.
Exactly.
Too much complexity is a Really Bad Thing in a school project.
Logged
Sigtext

It has been determined that Trump is an average unladen swallow travelling northbound at his maximum sustainable speed of -3 Obama-cubits per second in the middle of a class 3 hurricane.

Moghjubar

  • Bay Watcher
  • Science gets you to space.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8251 on: October 19, 2015, 04:38:52 pm »

Well, I finished (relatively) an IRC bot last night that can take commands, one of which is a twitter timeline request to get the last tweet of a user.  All done in C++ using winsock and OpenSSL.

Man that was a wild ride that took all last week.  I basically had to figure out everything all at once, and the documentation for someone coming in with no experience on networking/http requests, let alone the twitter API, is such a pain.  Also, basically everyone else is NOT using C for this, so I got answers for everything but C.

The good news is now I know how to do it, so hooray for that!  (and now, I gotta make myself finish a game I was working on that has gone on way longer than the 1 month timer I set for it... gotta push out some art and finish making dat level)
Logged
Steam ID
Making things in Unity
Current Project: Demon Legend
Made This too (publisher abandoned ) Farworld Pioneers
Mastodon

Reelya

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8252 on: October 19, 2015, 04:44:33 pm »

I'm currently building a Pipemania clone about trains in Unity for a class project. I'm the team's programmer and it's going pretty well.

The other guys are slacking off with creating art assets however, but I got the whole thing working with all Unity graphics primitives, and I put work into the Trello and documentation, so my ass is covered once the review period comes in :)

It's a balancing act: how to do my job perfectly, and get good marks without <slack bastard #3> getting any of the undeserved credit for everyone else's efforts. There's always one guy in a group who wants to skate home on everyone else's work. We're keeping good track of who-did-what-task though.

TheBiggerFish

  • Bay Watcher
  • Somewhere around here.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8253 on: October 19, 2015, 04:59:50 pm »

I'm currently building a Pipemania clone about trains in Unity for a class project. I'm the team's programmer and it's going pretty well.

The other guys are slacking off with creating art assets however, but I got the whole thing working with all Unity graphics primitives, and I put work into the Trello and documentation, so my ass is covered once the review period comes in :)

It's a balancing act: how to do my job perfectly, and get good marks without <slack bastard #3> getting any of the undeserved credit for everyone else's efforts. There's always one guy in a group who wants to skate home on everyone else's work. We're keeping good track of who-did-what-task though.
Short answer:Author field.
Long answer:Lots of comments AND the author field.  (And the parameter.)
Longer answer: Find some sort of proper repository thing to use for tracking things with and do that.  Bonus for syncing everything.
In the interest of full disclosure: I have no clue what I'm talking about.
Logged
Sigtext

It has been determined that Trump is an average unladen swallow travelling northbound at his maximum sustainable speed of -3 Obama-cubits per second in the middle of a class 3 hurricane.

nogoodnames

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8254 on: October 19, 2015, 05:11:17 pm »

So today I learned about this: https://www.imaginecup.com/
It's an international programming competition sponsored by Microsoft. Unfortunately, the deadline for submitting your proposal is the 28th and I doubt I'll be able to get together with a serious team, let alone flesh out a winning concept in that time. Still, it would probably be a good experience.

One of my professors is holding a meetup for interested students next week, which is, uh, cutting it a little close. I'm thinking about showing up. Preferably with an idea ready to go.
Logged
Life is, in a word, volcanoes.
                        - Random human lord

Gatleos

  • Bay Watcher
  • Mournhold... City of Light... City of MAGIC!
    • View Profile
    • Someone Sig This
Re: if self.isCoder(): post() #Programming Thread
« Reply #8255 on: October 19, 2015, 05:15:28 pm »

But you inverted win and lose here. If the user chooses "0" (Rock), then beats[userChoice] == "2" (Scissors). You then have that if the computer picks "2" (Scissors) then the program prints "You win". i.e player (rock) beat computer (scissors).

Yeah, that's an important thing to note. My logic works, but the way I named the variable implied that it means the opposite of what it does. It's important to name variables in such a way that anyone modifying your code doesn't mistake its purpose.
Logged
Think of it like Sim City, except with rival mayors that seek to destroy your citizens by arming legions of homeless people and sending them to attack you.
Quote from: Moonshadow101
it would be funny to see babies spontaneously combust
Gat HQ (Sigtext)
++U+U++ // ,.,.@UUUUUUUU

TheBiggerFish

  • Bay Watcher
  • Somewhere around here.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8256 on: October 19, 2015, 05:37:51 pm »

So today I learned about this: https://www.imaginecup.com/
It's an international programming competition sponsored by Microsoft. Unfortunately, the deadline for submitting your proposal is the 28th and I doubt I'll be able to get together with a serious team, let alone flesh out a winning concept in that time. Still, it would probably be a good experience.

One of my professors is holding a meetup for interested students next week, which is, uh, cutting it a little close. I'm thinking about showing up. Preferably with an idea ready to go.
That website is not mobile-friendly...
Logged
Sigtext

It has been determined that Trump is an average unladen swallow travelling northbound at his maximum sustainable speed of -3 Obama-cubits per second in the middle of a class 3 hurricane.

3man75

  • Bay Watcher
  • I will fire this rocket
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8257 on: October 19, 2015, 10:12:22 pm »

Still working on my RPS code (teacher decided to put in new requirements. Again) but I wanted to know what this does: numeric_limits<streamsize>::max()

From the name I speculate it limits how many numbers you can input but i'm not sure. Online resources also don't have a laymans term for it either.
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #8258 on: October 19, 2015, 11:43:02 pm »

Incidentally, does anyone have a recommended VPS service? Linode and digital ocean seem like well-known ones, but I am not sure which is better...
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

3man75

  • Bay Watcher
  • I will fire this rocket
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8259 on: October 21, 2015, 11:26:03 am »

Spoiler (click to show/hide)

Finally got it working to how my teacher wanted (I think her instructions can be vauge.)
Logged

Reelya

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8260 on: October 21, 2015, 11:34:29 am »

The loop for the main game seems to be missing from what you pasted there. are you sure it works? It won't compile with your code for me. Always fully test the thing before handing it in, and always after making changes.

I can see you're missing a while loop that needs to go back to the top of the program from the bottom. But basically wherever you put it, you're going to have glitches in the printouts, i can tell you that right now. put up a proper working version here and I'll show you why there are errors.
« Last Edit: October 21, 2015, 11:49:01 am by Reelya »
Logged

da_nang

  • Bay Watcher
  • Argonian Overlord
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8261 on: October 21, 2015, 02:33:53 pm »

Has anyone used CodeXL before? Is there a convention on how source code should be stored for the code to show up when profiling programs? Like, does it matter what I put as a source directory as long as the actual source file is in there?

Because right now, the profiler can't find the source file despite Source Files Directories in the Project Settings pointing to the correct directory so it only shows a disassembly of the executable.
Logged
"Deliver yesterday, code today, think tomorrow."
Ceterum censeo Unionem Europaeam esse delendam.
Future supplanter of humanity.

Gatleos

  • Bay Watcher
  • Mournhold... City of Light... City of MAGIC!
    • View Profile
    • Someone Sig This
Re: if self.isCoder(): post() #Programming Thread
« Reply #8262 on: October 23, 2015, 02:56:22 am »

Code: [Select]
auto va = std::make_shared<anim::Vector>(call(static_cast<void(PolygonNode::*)(const sf::Vector2f&)>(&PolygonNode::setPosition), this));

can i change majors
Logged
Think of it like Sim City, except with rival mayors that seek to destroy your citizens by arming legions of homeless people and sending them to attack you.
Quote from: Moonshadow101
it would be funny to see babies spontaneously combust
Gat HQ (Sigtext)
++U+U++ // ,.,.@UUUUUUUU

cerapa

  • Bay Watcher
  • It wont bite....unless you are the sun.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8263 on: October 23, 2015, 06:50:47 am »

Code: [Select]
auto va = std::make_shared<anim::Vector>(call(static_cast<void(PolygonNode::*)(const sf::Vector2f&)>(&PolygonNode::setPosition), this));

can i change majors

No.

You have to live with this. There is no escape.
Logged

Tick, tick, tick the time goes by,
tick, tick, tick the clock blows up.

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8264 on: October 23, 2015, 07:27:35 am »

At least you have auto.  Back in my day we had to use typedefs to make C++ container definitions not take up half a page apiece!
Logged
Through pain, I find wisdom.
Pages: 1 ... 549 550 [551] 552 553 ... 796