• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 21:16
CET 03:16
KST 11:16
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3RSL Season 3: RO16 results & RO8 bracket13
StarCraft 2
General
BGE Stara Zagora 2026 announced Weekly Cups (Nov 24-30): MaxPax, Clem, herO win SC2 Proleague Discontinued; SKT, KT, SGK, CJ disband Information Request Regarding Chinese Ladder SC: Evo Complete - Ranked Ladder OPEN ALPHA
Tourneys
$5,000+ WardiTV 2025 Championship Constellation Cup - Main Event - Stellar Fest RSL Revival: Season 3 Tenacious Turtle Tussle [Alpha Pro Series] Nice vs Cure
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation
Brood War
General
Which season is the best in ASL? [ASL20] Ask the mapmakers — Drop your questions BW General Discussion FlaSh's Valkyrie Copium BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[Megathread] Daily Proleagues [BSL21] RO16 Group B - Sunday 21:00 CET [BSL21] RO16 Group C - Saturday 21:00 CET Small VOD Thread 2.0
Strategy
Game Theory for Starcraft How to stay on top of macro? Current Meta PvZ map balance
Other Games
General Games
Stormgate/Frost Giant Megathread The Perfect Game Path of Exile Nintendo Switch Thread Should offensive tower rushing be viable in RTS games?
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine US Politics Mega-thread The Big Programming Thread Artificial Intelligence Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Where to ask questions and add stream? The Automated Ban List
Blogs
James Bond movies ranking - pa…
Topin
Esports Earnings: Bigger Pri…
TrAiDoS
Thanks for the RSL
Hildegard
Saturation point
Uldridge
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1410 users

The Big Programming Thread - Page 371

Forum Index > General Forum
Post a Reply
Prev 1 369 370 371 372 373 1032 Next
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.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
October 09 2013 23:05 GMT
#7401
Any simple and efficient way to see if an array of integers has any duplicates? No nested loops if possible.

I've done a bit of google, and what I've read is:

1. Sort the array
2. See if 2 consecutive elements are the same.

Is this an ok approach?
enigmaticcam
Profile Blog Joined October 2010
United States280 Posts
October 09 2013 23:26 GMT
#7402
You could build a hash table using the integers as keys, checking if a key returns a value first before adding it.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
October 09 2013 23:41 GMT
#7403
On October 10 2013 08:26 enigmaticcam wrote:
You could build a hash table using the integers as keys, checking if a key returns a value first before adding it.


Well, in this case HashSet would be much better.

boolean add(E e)
Adds the specified element to this set if it is not already present.


http://docs.oracle.com/javase/7/docs/api/java/util/HashSet.html
tec27
Profile Blog Joined June 2004
United States3702 Posts
October 10 2013 04:53 GMT
#7404
On October 10 2013 00:01 goody153 wrote:
Show nested quote +
On October 09 2013 06:55 tec27 wrote:
On October 08 2013 18:32 goody153 wrote:
On October 08 2013 13:19 tec27 wrote:
On October 08 2013 06:20 NB wrote:
On October 07 2013 12:39 goody153 wrote:
hi everyone,

i am not really good and just an noob-to-okish programmer .. i wanted to try game development on android .. do you guys have any advice for me ?

and also what language should i be learning ? what are the most important topics i should focus on ? from what i know java is used in making android but thats all i know for now ..

i already made games out of applet using java and also a game web-based using javascript .. so i have a little bit of experience and idea how ..

oh dont quote me on this bc i dont have a lot of on hand experience in android app making.I looked into it in the past as well as having my roommate's gf working in Twitter's android apps department.

Here is a few things:
1/ Compatibility is a big issue for android. Each devices has their own attribute and you have to accommodate for all of them. It is advised that you should start with making apps for apple devices since they are more uniformed.

2/ For mobile devices in general, java, ruby on rails and basic knowledge about html/css and even a bit of SQL are needed. Most smartphone apps has interaction with web and database(loading ads or google store for example)....

3/ Experience android devices yourselves. Bluestack is a good emulator for android on window that im using. Nexus 4 and Nexus 7 are dirt cheap that you could get your hand on. The Android apps market is unexplored and dirt poor of good apps if you compare it to Apple's store. And there is a good reason for that: its easier to make apple apps and people who use apple devices are more likely to pay for apps.

