• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 17:53
CEST 23:53
KST 06:53
  • 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
Serral wins Maestros of the Game 239ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12TL.net Map Contest #22 - Voting & Ladder Map Selection7
Community News
BSL Season 22 Full Overview & Conclusion6BSL Season 22 Full Overview & Conclusion6Weekly Cups (June 29-July 5): Solar Doubles0MC vs IdrA, Boxer vs Nal_rA to be Legacy Matches @ BlizzCon445.0.16 Hotfix (June 30) - Balance + Bug Fixes40
StarCraft 2
General
Serral wins Maestros of the Game 2 What is your PC setup in 2026 for SCBW/SC2 ? Most successful SC2 players of Q2 2026 MC vs IdrA, Boxer vs Nal_rA to be Legacy Matches @ BlizzCon Is the larve respawn broken?
Tourneys
RSL Revival: Season 6 - Qualifiers and Main Event GSL CK #5 Race War HomeStory Cup 29 Vespene Cup #1 — $300+ USD, July 10 Sea Duckling Open (Global, Bronze-Diamond)
Strategy
[G] Having the right mentality to improve
Custom Maps
New Map Maker - Looking for Advice - Love or Hate Work In Progress Melee Maps [D]RTS in all its shapes and glory <3
External Content
Mutation # 534 Burning Evacuation Mutation # 533 Die Together The PondCast: SC2 News & Results Mutation # 532 Nuclear Family
Brood War
General
Pros Debate: Zerg Unfairly Nerfed? (ASL S22 map) BGH Auto Balance -> http://bghmmr.eu/ ASL22 General Discussion BSL Season 22 Full Overview & Conclusion FlaSh: This Will Be My Final ASL【ASL S21 Ro.16】
Tourneys
[ASL22] Wildcard Qualifier [Megathread] Daily Proleagues IPSL Spring 2026 Top 4! CSLAN 4 is Coming!
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers Creating a full chart of Zerg builds Relatively freeroll strategies
Other Games
General Games
General RTS Discussion Thread Summer Games Done Quick 2026! Nintendo Switch Thread Stormgate/Frost Giant Megathread Dawn of War IV
Dota 2
Looking for a Dota Mentor 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
TL Mafia
NeO.D_StephenKing vs This Guy From 1 Million Dance TL Mafia Community Thread TL Mafia Power Rank Vanilla Mini Mafia
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread UK Politics Mega-thread YouTube Thread Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club The HerO Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! Series you have seen recently...
Sports
2024 - 2026 Football Thread McBoner: A hockey love story Tennis[sport] Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Simple Questions Simple Answers FPS when play League Of Legend on laptop How to clean a TTe Thermaltake keyboard?
TL Community
The Automated Ban List
Blogs
Major Shifts in the Gaming I…
TrAiDoS
An Exploration of th…
waywardstrategy
Gauntlet SC2: A Retrospectiv…
Ctone23
ramps on octagon
StaticNine
Funny Nicknames
LUCKY_NOOB
Evil Gacha Games and the…
ffswowsucks
Customize Sidebar...

Website Feedback

Closed Threads



Active: 5390 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
Hyrule19228 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
Next event in 2h 7m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 660
Ketroc 38
ROOTCatZ 1
StarCraft: Brood War
Purpose 15
Dota 2
NeuroSwarm89
Counter-Strike
summit1g5597
minikerr28
Other Games
Grubby4596
tarik_tv4056
Liquid`RaSZi1461
ToD236
ArmadaUGS164
Chillindude29
Organizations
Other Games
gamesdonequick5509
BasetradeTV265
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 14 non-featured ]
StarCraft 2
• musti20045 14
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• masondota21623
Other Games
• imaqtpie1707
• Shiphtur292
Upcoming Events
OSC
2h 7m
GSL
13h 7m
Monday Night Weeklies
18h 7m
Replay Cast
1d 2h
WardiTV Weekly
1d 13h
The PondCast
2 days
Replay Cast
3 days
CrankTV Team League
3 days
Replay Cast
4 days
CrankTV Team League
4 days
[ Show More ]
Replay Cast
5 days
RSL Revival
5 days
Clem vs Lambo
Scarlett vs Cure
CranKy Ducklings
5 days
RSL Revival
6 days
Classic vs Trap
herO vs SHIN
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

ASL Season 22: Wild Card Qualifier
HSC XXIX
Eternal Conflict S2 E1

Ongoing

IPSL Spring 2026
Acropolis #4
YSL S3
CSL 2026 Summer (S21)
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
SCTL 2026 Spring
Eternal Conflict S2 E2
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026

Upcoming

Escore Tournament S3: W3
ASL S22 SEASON OPEN Day 1
Escore Tournament S3: W4
ASL S22 SEASON OPEN Day 2
Escore Tournament S3: W5
CSLAN 4
Blizzard Classic Cup 2026
HSC XXX
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
Light Tournament 2026
Eternal Conflict S2 Finale
Eternal Conflict S2 E3
Logitech G Connect 2026
StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
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 © 2026 TLnet. All Rights Reserved.