Reputation: 1 Apprentice
- Active Members
- Active Posts:
- 60 (0.07 per day)
- 31-July 12
- Profile Views:
- Last Active:
- Oct 22 2014 07:11 AM
- Who Cares
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Who Cares
- Dream Kudos:
Posts I've Made
Posted 14 May 2014A dollar sign ($) inside a double quoted string is treated as the start of a variable name. To get a dollar sign to actually be part of the string you have to escape it first (\$). In your case you want both a backslash character and a dollar sign in the string so you have to escape both of them (\\\$).
preg_match("/http\:\/\/images17\.newegg\.com\/is\/image\/newegg\/83-227-509-TS\?\\\$S300W\\\$/", $str, $output_array);
Oh! That's why! Thanks for answering so fast!
Why are you using a regular expression to search for a specific string? strpos is better suited for that and doesn't require the overhead of the regular expression engine.
Because this string is not ALWAYS this string. I'm using this regex to find all images in a Newegg page, and it must be valid for all Newegg pages, so I needed a regex to fit the overall body of the link without searching specifically for THIS link!
Posted 8 Sep 2013Thanks alot for the link, BBeck. I also thought of spawning all of the creeps at the beginning of the wave (all at once) and relying on their movement speed (which does use the elapsed gametime for its calculations) to be at the right place at any time. Sure, this is not optimized and may cause lag if there are lots of creeps, but I guess that if you lag when all creeps are spawned, the problem may not be the code anymore. Also, I thought of adding other kind of creeps (stronger ones, faster ones, etc) that would lower the lag of having multiple simple ones.
But again, thanks for the link, I have it bookmarked already!
Is my idea realistic or should I calculate the N number of spawns that may have happened between two update calls like you said?
Posted 6 Sep 2013From the small XNA experience I have, I tend to restrict myself to sound that I generate using BFXR and I do that at the end just to add some feel to the game (which I do not even share with people around me, I just do them for myself and have fun with this).
That being said, I'm always leaning towards being a better programmer and being a better game creator. I always raise the bar a little higher everytime I start a new project. I'll work on the audio part way more from now on, seeing that people really care about it!
Posted 9 Aug 2013Finally got it to work! Thanks alot guys and now I know how Objects are referenced instead of copied over!
Posted 9 Aug 2013Yep. Thanks alot to you guys. I now understand and I'll try to make it work the best way I can!
You guys are great teachers. I would love to have you as teachers at school, things would be so easier!
here guys, have a song! http://www.youtube.c...h?v=7hIQDavRD54
- Member Title:
- D.I.C Head
- Age Unknown
- Birthday Unknown
- Years Programming:
- Programming Languages:
qwertyuu hasn't added any friends yet.