4/ Lastly, for gaming in mobile device in general, just keep in mind that the input system sucks ass. Unless you are making a very simple game and expecting to make graphic your selling point, then you gona have to spend a lot of design time into the input interaction.

Your advice is basically all bad.

1) Android devices are certainly less uniform than Apple devices, but its not that hard to make an app that looks decent across a large part of the population. While the market is fragmented, there are a few devices that take up the lion's share of the market. Namely, the Samsung flagships (S2, S3, S4, Note 2, Note 3) and Nexus devices. Android also has good mechanisms for scaling layouts and resources across device sizes and resolutions, so if you stick to best practices (like specifying sizes in DPs, etc.), its not a problem. Its certainly not a reason to avoid the platform altogether and work on iOS apps. The major pain point is working with Gingerbread and below, but if you're just developing apps as a hobby you can just choose a higher minimum version and sidestep the problem completely.

2) Ruby on Rails? What the fuck does that have to do with Android? Java is the only really necessary piece here. SQL knowledge can be a nice to have, depending on how much data you are going to be storing and what your persistence requirements are. Android has its own layout and style system that's written in XML. Its *somewhat* similar to HTML, but not really. Overall its fairly easy to get started with. Depending on what your app is doing, you may want to develop an API server that your app can talk to, but you can write this in whatever language you damn well please. Or you could use something like Parse to make your life easier.

3) Using something like Bluestacks is a bad idea if you're using it to develop your app and trying to test it on hardware that you don't actually have. That sort of software targets running apps on a PC, not simulating actual hardware interactions. Use the actual emulator that's provided with Android, it works fine and is actually targeted at developers. But overall, developing on an emulator will be mostly frustrating, so buy a cheap Android device or two and use those for your day-to-day work, only going to the emulator when you absolutely need to.

4) Completely game/application type dependent. Obviously you should design applications that work well on the devices they run on.

To reply to you directly, goody:
- Learn Java
- Learn OpenGL ES 2.0 (if you have more JS experience than Java, you could play around with WebGL in the browser, which has the same API)
- Check out the Android developers traininig site: http://developer.android.com/training/index.html


i am more knowledgeable in java than in JS .. one more thing i wanted to ask .. aside from OpenGL ES 2.0 or WebGL ..any other library that is easier to use and integrate unto the android program later ? since i am just making a Tower Defense game its really emphasized on the graphics much ..

and also i have been doing sort of research .. what version of android should i work on ? some told me to work on lower versions like 2.0 to 2.5 ... somewhere around that

and in the database part of the development .. would my knowledge on php help on that matter ? or its a separate thing

anyways thanks for the great advice tec27

2.3.x is the last version of Android with major version 2, so I'm not quite sure where you're getting your information from You should avoid Gingerbread (2.3.x/API 10) imo, as its crufty and old. The APIs and OS have improved substantially since then. Personally I would just pick whatever version you development device is running, ideally some version of JellyBean (4.1.x, 4.2.x, 4.3.x, API 16+). You should accept that whatever you're working on now will never be a major hit in the app store and therefore trying to "maximize your market" is a useless endeavor. Just focus on learning Android and seeing if you like it.

Knowledge of PHP will likely not be very helpful, unless you're talking about actually interfacing with databases. Android apps that use databases typically use SQLite, but I would think that for a simple game, you won't be touching databases at all.

so i should go for the new versions ? .. i am worried that the game that i will develop will not be compatible in some of the android devices especially cheap android phones that why i aim for the lower versions ..

no worries i am actually just learning to develop in android for fun not aiming for money or anything ... i am still a university student so i dont think i have huge amount of time i can spare to those sort of stuff that requires investing too much time and money you know hehe .. it just turns out that i have some time to spare that is not allocated in either playing/watching games or doing school works .. and i am fascinated with the game development i find it really fun ..

since i have a little experience in coding in java and familiar with applets/MIDP(i know nobody uses this shit anymore) .. i thought i could learn android since it involves java hehe ..

