Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 21 22 [23] 24 25 ... 796

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

Stargrasper

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #330 on: January 09, 2012, 09:40:03 pm »

Cool.  One more point of C# curiosity...is it at all cross-platform or does .NET force it to be Windows- and Mono-exclusive?  Cross-platform to everything is one of the biggest reasons I like Java.
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #331 on: January 09, 2012, 09:41:57 pm »

It is like programming languages are subject to inbreeding, and the higher level they are, the more retarded they are. C# is somehow not more retarded than a lot of shit, at the cost of being Microsoft's bitch.

Mego

  • Bay Watcher
  • [PREFSTRING:MADNESS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #332 on: January 09, 2012, 09:56:53 pm »

No, it's big enough to contain one.

So, I have a programming exam next week and I feel like I should do something to keep my skills from getting rusty. Somebody please give me something to do.

I gave a programming challenge a while back. Go do that.

Stargrasper, it depends on what you're going to be covering. If it's features from another lesson that you forgot to bring up, make a mini-lesson. If it's new stuff that you're not sure where to put, make a lesson for each topic. If it's explanations for stuff that you called magic earlier, explain it in a related tutorial. For example, I'll be explaining the magic of using namespace std; in my namespaces lesson, and the raw power of #define's in my preprocessor lesson.

Darvi

  • Bay Watcher
  • <Cript> Darvi is my wifi.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #333 on: January 09, 2012, 10:02:30 pm »

No, it's big enough to contain one.

So, I have a programming exam next week and I feel like I should do something to keep my skills from getting rusty. Somebody please give me something to do.

I gave a programming challenge a while back. Go do that.
a) I can't find it and
b) It doesn't matter anyway because it would involve using the Language Which Shall Not Be Named.
Logged

Willfor

  • Bay Watcher
  • The great magmaman adventurer. I do it for hugs.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #334 on: January 09, 2012, 10:03:23 pm »

I'm realizing that the bounds of this simulator are causing pain to fake people.

Spoiler (click to show/hide)

She was going to marry Gamjon if the simulation hadn't ended a few weeks before her marriage. D:
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 #335 on: January 09, 2012, 10:14:05 pm »

I know this is something the other programming thread did/does, but I like the idea and I'm going to do it here too.

I issue a challenge to Bay12 programmers.

Challenge: Write a program in any language of your choosing that acts as an interpreter for that language, in that it takes code as input and gives the output from running that code.

Restrictions: If you are using an interpreted language, you cannot simply use a built-in function that takes code as input and gives you the output, like Python's exec() function. You can use anything else, whether it is built-in, code you write, or a third-party library. In addition, simply copying an example from the internet won't teach you anything except how to copy and paste code. This is for people to develop their skills and learn more about different programming languages.

Let's see how many different languages we can get here. In a little bit, if I can find it, I'll post my C++ program.

kaijyuu

  • Bay Watcher
  • Hrm...
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #337 on: January 09, 2012, 11:15:27 pm »

EDIT: Wrong thread.
Logged
Quote from: Chesterton
For, in order that men should resist injustice, something more is necessary than that they should think injustice unpleasant. They must think injustice absurd; above all, they must think it startling. They must retain the violence of a virgin astonishment. When the pessimist looks at any infamy, it is to him, after all, only a repetition of the infamy of existence. But the optimist sees injustice as something discordant and unexpected, and it stings him into action.

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #338 on: January 09, 2012, 11:52:54 pm »

Here is a rough screenie of something I've been working on with python and libtcod.

Spoiler (click to show/hide)

I've been lazy for the last few weeks though and haven't done much.  I think I'll try to put in more of an effort this week.
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #339 on: January 09, 2012, 11:55:50 pm »

Looking pretty good!
What did you do to get FPS? I looked around for it, but can't find it. Python code is good, I can pretty much translate by now...

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #340 on: January 09, 2012, 11:57:12 pm »

Looking pretty good!
What did you do to get FPS? I looked around for it, but can't find it. Python code is good, I can pretty much translate by now...

libtcod has a handy custom method:   :)

Code: [Select]
tcod.console_print(0, 1, 1, 'FPS: ' + str(tcod.sys_get_fps()))
It came in pretty handy when I was trying to improve the performance of my pathfinding and AI. 
« Last Edit: January 09, 2012, 11:58:59 pm by Levi »
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #341 on: January 09, 2012, 11:59:13 pm »

this.face.Impact(this.palm);

How did I miss that? Thanks!

Hmm, might need to start optimising somewhere... Might be a good idea to not go through every tile and give it a chance to update.
Spoiler (click to show/hide)

Edit:
Also, looking at yours Levi, what ate the 'X's? Guys?

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #342 on: January 10, 2012, 12:19:34 am »

this.face.Impact(this.palm);

How did I miss that? Thanks!

Hmm, might need to start optimising somewhere... Might be a good idea to not go through every tile and give it a chance to update.
Spoiler (click to show/hide)

Edit:
Also, looking at yours Levi, what ate the 'X's? Guys?

Xorn's, which is a monster like this that digs.  Right now its just a temporary thing though, most of the digging will be done by the prisoners(which I haven't coded yet). 

Right now you can mark areas for digging and these guys will zoom around and slowly dig it out.
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

NobodyPro

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #343 on: January 10, 2012, 04:02:11 am »

I'm realizing that the bounds of this simulator are causing pain to fake people.

Spoiler (click to show/hide)

She was going to marry Gamjon if the simulation hadn't ended a few weeks before her marriage. D:
Could you link me to the source code of something similar. I like to learn by seeing examples but I have no idea what to google to get something similar.
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #344 on: January 10, 2012, 05:16:39 am »

Hmm, I have had a bit of a revelation.
I figure I want my game to chug along at a nice little 30FPS max. Right now, uncapped, it does mid 60's when running through the visual studio IDE, but if I go and dive in the bin for the .exe that runs at the high 70's to low 80's.
That is for a 2d level that is 100 by 100 tiles in size. Don't get me wrong, 10,000 tiles is nice, but it does seem a little small. Ideally a large map would be 1,000 by 1,000 in size, bringing me up to 1,000,000 tiles. Further more, I'm planning on implementing a third dimension, so if I had about 10z levels, for a huge 3d level, that brings me to 10,000,000 tiles.
Here is where the horror story kicks in. As it is a multi player game, each player could, in theory, be in their own instance, and if they were all in such a huge instance that brings me to x * 10,000,000 so bring three friends along and we are up to 40,000,000 tiles, being updated at a rate of 30 fps, best outcome for a worst case scenario.
Currently 10,000 tiles makes about 80fps...


Fuck this, I'm jumping ship and starting over in c++. I have had a few ideas for how I should have done things in the first place, so it should all go faster this time around, hopefully.
Pages: 1 ... 21 22 [23] 24 25 ... 796