Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 367 368 [369] 370 371 ... 796

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

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: if self.isCoder(): post() #Programming Thread
« Reply #5520 on: March 04, 2014, 01:16:07 pm »

You should only need to configure router ports if you're trying to access things within your LAN from outside your LAN. Otherwise just use the LAN IP addresses (192.168.?.?, depending on your router's configuration) and you should be good.

The reason for this is that if an incoming connection comes for your WAN IP, on port X, then the router needs to know which LAN computer is going to receive that connection. Connections using only local IPs do not have this problem, because they're directly addressing computers, not LANs :)

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5521 on: March 04, 2014, 01:32:03 pm »

I'm not aware of anything like that, but you could always just connect to ports on your local machine.  That wouldn't even involve your router, only your local firewall.  That won't however simulate realistic latency, so you might want to code in a debug mode of whatever you're testing that adds a random amount of lag before responding.
Logged
Through pain, I find wisdom.

gigaraptor487

  • Bay Watcher
  • Escaped Lunatic now civilised
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5522 on: March 04, 2014, 02:31:52 pm »

Thanks
Logged
Hehe, you thought there would be an interesting sig here

I now run a program which brings old multiplayer games back to life : click

Singularity125

  • Bay Watcher
  • [GAMING INTENSIFIES]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5523 on: March 04, 2014, 11:26:22 pm »

Hrm... I'm kind of at a loss now. It seems after doing some research that Boo as a language is slowly fading into obscurity. The SharpDevelop 5.0 beta doesn't even support it anymore. And libtcod for C# also seems to be in disrepair.

Not sure what language I want to use now. I really wanted a language with python syntax and compiled performance, which Boo seemed to promise, but I don't want to use a dying language. And if libtcod for C# isn't going to work I'll need to throw things together the hard way, I guess.  :-\
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #5524 on: March 05, 2014, 02:30:36 am »

I don't see why python won't be fast enough for your needs though o.o

Are you going to implement a fluid simulation in the background or something?
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

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: if self.isCoder(): post() #Programming Thread
« Reply #5525 on: March 05, 2014, 10:17:19 am »

Even if you are, there's a few alternatives. Use list comprehensions as often as possible, there's also cxFreeze, and a few other things that alter the Python syntax to add optional type declarations so that it actually needs to be compiled, but is then a lot faster.

There are also a few libraries which are really efficient, like numpy and scipy and stuff like that, that you might be able to use.

Singularity125

  • Bay Watcher
  • [GAMING INTENSIFIES]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5526 on: March 05, 2014, 01:26:33 pm »

Hm, I wasn't aware of cxFreeze. Unless I'm reading things wrong though, it doesn't actually make the code run faster, it just eases the distribution of the finished game. The static typed thing might help though.

The other thing that python has always seemed to lack is an IDE on the level of Visual Studio. I'd love a fancy IDE like that. But I haven't really heard of any...
Logged

Mephisto

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5527 on: March 05, 2014, 01:48:08 pm »

PyCharm is pretty good. If you don't want to pay, Community Edition is probably good enough for you.
Logged

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: if self.isCoder(): post() #Programming Thread
« Reply #5528 on: March 05, 2014, 02:01:53 pm »

PyDev is a plugin for Eclipse, which is the IDE for Java. It's fairly good, with debugging and all that. I only ran into problems when debugging external bindings for SFML - other than that is was pretty good!

Singularity125

  • Bay Watcher
  • [GAMING INTENSIFIES]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5529 on: March 05, 2014, 02:44:33 pm »

How did I not know about Pycharm? :o I've recently started using IntelliJ for work, as I'm developing plugins for Jenkins. I'm still getting used to the intellij interface and such, but I didn't know the same team had a Python IDE as well. Hopefully the IDEs are similar enough that working with one will help me figure out the other. Anyway, great find, thanks. :)

The only other thing I guess I'm curious about for now is the whole Test Driven Development thing. It sure sounds like a good idea, but I don't know how to go about it, especially for something with as many interlocking parts as a roguelike. MorleyDev, you seem like an expert on TDD... any thoughts?
Logged

gogis

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5530 on: March 05, 2014, 02:52:08 pm »

They are a tool. 
Unfortunately, they tend to also become a crutch.

Uh, no. While I agree with you on code grinders vs pretty code and everything in your later posts, but... Whatever I kinda need to drop some lines