Not caring about money and such is exactly why you should only care about new versions. The only reason people continue to support old versions is to increase their possible market (and therefore installs/sales). For someone just trying to learn stuff and play around, your market is you. As long as you have a device to support it, it doesn't matter if you don't support some other random old device someone may have. No point in spending time developing compatibility layers for all the stuff Gingerbread doesn't have/has buggy support for when you're just starting out.
Can you jam with the console cowboys in cyberspace?
Tobberoth
Profile Joined August 2010
Sweden6375 Posts
October 10 2013 07:00 GMT
#7405
On October 10 2013 13:53 tec27 wrote:
Show nested quote +
On October 10 2013 00:01 goody153 wrote:
On October 09 2013 06:55 tec27 wrote:
On October 08 2013 18:32 goody153 wrote:
On October 08 2013 13:19 tec27 wrote:
On October 08 2013 06:20 NB wrote:
On October 07 2013 12:39 goody153 wrote:
hi everyone,

i am not really good and just an noob-to-okish programmer .. i wanted to try game development on android .. do you guys have any advice for me ?

and also what language should i be learning ? what are the most important topics i should focus on ? from what i know java is used in making android but thats all i know for now ..

i already made games out of applet using java and also a game web-based using javascript .. so i have a little bit of experience and idea how ..

oh dont quote me on this bc i dont have a lot of on hand experience in android app making.I looked into it in the past as well as having my roommate's gf working in Twitter's android apps department.

Here is a few things:
1/ Compatibility is a big issue for android. Each devices has their own attribute and you have to accommodate for all of them. It is advised that you should start with making apps for apple devices since they are more uniformed.

2/ For mobile devices in general, java, ruby on rails and basic knowledge about html/css and even a bit of SQL are needed. Most smartphone apps has interaction with web and database(loading ads or google store for example)....

3/ Experience android devices yourselves. Bluestack is a good emulator for android on window that im using. Nexus 4 and Nexus 7 are dirt cheap that you could get your hand on. The Android apps market is unexplored and dirt poor of good apps if you compare it to Apple's store. And there is a good reason for that: its easier to make apple apps and people who use apple devices are more likely to pay for apps.

4/ Lastly, for gaming in mobile device in general, just keep in mind that the input system sucks ass. Unless you are making a very simple game and expecting to make graphic your selling point, then you gona have to spend a lot of design time into the input interaction.

Your advice is basically all bad.

1) Android devices are certainly less uniform than Apple devices, but its not that hard to make an app that looks decent across a large part of the population. While the market is fragmented, there are a few devices that take up the lion's share of the market. Namely, the Samsung flagships (S2, S3, S4, Note 2, Note 3) and Nexus devices. Android also has good mechanisms for scaling layouts and resources across device sizes and resolutions, so if you stick to best practices (like specifying sizes in DPs, etc.), its not a problem. Its certainly not a reason to avoid the platform altogether and work on iOS apps. The major pain point is working with Gingerbread and below, but if you're just developing apps as a hobby you can just choose a higher minimum version and sidestep the problem completely.

2) Ruby on Rails? What the fuck does that have to do with Android? Java is the only really necessary piece here. SQL knowledge can be a nice to have, depending on how much data you are going to be storing and what your persistence requirements are. Android has its own layout and style system that's written in XML. Its *somewhat* similar to HTML, but not really. Overall its fairly easy to get started with. Depending on what your app is doing, you may want to develop an API server that your app can talk to, but you can write this in whatever language you damn well please. Or you could use something like Parse to make your life easier.

3) Using something like Bluestacks is a bad idea if you're using it to develop your app and trying to test it on hardware that you don't actually have. That sort of software targets running apps on a PC, not simulating actual hardware interactions. Use the actual emulator that's provided with Android, it works fine and is actually targeted at developers. But overall, developing on an emulator will be mostly frustrating, so buy a cheap Android device or two and use those for your day-to-day work, only going to the emulator when you absolutely need to.

4) Completely game/application type dependent. Obviously you should design applications that work well on the devices they run on.

To reply to you directly, goody:
- Learn Java
- Learn OpenGL ES 2.0 (if you have more JS experience than Java, you could play around with WebGL in the browser, which has the same API)
- Check out the Android developers traininig site: http://developer.android.com/training/index.html


i am more knowledgeable in java than in JS .. one more thing i wanted to ask .. aside from OpenGL ES 2.0 or WebGL ..any other library that is easier to use and integrate unto the android program later ? since i am just making a Tower Defense game its really emphasized on the graphics much ..

