Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 565 566 [567] 568 569 ... 796

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

3man75

  • Bay Watcher
  • I will fire this rocket
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8490 on: November 26, 2015, 12:27:27 pm »

Quick question: I'm looking at two laptops right now for the black friday sail.

Link1 : http://www.brandsmartusa.com/Asus/182488/15+6+Intel+Bay+Trail+M+Laptop+Computer.htm

Link2: http://www.bestbuy.com/site/asus-15-6-laptop-intel-celeron-4gb-memory-500gb-hard-drive-black/4476600.p?id=1219751666691&skuId=4476600

Their both basically the same but one proccesor speed is 1.6 gigahertz and the other is 2.16 gigahertz. As someone who may be using this as a programming computer/college work would the extra proccesor power matter?

I've heard the phrase speed is relevant and it's hard to tell how much more is double the speed.
« Last Edit: November 26, 2015, 12:30:38 pm by 3man75 »
Logged

LoSboccacc

  • Bay Watcher
  • Σὺν Ἀθηνᾷ καὶ χεῖρα κίνει
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8491 on: November 26, 2015, 12:49:12 pm »

I'm really biased against those ultra mobile cpu as they have the habit to throttle back speed under load and are not fast to begin with.

at that price point I fear you're getting very low value for money in the new market.
Logged

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: if self.isCoder(): post() #Programming Thread
« Reply #8492 on: November 26, 2015, 05:20:01 pm »

Those processors are pretty terrible to begin with.

It's also kinda surreal for me seeing a computer on sale for so little. If I wanted to get that in NZ I'd be looking at $400-500.
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.

LoSboccacc

  • Bay Watcher
  • Σὺν Ἀθηνᾷ καὶ χεῖρα κίνει
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8493 on: November 27, 2015, 10:32:09 am »

Those processors are pretty terrible to begin with.

It's also kinda surreal for me seeing a computer on sale for so little. If I wanted to get that in NZ I'd be looking at $400-500.


being european, every time I cruise on newegg a piece of my heart dies. (as well as when I'm looking at how a mustang 500 costs in dollars)
Logged

3man75

  • Bay Watcher
  • I will fire this rocket
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8494 on: November 27, 2015, 04:06:59 pm »

Those processors are pretty terrible to begin with.

It's also kinda surreal for me seeing a computer on sale for so little. If I wanted to get that in NZ I'd be looking at $400-500.

Florida only reedeming quality seems to be everything is cheap. Born and raised an that's all I can tell you that I like. In the end i Settled for this: http://www.bestbuy.com/site/asus-15-6-laptop-intel-celeron-4gb-memory-500gb-hard-drive-black/4476600.p?id=1219751666691&skuId=4476600

Mostly because the Processor speed wasn't as small as the 2.16ghz and because of the massive space for college stuff. I can now safely say that no matter the textbook I can hold it in my PC and not my back. Which has started to hurt more because of the new workloads and i'm only 21. No bueno.

Found a problem that I thought would be interesting to figure out from an old homework question. I'll type it out word by word to be clear because I know theirs been tension when I haven't been clear enough.

"Given numRows and numCols, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print a space after each seat, including after the last. Ex: numRows = 2 and numCols = 3 prints:
1A 1B 1C 2A 2B 2C "

Spoiler (click to show/hide)

If I print the code I have above I get something like this:

"1A 1B 1C
 2A 2B 2C"

What i'm trying to do is get all of these numbers in ONE line. An not two lines like I have above.

It seems trivial but It's just that when I look at the code it feels like it should be in ONE line without an endl anywhere or /n. Ideas?
Logged

Reelya

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8495 on: November 27, 2015, 04:28:21 pm »

You want to remove the cout << endl that is inside the "while rows" loop

3man75

  • Bay Watcher
  • I will fire this rocket
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8496 on: November 27, 2015, 06:38:47 pm »

You want to remove the cout << endl that is inside the "while rows" loop

I feel so ashamed...

Thanks for your help Reelya.
Logged

itisnotlogical

  • Bay Watcher
  • might be dat boi
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8497 on: November 28, 2015, 03:48:31 pm »

In Game Maker, I made a thing that randomly generates... not quite levels, but spaces in which a player can walk, by carving spaces out of the tile map.

Unfortunately, the spaces that it creates don't tend to be very interesting. Below is a fairly typical example:

Spoiler (click to show/hide)

I don't have extremely fine control over the creation process yet, but I'd like to be able to create the feeling of a game like Nethack, where a typical dungeon level is made of rectangle rooms connected by narrow, one-tile-wide hallways. Maybe a bit more natural-looking than that, but that's the general idea.
« Last Edit: November 28, 2015, 03:50:34 pm by itisnotlogical »
Logged
This game is Curtain Fire Shooting Game.
Girls do their best now and are preparing. Please watch warmly until it is ready.

Reelya

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8498 on: November 28, 2015, 05:36:12 pm »

You want to look into maze generation, e.g. Prim's algorithm. This has some theory and an interactive demo:
http://weblog.jamisbuck.org/2011/1/10/maze-generation-prim-s-algorithm
http://weblog.jamisbuck.org/2010/12/27/maze-generation-recursive-backtracking
^ both these algorithms can be made with the same code, just a single different line of code for picking the next tile to open

Once you have a maze generator function you can mix it up with other systems, such as:
http://journal.stuffwithstuff.com/2014/12/21/rooms-and-mazes/

To get that Nethack look.
« Last Edit: November 28, 2015, 05:40:44 pm by Reelya »
Logged

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8499 on: November 28, 2015, 05:56:05 pm »

What you have now could make nice-looking caves from the look of it.
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.

itisnotlogical

  • Bay Watcher
  • might be dat boi
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8500 on: November 28, 2015, 05:57:42 pm »

Ahhh, I see. The way mine works, it creates a number of "carving" objects that have a brush size (how wide the tunnel is), a certain tendency to create new branches, a random chance to change directions, and a random chance to terminate in a perfectly rectangular room, which may itself spawn new tunnels. Not sure if that method has a name, but it seems to create almost Minecraft-like twists and turns, or sometimes just a big empty space with a few pillars and chunks scattered throughout.
Logged
This game is Curtain Fire Shooting Game.
Girls do their best now and are preparing. Please watch warmly until it is ready.

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: if self.isCoder(): post() #Programming Thread
« Reply #8501 on: November 28, 2015, 06:21:09 pm »

Minecraft actually uses a noise function for its caves, which is why they all link up nicely when things are loaded/generated from different directions and such.
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.

itisnotlogical

  • Bay Watcher
  • might be dat boi
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8502 on: November 28, 2015, 06:51:39 pm »

Yeah, it's a function calculated over the length, width and height of the world, right? So the coordinates of a player are actually inputs to the function that makes the stuff.
Logged
This game is Curtain Fire Shooting Game.
Girls do their best now and are preparing. Please watch warmly until it is ready.

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: if self.isCoder(): post() #Programming Thread
« Reply #8503 on: November 28, 2015, 06:57:45 pm »

Uh, they shouldn't be? The generator should only need to know the location of a block, to decide if it should be air or stone.
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.

itisnotlogical

  • Bay Watcher
  • might be dat boi
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #8504 on: November 28, 2015, 07:29:46 pm »

that's what I meant :P
Logged
This game is Curtain Fire Shooting Game.
Girls do their best now and are preparing. Please watch warmly until it is ready.
Pages: 1 ... 565 566 [567] 568 569 ... 796