- IDE have nothing to do with code grinders. Not at all. It's a bad programmer good programmer issue. It's a mind set. I know many bad coders going all dreaded elitist mac + sublime + touchpad +blind typing mode, oh these guys I want throw out of window because how bad they are. Or even more dreaded tree hugging ubuntu + vim elves. They all preaching all bests of their choices on every corner, mind you. They never cease their preaches.

- Reality is, learning coding with IDE is faster simply because IDE will quickly highlight your parse/typo errors without burden of hopping between editor and command line and wasting your time reading error messages and then wasting even more time to align your code with line number, then glance over every word to locate mistake... Well you got what I am talking about?

- Professionally working without IDE is outright impossible. Imagine you have a project with several thousand of files and somebody tasked you with opportunity to refactor some code bits which you can only find with some fulltext search. Now you can do it two ways.
Grep it recursively, regexp or not, edit all that files either by double clicking found filenames (oh touchpaddies, I love you) or be-a-man-hand-tab-typing-full-path-it-like-a-real-hacker then vim it to death without any hope of syntax/sanity/context check then commit everything like a true gosu reading through god awful text diff which tends never to ignore whitespace. And we have a winner. I've seen that once. I wanted to smack that guy into face with his own keyboard. He really really wasted my time while I was patiently waiting behind his chair. I had a feeling one of my spinal bones had a protrusion in process of motionless waiting. And he did just a several typos! What a man. Sublime blind typing, his fingers was lightning. True hero.
Or, alternatively, you can press one hotkey for project search, type in your text/regexp, get a window with matches.. Hmm... That wasnt 30 seconds! That was just a second, because IDE uses fulltext search cache for that tasks. Fine. Now you can click through matches seeing samples of code that matches your pattern and you edit it right away with all syntax/sanity/context check, and then you press one hotkey to look at perfectly sane graphical representation of diff for your commit.

Yeah, that no-IDE guys doesnt cost company a dime...
« Last Edit: March 05, 2014, 02:58:18 pm by gogis »
Logged
In Soviet Russia cigarette smokes you

gogis

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5531 on: March 05, 2014, 02:56:32 pm »

snip
Logged
In Soviet Russia cigarette smokes you

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #5532 on: March 05, 2014, 03:00:45 pm »

The best thing to do with IntelliJ is get the Resharper key bindings. CTRL+R+R makes much more sense as a rename shortcut than SHIFT+F6. But I do recommend it for Java as the best IDE out there. Even the Android SDK is moving over to it.

For TDD I don't have much experience with Roguelikes, but I imagine it'd not be too difficult. The interlocking parts of a roguelike are a major design issue that make working with roguelikes a pain in the posterior, so if you cleanly separate that it'd be pretty easy to test. They're turn based, which is must simpler than a real-time game for testing. My first instinct would be through some kind of messaging or event system. Then you just test that the expected events are triggered, and test that your units react to certain events in certain ways.
Logged

GlyphGryph

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5533 on: March 05, 2014, 03:04:06 pm »

- Professionally working without IDE is outright impossible.
The large number of professional developers I know, including those who are well respected and much desired on the market, don't use an IDE. Should I mention to them that they are also, apparently, some sort of foul sorcerers by defying the laws of reality and doing that which is utterly impossible?

Admittedly, they might actually be sorcerers...
Logged

gogis

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5534 on: March 05, 2014, 03:14:07 pm »

- Professionally working without IDE is outright impossible.
The large number of professional developers I know, including those who are well respected and much desired on the market, don't use an IDE. Should I mention to them that they are also, apparently, some sort of foul sorcerers by defying the laws of reality and doing that which is utterly impossible?

Admittedly, they might actually be sorcerers...

They are not necessarily doing a job I described in example. They can be starting architecture authors, complex algorithm concoters, or maths sorcerors when you need that kind of guys. These guys are pretty valuable, but they never represent what you call average professional programmer. And as I said, you CAN solve aforementioned tasks without IDE. In a very very inefficient way.
I've been participant in more 6 redesigns and 3 internationalization tasks and these kind of tasks require sweep changes in around hundred files at once. It's inevitable and say nothing really about architecture. Sometimes you just have to do that.
« Last Edit: March 05, 2014, 03:16:20 pm by gogis »
Logged
In Soviet Russia cigarette smokes you
Pages: 1 ... 367 368 [369] 370 371 ... 796