and also i have been doing sort of research .. what version of android should i work on ? some told me to work on lower versions like 2.0 to 2.5 ... somewhere around that

and in the database part of the development .. would my knowledge on php help on that matter ? or its a separate thing

anyways thanks for the great advice tec27

2.3.x is the last version of Android with major version 2, so I'm not quite sure where you're getting your information from You should avoid Gingerbread (2.3.x/API 10) imo, as its crufty and old. The APIs and OS have improved substantially since then. Personally I would just pick whatever version you development device is running, ideally some version of JellyBean (4.1.x, 4.2.x, 4.3.x, API 16+). You should accept that whatever you're working on now will never be a major hit in the app store and therefore trying to "maximize your market" is a useless endeavor. Just focus on learning Android and seeing if you like it.

Knowledge of PHP will likely not be very helpful, unless you're talking about actually interfacing with databases. Android apps that use databases typically use SQLite, but I would think that for a simple game, you won't be touching databases at all.

so i should go for the new versions ? .. i am worried that the game that i will develop will not be compatible in some of the android devices especially cheap android phones that why i aim for the lower versions ..

no worries i am actually just learning to develop in android for fun not aiming for money or anything ... i am still a university student so i dont think i have huge amount of time i can spare to those sort of stuff that requires investing too much time and money you know hehe .. it just turns out that i have some time to spare that is not allocated in either playing/watching games or doing school works .. and i am fascinated with the game development i find it really fun ..

since i have a little experience in coding in java and familiar with applets/MIDP(i know nobody uses this shit anymore) .. i thought i could learn android since it involves java hehe ..

Not caring about money and such is exactly why you should only care about new versions. The only reason people continue to support old versions is to increase their possible market (and therefore installs/sales). For someone just trying to learn stuff and play around, your market is you. As long as you have a device to support it, it doesn't matter if you don't support some other random old device someone may have. No point in spending time developing compatibility layers for all the stuff Gingerbread doesn't have/has buggy support for when you're just starting out.

Hell, even if you plan to make commercial stuff, this is still a good choice since you're starting out. By the time you can make android apps people might actually be willing to pay for, the old versions should be phased out. People actually switch cellphones quite often nowadays and even older cellphones usually support the newer android versions.
adwodon
Profile Blog Joined September 2010
United Kingdom592 Posts
October 10 2013 09:05 GMT
#7406
On October 10 2013 00:01 goody153 wrote:
Show nested quote +
On October 09 2013 06:55 tec27 wrote:
On October 08 2013 18:32 goody153 wrote:
On October 08 2013 13:19 tec27 wrote:
On October 08 2013 06:20 NB wrote:
On October 07 2013 12:39 goody153 wrote:
hi everyone,

i am not really good and just an noob-to-okish programmer .. i wanted to try game development on android .. do you guys have any advice for me ?

and also what language should i be learning ? what are the most important topics i should focus on ? from what i know java is used in making android but thats all i know for now ..

i already made games out of applet using java and also a game web-based using javascript .. so i have a little bit of experience and idea how ..

oh dont quote me on this bc i dont have a lot of on hand experience in android app making.I looked into it in the past as well as having my roommate's gf working in Twitter's android apps department.

Here is a few things:
1/ Compatibility is a big issue for android. Each devices has their own attribute and you have to accommodate for all of them. It is advised that you should start with making apps for apple devices since they are more uniformed.

2/ For mobile devices in general, java, ruby on rails and basic knowledge about html/css and even a bit of SQL are needed. Most smartphone apps has interaction with web and database(loading ads or google store for example)....

3/ Experience android devices yourselves. Bluestack is a good emulator for android on window that im using. Nexus 4 and Nexus 7 are dirt cheap that you could get your hand on. The Android apps market is unexplored and dirt poor of good apps if you compare it to Apple's store. And there is a good reason for that: its easier to make apple apps and people who use apple devices are more likely to pay for apps.

4/ Lastly, for gaming in mobile device in general, just keep in mind that the input system sucks ass. Unless you are making a very simple game and expecting to make graphic your selling point, then you gona have to spend a lot of design time into the input interaction.

Your advice is basically all bad.

