• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 09:27
CEST 15:27
KST 22:27
  • 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
[ASL21] Ro16 Preview Pt1: Fresh Flow5[ASL21] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy21ByuL: The Forgotten Master of ZvT30
Community News
MaNa leaves Team Liquid13$5,000 WardiTV TLMC tournament - Presented by Monster Energy5GSL CK: More events planned pending crowdfunding7Weekly Cups (May 30-Apr 5): herO, Clem, SHIN win0[BSL22] RO32 Group Stage5
StarCraft 2
General
MaNa leaves Team Liquid Team Liquid Map Contest #22 - Presented by Monster Energy Quebec Clan still alive ? BGE Stara Zagora 2026 cancelled Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament $5,000 WardiTV TLMC tournament - Presented by Monster Energy RSL Revival: Season 5 - Qualifiers and Main Event GSL CK: More events planned pending crowdfunding Sea Duckling Open (Global, Bronze-Diamond)
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
Mutation # 521 Memorable Boss The PondCast: SC2 News & Results Mutation # 520 Moving Fees Mutation # 519 Inner Power
Brood War
General
ASL21 General Discussion [ASL21] Ro16 Preview Pt1: Fresh Flow BGH Auto Balance -> http://bghmmr.eu/ JD's Ro24 review The Korean Terminology Thread
Tourneys
[ASL21] Ro16 Group A Escore Tournament StarCraft Season 2 [Megathread] Daily Proleagues [ASL21] Ro24 Group F
Strategy
Any training maps people recommend? Fighting Spirit mining rates Muta micro map competition What's the deal with APM & what's its true value
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Battle Aces/David Kim RTS Megathread General RTS Discussion Thread Starcraft Tabletop Miniature Game
Dota 2
The Story of Wings Gaming Official 'what is Dota anymore' discussion
League of Legends
G2 just beat GenG in First stand
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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
Canadian Politics Mega-thread Russo-Ukrainian War Thread European Politico-economics QA Mega-thread US Politics Mega-thread The China Politics Thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion Cricket [SPORT] Tokyo Olympics 2021 Thread
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
lurker extra damage testi…
StaticNine
How Streamers Inspire Gamers…
TrAiDoS
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2142 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
Hyrule19202 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
Wardi Open
11:00
#82
WardiTV679
OGKoka 365
Rex107
Liquipedia
Afreeca Starleague
10:00
Ro16 Group A
Soma vs YSC
Sharp vs sSak
Afreeca ASL 12767
StarCastTV_EN344
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
OGKoka 365
Lowko301
ProTech138
Rex 107
Codebar 20
StarCraft: Brood War
Sea 24274
Calm 15079
Bisu 7769
Jaedong 3062
Horang2 1897
BeSt 1044
EffOrt 848
Mini 650
Stork 559
firebathero 530
[ Show more ]
Light 438
Zeus 363
Pusan 358
actioN 339
ZerO 228
Soulkey 220
Hyun 164
Larva 148
Mind 88
Rush 72
Killer 70
Barracks 51
ToSsGirL 50
yabsab 36
zelot 25
Nal_rA 19
soO 18
Terrorterran 18
Movie 17
Hm[arnc] 16
Shinee 16
[sc1f]eonzerg 15
GoRush 14
Bale 12
Sacsri 12
Noble 12
IntoTheRainbow 12
scan(afreeca) 11
SilentControl 9
Icarus 8
Dota 2
qojqva1064
syndereN42
febbydoto11
Counter-Strike
olofmeister3194
fl0m2176
x6flipin414
byalli385
markeloff86
Other Games
singsing1733
B2W.Neo1047
hiko676
crisheroes298
Pyrionflax151
Liquid`LucifroN98
Liquid`VortiX88
QueenE78
Mew2King49
KnowMe47
RotterdaM29
Organizations
Other Games
BasetradeTV778
Counter-Strike
PGL302
StarCraft: Brood War
UltimateBattle 302
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• StrangeGG 56
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Nemesis2899
• TFBlade1533
• Stunt580
Upcoming Events
Monday Night Weeklies
2h 33m
OSC
10h 33m
Afreeca Starleague
20h 33m
Snow vs PianO
hero vs Rain
WardiTV Map Contest Tou…
20h 33m
GSL
22h 33m
PiGosaur Cup
1d 10h
CranKy Ducklings
1d 19h
Kung Fu Cup
1d 22h
Replay Cast
2 days
The PondCast
2 days
[ Show More ]
WardiTV Map Contest Tou…
2 days
Replay Cast
3 days
Escore
3 days
WardiTV Map Contest Tou…
3 days
Korean StarCraft League
4 days
CranKy Ducklings
4 days
WardiTV Map Contest Tou…
4 days
IPSL
5 days
WolFix vs nOmaD
dxtr13 vs Razz
BSL
5 days
Sparkling Tuna Cup
5 days
WardiTV Map Contest Tou…
5 days
Ladder Legends
6 days
BSL
6 days
IPSL
6 days
JDConan vs TBD
Aegong vs rasowy
Replay Cast
6 days
Replay Cast
6 days
Wardi Open
6 days
Afreeca Starleague
6 days
Bisu vs Ample
Jaedong vs Flash
Liquipedia Results

Completed

Escore Tournament S2: W2
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
StarCraft2 Community Team League 2026 Spring
Nations Cup 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026

Upcoming

Escore Tournament S2: W3
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
RSL Revival: Season 5
WardiTV TLMC #16
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
CCT Season 3 Global Finals
IEM Rio 2026
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.