The Big Programming Thread - Page 952
Forum Index > General Forum |
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. | ||
spinesheath
Germany8679 Posts
| ||
WarSame
Canada1950 Posts
On March 22 2018 17:15 Excludos wrote: Very Janky, like duplicate slide bars. That said the main problem I have is I don't quite understand how to use it. It's not super user friendly, especially without instructions How would you like instructions to be displayed to you? Would a tool-tip question mark beside the main slider box with a modal pop-up be good? The instructions themselves are just to move the sliders around to represent the number of houses/railroads/utilities owned and see how different squares compare - the sum value is 40, so a value of 1 means a square is 1/2 as valuable as a square with a value of 2. It is super janky. Pug is fucking up the rendering for whatever reason. I'm looking into fixing that, but at least it works for now. | ||
Excludos
Norway7685 Posts
On March 23 2018 10:11 WarSame wrote: How would you like instructions to be displayed to you? Would a tool-tip question mark beside the main slider box with a modal pop-up be good? The instructions themselves are just to move the sliders around to represent the number of houses/railroads/utilities owned and see how different squares compare - the sum value is 40, so a value of 1 means a square is 1/2 as valuable as a square with a value of 2. It is super janky. Pug is fucking up the rendering for whatever reason. I'm looking into fixing that, but at least it works for now. That middle part is what I don't get. Does "owning houses" make probability change even if it doesn't matter where does houses are placed? Shouldn't it matter where those houses are placed? Like why does "owning houses" make it better for me to take Mediterranean Avenue? And shouldn't it be more than 5? I haven't played monopoly in a while (Because, as board games go, it's one of the shittier ones. It's up there with Risk on "How to make your friends hate you"), but I seem to remember that you can have much more than 5 (Or rather, they combine to make a big house). As for instructions, there's really no one answer here. I'd be fine with just a question mark button you can hover over and get a tooltip from, tho that can be easy to miss. You could just have the text at the top or bottom, depending on how long it is. Or you can just mess around with it and see what fits best | ||
tofucake
Hyrule18772 Posts
1. buy as much of the first row as possible 2. build houses 3. never upgrade to hotels | ||
Acrofales
Spain17186 Posts
On March 23 2018 21:31 tofucake wrote: monopoly is easy: 1. buy as much of the first row as possible 2. build houses 3. never upgrade to hotels Honestly, monopoly you should just always buy what you land on as long as you have money to do so. Even if you don't want it, someone will want to trade it later on. Except maybe the utilities. Those can lead to some good earlygame cash, but don't make a dent when people start building houses. | ||
WarSame
Canada1950 Posts
On March 23 2018 17:18 Excludos wrote: That middle part is what I don't get. Does "owning houses" make probability change even if it doesn't matter where does houses are placed? Shouldn't it matter where those houses are placed? Like why does "owning houses" make it better for me to take Mediterranean Avenue? And shouldn't it be more than 5? I haven't played monopoly in a while (Because, as board games go, it's one of the shittier ones. It's up there with Risk on "How to make your friends hate you"), but I seem to remember that you can have much more than 5 (Or rather, they combine to make a big house). As for instructions, there's really no one answer here. I'd be fine with just a question mark button you can hover over and get a tooltip from, tho that can be easy to miss. You could just have the text at the top or bottom, depending on how long it is. Or you can just mess around with it and see what fits best The number display is "value", not probability. The squares have different rent progression, so at different numbers of houses they have different value ratios. The program just assumes you have the number of house on each square equivalent to the slider's value. You can only have up to 5 houses(the 5th is the hotel). Monopoly is a terrible game. It was actually designed to be a terrible game to show people the dangers of capitalism. https://en.wikipedia.org/wiki/Monopoly_(game)#Early_history I'll get to the instructions section after I fix the basic UI, but I appreciate your feedback and I'll look back at it when I get there. On March 23 2018 21:31 tofucake wrote: monopoly is easy: 1. buy as much of the first row as possible 2. build houses 3. never upgrade to hotels That's a surprisingly viable strategy. They would have to upgrade 0 houses -> hotel which is impossible with no revenue. On March 23 2018 21:42 Acrofales wrote: Honestly, monopoly you should just always buy what you land on as long as you have money to do so. Even if you don't want it, someone will want to trade it later on. Except maybe the utilities. Those can lead to some good earlygame cash, but don't make a dent when people start building houses. Utilities are great if you're playing with people who aren't going to trade with each other. The earlier you think the first monopoly will appear the worse they are. | ||
WarSame
Canada1950 Posts
https://xqc864csp7.execute-api.ca-central-1.amazonaws.com/prod/ | ||
ZerOCoolSC2
8704 Posts
| ||
WolfintheSheep
Canada14127 Posts
On March 28 2018 03:55 ZerOCoolSC2 wrote: I know it can be done, but I can't think of the solution. How do you narrowly search for GPS location in C#? Say, if you wanted to know if there was another user within a 2-3 block radius from where you are? I found some stuff on Stack Overflow, but I need to add a function to search for nearby users instead of just getting your current location. Well, you're going to need some kind of centralized system that will store GPS locations, at least temporarily. And of course every user that comes up in the search also has to be giving their location to your centralized system. After that, it's just math. | ||
ZerOCoolSC2
8704 Posts
| ||
WolfintheSheep
Canada14127 Posts
On March 28 2018 05:00 ZerOCoolSC2 wrote: What would be some of the functions that would need to be called? I'd check the server almost every x amount of seconds to see if there were nearby users, get that. It would need to be so that if the app signature is no longer in the area, then it bounces to the next one until it gets a hit. That really depends on what you're trying to do with those GPS locations. | ||
tofucake
Hyrule18772 Posts
| ||
emperorchampion
Canada9495 Posts
On March 28 2018 05:52 tofucake wrote: Haversine is used to calculate the distance between two GPS coords 2-3 block radius you just use ||x1-x2||_2 I imagine :p | ||
emperorchampion
Canada9495 Posts
On March 28 2018 05:00 ZerOCoolSC2 wrote: What would be some of the functions that would need to be called? I'd check the server almost every x amount of seconds to see if there were nearby users, get that. It would need to be so that if the app signature is no longer in the area, then it bounces to the next one until it gets a hit. If I understand correctly, the naive way would be to calculate the distance between each user using whatever distance metric. I’m sure if you think or search around there are more elegant ways (i.e., if you know two users are far apart based on earlier calculations no need to check the distance between a third user that is close to either one of them). | ||
ZerOCoolSC2
8704 Posts
| ||
emperorchampion
Canada9495 Posts
On March 28 2018 06:34 ZerOCoolSC2 wrote: I just need to see if two users are within the same area in order for an event to be triggered. They don't have to keep GPS on, they just need to "upload" their current location and then the app needs to see if there is another person with the app installed nearby in order to trigger the event. Like Wolf said, the locations are stored temporarily until they match or they move out of the radius. Mm I would take the norm of the difference of every entry in the database and add it to a matrix. If any entry is less than my specified distance then do stuff. If you have a lot of users then you probably do something more clever to save time and memory. Edit: of course when a new user is added you just calculate that user | ||
ZerOCoolSC2
8704 Posts
| ||
Thaniri
1264 Posts
https://github.com/jezen/is-thirteen | ||
Deleted User 3420
24492 Posts
| ||
Acrofales
Spain17186 Posts
On March 29 2018 09:33 Thaniri wrote: Another fantastic repo has been spotted: https://github.com/jezen/is-thirteen Suddenly a rigidly controlled set of libraries is more and more attractive. Whoda thunk curation of the crap that people commit as "libraries" would be important? | ||
| ||