1) Android devices are certainly less uniform than Apple devices, but its not that hard to make an app that looks decent across a large part of the population. While the market is fragmented, there are a few devices that take up the lion's share of the market. Namely, the Samsung flagships (S2, S3, S4, Note 2, Note 3) and Nexus devices. Android also has good mechanisms for scaling layouts and resources across device sizes and resolutions, so if you stick to best practices (like specifying sizes in DPs, etc.), its not a problem. Its certainly not a reason to avoid the platform altogether and work on iOS apps. The major pain point is working with Gingerbread and below, but if you're just developing apps as a hobby you can just choose a higher minimum version and sidestep the problem completely.

2) Ruby on Rails? What the fuck does that have to do with Android? Java is the only really necessary piece here. SQL knowledge can be a nice to have, depending on how much data you are going to be storing and what your persistence requirements are. Android has its own layout and style system that's written in XML. Its *somewhat* similar to HTML, but not really. Overall its fairly easy to get started with. Depending on what your app is doing, you may want to develop an API server that your app can talk to, but you can write this in whatever language you damn well please. Or you could use something like Parse to make your life easier.

3) Using something like Bluestacks is a bad idea if you're using it to develop your app and trying to test it on hardware that you don't actually have. That sort of software targets running apps on a PC, not simulating actual hardware interactions. Use the actual emulator that's provided with Android, it works fine and is actually targeted at developers. But overall, developing on an emulator will be mostly frustrating, so buy a cheap Android device or two and use those for your day-to-day work, only going to the emulator when you absolutely need to.

4) Completely game/application type dependent. Obviously you should design applications that work well on the devices they run on.

To reply to you directly, goody:
- Learn Java
- Learn OpenGL ES 2.0 (if you have more JS experience than Java, you could play around with WebGL in the browser, which has the same API)
- Check out the Android developers traininig site: http://developer.android.com/training/index.html


i am more knowledgeable in java than in JS .. one more thing i wanted to ask .. aside from OpenGL ES 2.0 or WebGL ..any other library that is easier to use and integrate unto the android program later ? since i am just making a Tower Defense game its really emphasized on the graphics much ..

and also i have been doing sort of research .. what version of android should i work on ? some told me to work on lower versions like 2.0 to 2.5 ... somewhere around that

and in the database part of the development .. would my knowledge on php help on that matter ? or its a separate thing

anyways thanks for the great advice tec27

2.3.x is the last version of Android with major version 2, so I'm not quite sure where you're getting your information from You should avoid Gingerbread (2.3.x/API 10) imo, as its crufty and old. The APIs and OS have improved substantially since then. Personally I would just pick whatever version you development device is running, ideally some version of JellyBean (4.1.x, 4.2.x, 4.3.x, API 16+). You should accept that whatever you're working on now will never be a major hit in the app store and therefore trying to "maximize your market" is a useless endeavor. Just focus on learning Android and seeing if you like it.

Knowledge of PHP will likely not be very helpful, unless you're talking about actually interfacing with databases. Android apps that use databases typically use SQLite, but I would think that for a simple game, you won't be touching databases at all.

so i should go for the new versions ? .. i am worried that the game that i will develop will not be compatible in some of the android devices especially cheap android phones that why i aim for the lower versions ..

no worries i am actually just learning to develop in android for fun not aiming for money or anything ... i am still a university student so i dont think i have huge amount of time i can spare to those sort of stuff that requires investing too much time and money you know hehe .. it just turns out that i have some time to spare that is not allocated in either playing/watching games or doing school works .. and i am fascinated with the game development i find it really fun ..

since i have a little experience in coding in java and familiar with applets/MIDP(i know nobody uses this shit anymore) .. i thought i could learn android since it involves java hehe ..


Firstly, you won't make any money on android even if you wanted to, I've spoken to plenty of devs out there who's android versions have 1,000s of units registered but have sales figures literally in the single digits for the platform, maybe I just know unlucky devs but it's not ideal at the moment.

Secondly, approaching it from a purely academic / learning perspective you should absolutely start with the latest version, the exception being if you have someone with a lot of experience teaching you what he knows which may focus on lower versions. It'll ingrain the latest techniques and you'll learn about the more interesting things, plus you can experiment.

