Skip to content

u/rellikiox

In this archive from Mar 2011 to Mar 2015

2
posts
28
comments
0
media
382
score

My grandfather worked for a mayor telecommunications company laying down the infrastructure to get phone lines to new places, but he was colorblind (red-green if I recall correctly), so cutting the right cables was a problem. To fix this, he got a pair of glasses with red lenses so that red cables would appear white, so he knew which one was which.

1 points

If I'm not mistaken that's comparing b1 and b2, and since those are pointers they contain the memory address of two objects, and then it's putting the one with the smallest memory address in object1 and the other one in object2. If you wanted to compare the actual objects those addresses are pointing to you would have to use the * operator:

if( *b1 < *b2 )    

That is comparing the values b1 and b2 point to.

Here's a more in depth guide about pointers.

3 points

Well, I don't really know yet, as I want to try several things to both learn how they work, and see if they are useful. Among other things I want to try to use Fuzzy Logic to determine the behaviour of each city in terms of Commerce (yes, the cities will be able to commerce with each other, if they want to), Research (to be able to use higher level resources to their advantage) and anything else I can think of. Also, I want to use Neural Networks to see if I can make cities learn.

It's not going to be easy, but I'm eager to learn all this!

1 points

It's always a bit disheartening when you make a new version, try something new and then everything breaks and you spent 3 days trying to make it work and then go back to the previous version

That happens a lot, get used to it :D.

I spent 5 straight hours hunting down a bug (the ray-casting only detected two or three collisions when it should detect five). It turned out to be a one line bug, and it wasn't even a bug.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.