Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 237 238 [239] 240 241 ... 796

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

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3570 on: November 25, 2012, 02:37:55 am »

Na, use SDL as Virex suggested. I haven't used it myself, but I seem to recall copying memory to a texture being relatively trivial from what snippets I've occasionally run across. It should be much faster than a hacky libtcod implementation in any case.
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3571 on: November 25, 2012, 12:08:00 pm »

Every time someone says SDL I feel the urge to shout "No, use SFML!". So there you have it.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3572 on: November 25, 2012, 01:09:54 pm »

SFML is probably better, but SDL is C-based, while SFML is C++-based. Plenty of languages can call foreign C functions, but not C++ functions, hence SDL is likely availible in whatever language you're using, while SFML is only available in the most popular languages.
So the verdict is 'use libtcod with a 1x1 tileset' for now? :D
Hrm. If there's lots of dots, it might be slow enough that it interferes with the simulation...
Libtcod uses SDL to do the drawing, so I'd say using SDL directly would be more efficient and easier.
« Last Edit: November 25, 2012, 02:29:29 pm by Virex »
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3573 on: November 25, 2012, 01:23:34 pm »

... there are other languages?

;)

But: good point.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

GlyphGryph

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3574 on: November 28, 2012, 05:23:13 pm »

I don't think I can be a programmer anymore. I need to get out of this industry.

I just don't have a good enough memory for this.
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #3575 on: November 28, 2012, 09:32:36 pm »

I don't think I can be a programmer anymore. I need to get out of this industry.

I just don't have a good enough memory for this.
Why's that? D:
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

GlyphGryph

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3576 on: November 28, 2012, 10:12:00 pm »

I've been programming for years, and I STILL have trouble remember basic syntax if I haven't used it for the last week. I mean, I have ways to cope (basically sample code sheets and reference files I can review, plus a list of "common tasks", currently 6 pages long, that I need to do regularly but will never, ever remember the syntax for).

I am bad at psychology, and I am bad at remembering syntax. These are huge handicaps in the IT industry, where you usually use the one to help you figure out the other and here I am, terrible at both.

Blugh.
Logged

eerr

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3577 on: November 29, 2012, 12:19:57 am »

Describe your programming to yourself. It's really not that hard out loud.
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #3578 on: November 29, 2012, 01:12:32 am »

Well, GG, as long as you know what's what, I'm sure syntax is a secondary thing. You can always look it up, like you're doing now. You just need to know what you're doing and how you'll do it.
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

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: if self.isCoder(): post() #Programming Thread
« Reply #3579 on: November 29, 2012, 01:17:04 am »

Syntax highlighting and code completion. If you know how to program, you don't necessarily need to know the code that does it. Which is somewhat bad advice.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3580 on: November 29, 2012, 03:56:26 am »

Yep. I still have to look up how to initialise an array in c++ (I hardly use them), and in PHP I need to look up every other command because they've been implemented by monkeys ramming their heads on keyboards. Don't worry about it :)
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

GlyphGryph

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3581 on: November 29, 2012, 08:20:48 am »

Syntax highlighting and code completion. If you know how to program, you don't necessarily need to know the code that does it. Which is somewhat bad advice.

Code completion is surprisingly unuseuful for the way I forget things, and syntax highlighting certiainly helps with using those ref docs...

Anyways, thanks for the reassurances, all. I feel a bit better about it now, at least.
Logged

Willfor

  • Bay Watcher
  • The great magmaman adventurer. I do it for hugs.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3582 on: November 29, 2012, 10:05:10 am »

90% of programming is simply knowing that running to google is a very good option to take. Google and frequent comments to yourself, BANG you're a good programmer.
Logged
In the wells of livestock vans with shells and garden sands /
Iron mixed with oxygen as per the laws of chemistry and chance /
A shape was roughly human, it was only roughly human /
Apparition eyes / Apparition eyes / Knock, apparition, knock / Eyes, apparition eyes /

Mego

  • Bay Watcher
  • [PREFSTRING:MADNESS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3583 on: November 29, 2012, 10:09:25 am »

90% of programming is simply knowing that running to google is a very good option to take. Google and frequent comments to yourself, BANG you're a good programmer.

This is so true. Nobody will scoff at you for doing a quick Google search for something that slipped your mind. And if some asshat does, then he initiated war against a programmer. He will most certainly lose.

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3584 on: November 29, 2012, 10:58:04 am »

Stuck on a coding problem here: Given a set of k linear inequalities of the form a * xi + b * xj >= c, how do I find the x = (x1, ..., xn) with minimal length which satisfies all the inequalities?
Logged
Pages: 1 ... 237 238 [239] 240 241 ... 796