However if you find you finish your project and wish to continue learning then by all means try to make it compatible with previous versions, while this may not be possible as you may have constructed it in such a way that relies on new features (I'm not so familiar with android so I don't know how easy this is to do) however just looking at it, see what you'd need to do will teach you valuable lessons about compatibility, how to design your applications in future to make compatibility smoother etc, all of which is extremely valuable in the fast moving world of tech.

Of course the opposite is also true, crafting something in a lower version then updating it with new shiny things but I don't think you'd get the same learning experience as you wouldn't hit the same roadblocks or understand which features are newer and why in the same way.

That's my 2 cents.
NB
Profile Blog Joined February 2010
Netherlands12045 Posts
October 11 2013 02:29 GMT
#7407
lol, so to update on my Snake game:

I finally got the input to work. Read a lot of comments here as well as did my own research and still didnt have a clue what I was doing wrong. I got the render rate and updaterate config in multiple different ways but non of them yield the result that i wanted. Finally decided to set it aside, recode the entire game from scratch to improve and smooth out stuff. Mid way through: BINGO! All i need is a bool flag to declare that input is received and the game state should not be changed until it get processed by the automated thread. To extend for future project, I could set a clock object to get the input lag that i want by modifying that flag. :-/

Sometimes it just takes you 3 days to remember about the most fundamental trick ON/OFF in programming =.=

My next step would be learning how to work with Vertex and Sprite in SFML. With this site i just found http://opengameart.org/, Im gona have a lot of fun.
Im daed. Follow me @TL_NB
Tobberoth
Profile Joined August 2010
Sweden6375 Posts
October 11 2013 07:16 GMT
#7408
On October 11 2013 11:29 NB wrote:
lol, so to update on my Snake game:

I finally got the input to work. Read a lot of comments here as well as did my own research and still didnt have a clue what I was doing wrong. I got the render rate and updaterate config in multiple different ways but non of them yield the result that i wanted. Finally decided to set it aside, recode the entire game from scratch to improve and smooth out stuff. Mid way through: BINGO! All i need is a bool flag to declare that input is received and the game state should not be changed until it get processed by the automated thread. To extend for future project, I could set a clock object to get the input lag that i want by modifying that flag. :-/

Sometimes it just takes you 3 days to remember about the most fundamental trick ON/OFF in programming =.=

My next step would be learning how to work with Vertex and Sprite in SFML. With this site i just found http://opengameart.org/, Im gona have a lot of fun.

Glad to hear you got it working

I've had similar problems myself with my SFML coding, it's so easy to become so involved with more complex matters that you lose sight of the simple things. At the same time, that's sort of the charm of game programming IMO, it tests your programming skills in ways "normal" programs do not.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2013-10-14 12:18:54
October 14 2013 12:12 GMT
#7409
Would you say most companies don't optimise their software on purpose so that hardware companies can earn more? Kind of like good-bad cop and mutual benefits, e.g. hardware companies pay software companies.

I'm also annoyed how Nero turned into more than a burn-a-disk software. It's full of useless stuff. Even if you are able to deselect some features, this doesn't help programs like Adobe Acrobat Reader where you want just a .PDF reader, but it gets more hungry and more hungry after releases.

I'm annoyed how much resources everything requires these days. For instance, Skype gets almost 200 MB RAM for me, SC2 is about 1 GB RAM... etc, etc.

Edit: I'm aware optimisation is probably hard but I even suspect that chosen algorithms are poor.

Edit #2: I'd happily go with e.g. Skype 3.8 and Acrobat Reader 6 if Windows 7 doesn't complain. Sadly, it does. I've tried to run old software using XP settings from Properties but it doesn't work for e.g. Skype, at least it doesn't work for me.
tofucake
Profile Blog Joined October 2009
Hyrule19167 Posts
October 14 2013 12:18 GMT
#7410
Most companies don't optimize because it's generally not worth the cost. There's no backroom deals or anything.
Liquipediaasante sana squash banana
Tobberoth
Profile Joined August 2010
Sweden6375 Posts
October 14 2013 12:18 GMT
#7411
On October 14 2013 21:12 darkness wrote:
Would you say most companies don't optimise their software on purpose so that hardware companies can earn more? Kind of like good-bad cop and mutual benefits, e.g. hardware companies pay software companies.

I'm also annoyed how Nero turned into more than a burn-a-disk software. It's full of useless stuff. Even if you are able to deselect some features, this doesn't help programs like Adobe Acrobat Reader where you want just a .PDF reader, but it gets more hungry and more hungry after releases.

