[QUOTE=Spoco;17289746]Yeah the ternary operator is very [b]ugly[/b].[/QUOTE]
Fixed.
[QUOTE=bean_xp;17290497][b]I think I'm funny.[/b][/QUOTE]
Fixed.
No seriously, ternary operators are awesome, not ugly. They only are when you don't know the language.
My friend said that [url]http://averagedogs.exofire.net/steam/index.php[/url] is easy to make and I told him to do better. He says that he doesn't know PHP and that PHP is for gaywads. I then proceeded to tell him that VALVe and Garry must be gay then, and he replied that facepunch.com and garrysmod.org are coded in Java and CSS.
Is there something I'm missing...?
Your friend doesn't know what he's talking about.
[QUOTE=arienh4;17290632]Fixed.
No seriously, ternary operators are awesome, not ugly. They only are when you don't know the language.[/QUOTE]
Yes I know, I'm familliar with it. It depends entirely when, where and how often you use it to it's ugliness, it can be cute if used right, much like every single part of every programming language.
[url]http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.6[/url]
[QUOTE=The Inzuki;17290688]My friend said that [url]http://averagedogs.exofire.net/steam/index.php[/url] is easy to make and I told him to do better. He says that he doesn't know PHP and that PHP is for gaywads. I then proceeded to tell him that VALVe and Garry must be gay then, and he replied that facepunch.com and garrysmod.org are coded in Java and CSS.
Is there something I'm missing...?[/QUOTE]
He's just an idiot who thinks he's smart. Java isn't used to code websites, it's used to code apps. CSS is not coding, it's designing. Facepunch.com runs on vBulletin which is written entirely in PHP, and garrysmod.org probably is too. Definitely not Java though.
Thanks guys, I thought I felt stupid there for a second :downs:
Making it display the first friend on your friends list right now.
[url]http://averagedogs.exofire.net/steam/index.php?mode=profile&id=76561197992443150[/url]
It's going to be a big problem when I'm displaying all the friends, since I need to find out if the user is ingame or not.
Wondering what the best way is to throw AdSweep online, meaning putting all the rules into a database and hosting it on my website so only that site is loaded. That'd mean that I wouldn't have to update it everytime I add a new site, and that it'd be a lot smaller. I now see 2 options. Dynamically generating the complete AdSweep code and including it the same way I do with BitLet, or outputting the rules in XML and using XHR to retrieve it. Does anyone know if XHRs are cached if I include an expires header?
[QUOTE=Jawalt;17290145]It'd look nicer if you lowered the background green, I think ryandaniels.[/QUOTE]
Yeah, I think you are right, a little too obvious right now.
Anyways, I got it rendering how I wanted it to in the first place; Now all I have to do is zoom in on the place the player is at.
[img]http://www.cubeupload.com/files/5dfe00workingyay.gif[/img]
In case you are wondering what is happening when all the sudden it stops touching the ground, it's in orbit.
[editline]03:31PM[/editline]
Also, I'm controlling the little square.
[QUOTE=Jallen;17260597]Pretty cool :D
Things I noticed:
FOV too small - try 90.
Needs slider physics (if you walk at a wall you just stop)
If you run diagonally (e.g. w and a) you move fast.
Say you want to move at speed 4. You can't just move 4 left and forward because of pythagoras.
So you make 4 the speed you want to move diagonally, square it, divide it by 2 and square root it.
4^2 = 16
16/2 = 8
sqrt(8) ~= 2.8
[img]http://i30.tinypic.com/14ch88x.jpg[/img]
So if you move 2.8 forward and left you will move diagonally at speed 4.
I'd look into a basic gravity system for jumping.[/QUOTE]
Isn't Pythagoras Thereom the one where you take the 2 sides and take the sqaure root of them to get the Hypotinuse?
[QUOTE=Loli;17291849]Isn't Pythagoras Thereom the one where you take the 2 sides and take the sqaure root of them to get the Hypotinuse?[/QUOTE]
That is correct.
Lol, gravity is space.
I'm adding the option to display multiple friends. Maybe up to 10 or so.
[url]http://averagedogs.exofire.net/steam/index.php?mode=profile&id=76561197992443150&f=1[/url]
Right now it only goes up to 2.
[QUOTE=Spoco;17290365][img]http://www.cubeupload.com/files/87600sfmlbox2d.png[/img]
Oh yeah and thanks for the font ryandaniels, it's perfect for debug text.[/QUOTE]
where can i acquire that font sir
[QUOTE=efeX;17292184]where can i acquire that font sir[/QUOTE]
[url]http://www.dafont.com/04b-03b.font[/url]
[QUOTE=arienh4;17291083]... Java isn't used to code websites ...[/QUOTE]
Um, yes it is.
[url]http://averagedogs.exofire.net/steam/index.php?mode=profile&id=76561197960390669&f=6[/url]
Anyone know how I can have it find the word "Online" in the in-game thing? It's driving me crazy.
[QUOTE=Loli;17291849]Isn't Pythagoras Thereom the one where you take the 2 sides and take the sqaure root of them to get the Hypotinuse?[/QUOTE]
Pythegorean theorem is a^2 + b^2 = c^2
ahh I'm a little late
[QUOTE=The Inzuki;17293065][url]http://averagedogs.exofire.net/steam/index.php?mode=profile&id=76561197960390669&f=6[/url]
Anyone know how I can have it find the word "Online" in the in-game thing? It's driving me crazy.[/QUOTE]
What do you mean "find the world"? If you mean search for the word "Online', use preg_match, there's a fuckton of examples of regular expressions on the internet, I personally suck at them, although they are awesomesauce :)
[QUOTE=ryandaniels;17292643][url]http://www.dafont.com/04b-03b.font[/url][/QUOTE]
The best thing about this is it looks almost exactly like the PSP homebrew debug font
More search engine/WebSnipper, you can now +- Snips as well as favorite them, snips with similar tags are organized by their +- points, once you vote you can't change back.
[QUOTE='-[ Fizzadar ]-;17294405']More search engine/WebSnipper, you can now +- Snips as well as favorite them, snips with similar tags are organized by their +- points, once you vote you can't change back.[/QUOTE]
Wait, what? Link me to what you're talking about? :downs:
[QUOTE=The Inzuki;17294492]Wait, what? Link me to what you're talking about? :downs:[/QUOTE]
Hehehe, it's basically a tag-based search engine of website 'snips'. For example, if you searched "header grunge blog" you'd get a list of images *hopefully* of blog headers in grunge style. It's like a search engine of inspiration. The content is user-powered, I've got a separate vps running screenshots while our main webserver grabs these and using javascript users crop the piece of the site they want to tag/snip.
It's really focused on the search/tag archives, we don't want too many users because controlling the quality would be damn near impossible.
Damn I just realised that when I use a function to parse an XML file everytime I run the function it adds the xml file to the previous ones. Anyone got an idea how I might fix this?
wait nvm I'm stupid it wasn't the parser, I just used a static string as buffer for the file.
I got another problem! Hurray!
Well, I decided to use strpos() since preg_match() is used for regex, and I've gotten pretty far with it. I did run into a problem, though. I'm creating the Offline card for offline users. But I tried many ways to have it find the word "Offline" or "Last Offline", etc. But no success.
I used this as a reference (since he didn't have a lot of friends): [url]http://averagedogs.exofire.net/steam/index.php?mode=profile&id=76561197998933499[/url]
The last 3 people are offline, but I'm only working on the 6th (bottom) card to show the user he's offline, but it says he's Online with how many days he was Last Online.
Here's the code:
[code]if($line_num2 == 156){
$line2p = strpos($line2, "Online");
$line2p2 = strpos($line2, "Last : ");
if($line2p){
$line2 = str_replace("Online", "", $line2);
foreach($lines2 as $line_num3 => $line3){
if($line_num3 == 154){
echo "<div id=\"bt\"></div> <div id=\"card_bg2\"><b>".stripslashes($line3)."</b><br/> Online<br/> ";
}
}
}elseif($line2p2){
foreach($lines2 as $line_num3 => $line3){
if($line_num3 == 154){
echo "<div id=\"bt\"></div> <div id=\"card_bg2\"><b>".stripslashes($line3)."</b><br/> Offline<br/> ";
}
}
}else {
$line2 = str_replace("In-Game", "", $line2);
foreach($lines2 as $line_num3 => $line3){
if($line_num3 == 154){
echo "<div id=\"bt\"></div> <div id=\"card_bg\"><b>".stripslashes($line3)."</b><br/> In-Game<br/> ";
}
}
}
echo strip_tags($line2)."</div> <div id=\"bb\"></div><br/>";
}[/code]
Sorry if I wasn't so clear, but I got to take a shower :v:
Try if $line2p === true, not sure why, I just had a real quick look on the php manual for strpos (never used it before), and I've got to go, but it's worth a try!
[QUOTE='-[ Fizzadar ]-;17295482']Try if $line2p === true, not sure why, I just had a real quick look on the php manual for strpos (never used it before), and I've got to go, but it's worth a try![/QUOTE]
That makes it so they're In-Game, so there must be something wrong with the $line2p2 variable. Thanks anyway.
[QUOTE=arienh4;17291083]He's just an idiot who thinks he's smart. [b]Java isn't used to code websites[/b], it's [b]used to code apps[/b]. CSS is not coding, it's designing. Facepunch.com runs on vBulletin which is written entirely in PHP, and garrysmod.org probably is too. Definitely not Java though.[/QUOTE]
You are a dumbfuck.
Ever heard of [url=http://java.sun.com/products/jsp/docs.html]JSP[/url]?
Also apps? Java can make desktop/server/web etc apps.
[highlight](User was banned for this post ("Flaming" - compwhizii))[/highlight]
[QUOTE=Rowley;17296948]You are a dumbfuck.
Ever heard of [url=http://java.sun.com/products/jsp/docs.html]JSP[/url]?
Also apps? Java can make desktop/server/web etc apps.[/QUOTE]
I stand corrected. It isn't [b]usually[/b] used to code websites.
Also "desktop/server/web etc apps" are still all apps.
Sorry, you need to Log In to post a reply to this thread.