Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 457 458 [459] 460 461 ... 796

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

ed boy

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6870 on: January 12, 2015, 07:05:47 pm »

Hmm, does it work if you do:

fseek(examplefile,0,SEEK_SET);

instead of

fseek(examplefile,-sizeof(long),SEEK_CUR);
That indeed works, though I have no idea why.
Logged

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6871 on: January 12, 2015, 07:14:12 pm »

Its got to be some kind of implementation difference.

http://www.cplusplus.com/reference/cstdio/fseek/

This sort of implies that in binary files the offset has to be from origin, but maybe different compilers do it differently?  Out of curiosity, what compiler are you using?  I'm using g++ on windows(compiled for cygwin).
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

ed boy

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6872 on: January 12, 2015, 07:23:39 pm »

I was using the GNU GCC compiler.

and indeed, using fopen(filepath,"rb+"); in my other projects solved the problem there. (I missed that at first since you edited your post while I was typing a reply)
Logged

Cryxis, Prince of Doom

  • Bay Watcher
  • Achievment *Fail freshman year uni*
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6873 on: January 13, 2015, 12:05:11 am »

Ptw, will probably frequent here this smer when I attempt to make a game on Project spark which has a rather (ok very) simplified system for coding
Logged
Fueled by caffeine, nicotine, and a surprisingly low will to live.
Cryxis makes the best typos.

flame99

  • Bay Watcher
  • Lady Stardust & her songs of darkness and disgrace
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6874 on: January 13, 2015, 11:57:35 pm »

I'm looking at learning C#, but I'm afraid I'm rather broke at  the moment, and can't really afford Microsoft Visual Studio. I don't suppose somebody could point me towards a decent free IDE for the language?
Logged
It/its, they/them, in order of preference.

Not gay as in happy, queer as in fuck you.

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: if self.isCoder(): post() #Programming Thread
« Reply #6875 on: January 14, 2015, 12:01:17 am »

Mono is pretty neat. I use the version of it that comes with Unity.
Visual Studio Express edition is also free and pretty much the same as the pricey one but with fewer bells and whistles.
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #6876 on: January 14, 2015, 12:06:00 am »

MSVS Community edition is basically MSVS Ultimate without the pricetag, and a stipulation that you can't make money off it I think.
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

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6877 on: January 14, 2015, 12:13:04 am »

I'm looking at learning C#, but I'm afraid I'm rather broke at  the moment, and can't really afford Microsoft Visual Studio. I don't suppose somebody could point me towards a decent free IDE for the language?

http://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx

flame99

  • Bay Watcher
  • Lady Stardust & her songs of darkness and disgrace
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6878 on: January 14, 2015, 12:27:26 am »

Oh, thanks. I didn't know MSVS Community was a thing. Though, looking at Mono, I think I'm gonna go with that, at least for the time being.
Logged
It/its, they/them, in order of preference.

Not gay as in happy, queer as in fuck you.

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6879 on: January 14, 2015, 12:32:47 am »

Also MSVC express has been a free C# suite since forever.

Also, mono is pretty terrible after using MSVC
Logged

Thief^

  • Bay Watcher
  • Official crazy person
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6880 on: January 14, 2015, 02:37:10 am »

Where visual studio really shines isn't the compiler so much as the debugger. Community edition even has their profiling tools built in for finding performance issues! AMD also provide a free profiler called CodeXL, which on AMD hardware can show you real low-level black-magic information like cache misses.
Logged
Dwarven blood types are not A, B, AB, O but Ale, Wine, Beer, Rum, Whisky and so forth.
It's not an embark so much as seven dwarves having a simultaneous strange mood and going off to build an artifact fortress that menaces with spikes of awesome and hanging rings of death.

alexandertnt

  • Bay Watcher
  • (map 'list (lambda (post) (+ post awesome)) posts)
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6881 on: January 14, 2015, 07:09:30 am »

If the normal Mono IDE is anything like the one that comes with Unity, then in my own experience it's awful. Intellisense randomly breaks, the tab GUI elements are busted, collapsed code uncollapses after saving, occasional crashes, random prolonged freezing etc. The compiler (as far as the one in Unity goes, anyway) works pretty fine though.

I quite like Visual Studio, and personally would recommend that.
Logged
This is when I imagine the hilarity which may happen if certain things are glichy. Such as targeting your own body parts to eat.

You eat your own head
YOU HAVE BEEN STRUCK DOWN!

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6882 on: January 14, 2015, 07:45:02 pm »

I'm taking a class in Java this semester. As someone who's mainly experienced in C++ (with a little Python experience as well) any advice from those who know Java?
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6883 on: January 14, 2015, 07:47:36 pm »

object
oriented
programming

even if you don't think it should be, it should.

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6884 on: January 14, 2015, 08:22:43 pm »

That's it.
No. By a long shot it isn't.
Further differences: Objects are always held by reference, not by value; there are no structs, no typedefs, no macros, no templates, no preprocessor, no operator overloading, no multiple inheritance, no header files, no destructors, and more things I'm sure I'm just not remembering right now.
Logged
Pages: 1 ... 457 458 [459] 460 461 ... 796