I'm annoyed how much resources everything requires these days. For instance, Skype gets almost 200 MB RAM for me, SC2 is about 1 GB RAM... etc, etc.

Edit: I'm aware optimisation is probably hard but I even suspect that chosen algorithms are poor.

Skype only takes 77MB on my computer. As for Starcraft 2, it's not surprising that games use a lot of RAM, and it's fine since a game is almost always something you're doing exclusively, there's rarely a reason to run photoshop, visual studio and other huge programs in the background while playing a game.

I don't think companies actively try to take a lot of resources to benefit hardware companies, but there's definitely a movement towards more productivity less optimization since computer resources have become so bountiful. I mean, Skype could probably be optimized a ton by removing some of the bloat, I can't understand why a chat program not in use demands over 50MB RAM.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2013-10-14 12:27:20
October 14 2013 12:23 GMT
#7412
On October 14 2013 21:18 Tobberoth wrote:
Show nested quote +
On October 14 2013 21:12 darkness wrote:
Would you say most companies don't optimise their software on purpose so that hardware companies can earn more? Kind of like good-bad cop and mutual benefits, e.g. hardware companies pay software companies.

I'm also annoyed how Nero turned into more than a burn-a-disk software. It's full of useless stuff. Even if you are able to deselect some features, this doesn't help programs like Adobe Acrobat Reader where you want just a .PDF reader, but it gets more hungry and more hungry after releases.

I'm annoyed how much resources everything requires these days. For instance, Skype gets almost 200 MB RAM for me, SC2 is about 1 GB RAM... etc, etc.

Edit: I'm aware optimisation is probably hard but I even suspect that chosen algorithms are poor.

Skype only takes 77MB on my computer. As for Starcraft 2, it's not surprising that games use a lot of RAM, and it's fine since a game is almost always something you're doing exclusively, there's rarely a reason to run photoshop, visual studio and other huge programs in the background while playing a game.

I don't think companies actively try to take a lot of resources to benefit hardware companies, but there's definitely a movement towards more productivity less optimization since computer resources have become so bountiful. I mean, Skype could probably be optimized a ton by removing some of the bloat, I can't understand why a chat program not in use demands over 50MB RAM.


Do you use the newest version or is it because I have a running call which needs to take more than 120 MB RAM?

Here's a screenshot:

[image loading]

Firefox is another case of hungry application. 3 tabs and it gets 400 MB RAM. Wtf. Can a reason be that there are memory leaks or is it just their implementation?

Edit: Is another reason that 32 bit programs go through some kind of emulation on Windows's side because I use an x64 version?
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2013-10-14 13:13:54
October 14 2013 13:06 GMT
#7413
--- Nuked ---
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2013-10-14 13:08:02
October 14 2013 13:07 GMT
#7414
--- Nuked ---
Zocat
Profile Joined April 2010
Germany2229 Posts
Last Edited: 2013-10-14 13:16:46
October 14 2013 13:16 GMT
#7415
Optimization is most of the time not worth the cost. I even heard Eclipse is running fine on today's systems. Time will solve some problems

You're free to use a more lightweight PDF reader.
Since you still use Adobe Reader, apparently the problem isnt big enough.
Tobberoth
Profile Joined August 2010
Sweden6375 Posts
October 14 2013 13:57 GMT
#7416
On October 14 2013 22:16 Zocat wrote:
Optimization is most of the time not worth the cost. I even heard Eclipse is running fine on today's systems. Time will solve some problems

You're free to use a more lightweight PDF reader.
Since you still use Adobe Reader, apparently the problem isnt big enough.

This is probably a huge issue right there: Why would developers develop optimized software when it's not being picked over non-optimized software? Tons of people prefer foobar2000 to other music players because of the speed and optimization, but it's not even close to the market share of non-optimized crap like iTunes.
NB
Profile Blog Joined February 2010
Netherlands12045 Posts
October 14 2013 14:50 GMT
#7417
The graphic course material this week started to get real. Vector matrices everywhere.
Im daed. Follow me @TL_NB
bangsholt
Profile Joined June 2011
Denmark138 Posts
October 14 2013 15:35 GMT
#7418
On October 14 2013 22:57 Tobberoth wrote:
Show nested quote +
On October 14 2013 22:16 Zocat wrote:
Optimization is most of the time not worth the cost. I even heard Eclipse is running fine on today's systems. Time will solve some problems

