Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 354 355 [356] 357 358 ... 796

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

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: if self.isCoder(): post() #Programming Thread
« Reply #5325 on: January 07, 2014, 09:26:08 am »

Dangit, my use of Python and Perl the past week has spoiled me D:

It's sooooooo convenient and easy to work with...

I'm not gonna say I told you so :D

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5326 on: January 07, 2014, 10:42:50 am »

*mandatory "just use a better language than Java" message*
Logged

Quote from: NW_Kohaku
they wouldn't be able to tell the difference between the raving confessions of a mass murdering cannibal from a recipe to bake a pie.
Knowing Belgium, everyone will vote for themselves out of mistrust for anyone else, and some kind of weird direct democracy coalition will need to be formed from 11 million or so individuals.

ECrownofFire

  • Bay Watcher
  • Resident Dragoness
    • View Profile
    • ECrownofFire
Re: if self.isCoder(): post() #Programming Thread
« Reply #5327 on: January 07, 2014, 08:27:56 pm »

I have actually experienced something vaguely similar in C++, due to compiler differences. It's undefined behaviour what a function returns if it has a non-void return type but no return statement in the body. MSVC will throw a compiler error (except in the cases where only some branches of the body have no return), while gcc will happily compile (there might be a warning) and just return some garbage value when the function is called.

This is one of many reasons why compiling with -Werror is a good idea.
Logged

Just Some Guy

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5328 on: January 09, 2014, 04:54:42 pm »

I'm using jGrasp.
So I installed jGrasp, and here's what you have to do to make your project use LWJGL: Make a new project. Go to Settings -> Compiler Settings -> PATH -> CLASSPATHS -> New -> Jar File -> Browse, look for and select lwjgl.jar.
Then in the same window, go to Compiler -> Java -> Flags/Args/Main, and in the left column for "Run" and "Debug", insert -Djava.library.path=<PATH>, where <PATH> needs to be the path to your OS's native folder for LWJGL.
That should be all.

Are you sure the native file path is right? jGrasp can't seem to find it.

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5329 on: January 09, 2014, 05:39:20 pm »

I ran a game of mine, and it worked fine. Are you sure you picked the right native path? For example, my OS is Linux, so my runtime argument would look like this:
Code: [Select]
-Djava.library.path=/foo/bar/lwjgl-2.9.1/native/linux/
You have to link to the folder with your OS's natives.
Logged

cerapa

  • Bay Watcher
  • It wont bite....unless you are the sun.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5330 on: January 10, 2014, 11:23:37 am »

Spoiler: Ignore (click to show/hide)

EDIT4: Or I might just be a dumbass and using things in ways that they aren't meant to be used.

Much better.

I'm still confused about how the hell I got the circular pattern shown in the first image.
« Last Edit: January 10, 2014, 12:02:48 pm by cerapa »
Logged

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

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #5331 on: January 10, 2014, 02:09:52 pm »

So I submitted a really simple game for some coursework. Bullet hell shooter, three types of randomly spawned enemies, written in C++ and SFML and compilable for Windows and Android. And immediately after submission I discover a bug: All difficulties would become the highest after 10 kills. Ooops. Turns out I forgot an else statement, so the difficulty progression would immediately advance to the highest possible difficulty...

So I e-mailed a patch to my lecturer and just have to hope he applies it and doesn't mark me down xD My own fault, I wrote the game quickly and hackily. There's a reason I'm a TDD advocate, and it's that for all my intelligence and completely justified god complex I can be a right idiot sometimes :)
Logged

GlyphGryph

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5332 on: January 10, 2014, 02:21:00 pm »

Yeah, it's not like any REAL game developer would ever make that sort of mistake! (*cough cough TFTD*)
Logged

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5333 on: January 10, 2014, 02:32:40 pm »

You should've just said that it's intentional.

HARDCORE!
Logged

Quote from: NW_Kohaku
they wouldn't be able to tell the difference between the raving confessions of a mass murdering cannibal from a recipe to bake a pie.
Knowing Belgium, everyone will vote for themselves out of mistrust for anyone else, and some kind of weird direct democracy coalition will need to be formed from 11 million or so individuals.

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5334 on: January 10, 2014, 03:07:51 pm »

Come to think of it, I'm not sure the games we made for our game design course had to be winnable... so maybe it's no big deal.  :)

Incidentally, my team made a bullet hell game too.  That was a fun class but I almost went nuts trying to finish coding that on top of everything else that semester.  I'm very thankful we decided to use XNA and C# instead of pure C++.  It would never have been finished on time.
Logged
Through pain, I find wisdom.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #5335 on: January 14, 2014, 05:32:46 am »

It seems that of my many efforts, there won't be many finished projects to show to a university when applying. >_> Is an unfinished project better than nothing? :x

I also haven't gotten around to writing about the techniques I used in each project. <_<
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

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5336 on: January 14, 2014, 08:26:36 am »

When I applied to college I don't think there even was any mention of showing off projects or a portfolio.  If there was, it wasn't more than just writing what you'd done, and certainly didn't entail sending code or even screenshots to anyone.  Some honors colleges at some universities might be different?

In either case, I suspect a partial project is better than nothing.  Especially if it shows interesting problem solving methods or techniques.
Logged
Through pain, I find wisdom.

MrWillsauce

  • Bay Watcher
  • Has an ass that won't quit
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5337 on: January 19, 2014, 12:01:27 pm »

I'm having trouble getting a Python Curses module to work on Windows. I downloaded PDCurses and Unicurses, and I can import them with my IDE, but when I run programs using their functions nothing happens. Could it just be that I need a different IDE, or did I just screw up when installing stuff?
Logged

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5338 on: January 19, 2014, 05:26:19 pm »

If nothing happens then its probably imported fine.  If it didn't import then it would give a python error and stack trace.  Assuming the IDE reports the output fine that is.
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

MrWillsauce

  • Bay Watcher
  • Has an ass that won't quit
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5339 on: January 19, 2014, 05:29:05 pm »

But none of the Unicurses or PDCurses functions are doing anything
Logged
Pages: 1 ... 354 355 [356] 357 358 ... 796