You're free to use a more lightweight PDF reader.
Since you still use Adobe Reader, apparently the problem isnt big enough.

This is probably a huge issue right there: Why would developers develop optimized software when it's not being picked over non-optimized software? Tons of people prefer foobar2000 to other music players because of the speed and optimization, but it's not even close to the market share of non-optimized crap like iTunes.


Do you really think that the layman knows / cares / picks based on optimization?

Speed I can agree with, if I can change it to response time.

What people tend to care about, is that the UI feels responsive and that things happen in a reasonable time frame after you pressed the song that you want to listen to, and if not, that the UI is clearly showing that it is loading the song currently.

Tobberoth
Profile Joined August 2010
Sweden6375 Posts
October 14 2013 16:05 GMT
#7419
On October 15 2013 00:35 bangsholt wrote:
Show nested quote +
On October 14 2013 22:57 Tobberoth wrote:
On October 14 2013 22:16 Zocat wrote:
Optimization is most of the time not worth the cost. I even heard Eclipse is running fine on today's systems. Time will solve some problems

You're free to use a more lightweight PDF reader.
Since you still use Adobe Reader, apparently the problem isnt big enough.

This is probably a huge issue right there: Why would developers develop optimized software when it's not being picked over non-optimized software? Tons of people prefer foobar2000 to other music players because of the speed and optimization, but it's not even close to the market share of non-optimized crap like iTunes.


Do you really think that the layman knows / cares / picks based on optimization?

Speed I can agree with, if I can change it to response time.

What people tend to care about, is that the UI feels responsive and that things happen in a reasonable time frame after you pressed the song that you want to listen to, and if not, that the UI is clearly showing that it is loading the song currently.


I agree, which is why optimization just isn't worth the effort for most companies.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2013-10-14 17:10:06
October 14 2013 17:02 GMT
#7420
Yep, that's a huge part of the UX aspect of programming. :D

This is also a great video I found about responsible design.

http://www.webstock.org.nz/talks/how-designers-destroyed-the-world/
There is no one like you in the universe.
Prev 1 369 370 371 372 373 1032 Next
Please log in or register to reply.
Live Events Refresh
PiGosaur Monday
01:00
#60
PiGStarcraft573
SteadfastSC112
CranKy Ducklings92
rockletztv 25
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft573
SteadfastSC 112
Nathanias 69
StarCraft: Brood War
Artosis 786
Noble 5
League of Legends
C9.Mang0285
Counter-Strike
minikerr30
Other Games
summit1g15129
Day[9].tv844
JimRising 484
taco 172
ViBE132
Mew2King37
CosmosSc2 32
Organizations
Other Games
gamesdonequick1156
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Hupsaiya 71
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Azhi_Dahaki2
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Other Games
• Scarra1579
• Day9tv844
Upcoming Events
Wardi Open
9h 44m
StarCraft2.fi
14h 44m
Replay Cast
21h 44m
The PondCast
1d 7h
OSC
1d 13h
Demi vs Mixu
Nicoract vs TBD
Babymarine vs MindelVK
ForJumy vs TBD
Shameless vs Percival
Replay Cast
1d 21h
Korean StarCraft League
3 days
CranKy Ducklings
3 days
SC Evo League
3 days
BSL 21
3 days
Sziky vs OyAji
Gypsy vs eOnzErG
[ Show More ]
OSC
3 days
Solar vs Creator
ByuN vs Gerald
Percival vs Babymarine
Moja vs Krystianer
EnDerr vs ForJumy
sebesdes vs Nicoract
Sparkling Tuna Cup
4 days
OSC
4 days
BSL 21
4 days
Bonyth vs StRyKeR
Tarson vs Dandy
Replay Cast
5 days
Wardi Open
5 days
StarCraft2.fi
5 days
Replay Cast
5 days
StarCraft2.fi
6 days
PiGosaur Monday
6 days
Liquipedia Results

Completed

Proleague 2025-11-30
RSL Revival: Season 3
Light HT

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
Slon Tour Season 2
Acropolis #4 - TS3
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
Kuram Kup
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.