[img]http://www.cubeupload.com/files/a4d200astinterior.gif[/img]
Got editable interiors working (pretty much)
[QUOTE=ryandaniels;17202113][img]http://www.cubeupload.com/files/a4d200astinterior.gif[/img]
Got editable interiors working (pretty much)[/QUOTE]
Nice, momentum.
[QUOTE=bigdoggie;17202237]Nice, momentum.[/QUOTE]
Well that's box2d, not me. But yes, it's nice :D
New idea: [url]http://dev.kerplunc.com/client/web_snipper/[/url]
Spend my afternoon (ok, till 4am) learning javascript ^^ results will work when I actually build them, I wrote the longest MySQL query I've ever written too for the results...
[QUOTE='-[ Fizzadar ]-;17205304']New idea: [url]http://dev.kerplunc.com/client/web_snipper/[/url]
Spend my afternoon (ok, till 4am) learning javascript ^^ results will work when I actually build them, I wrote the longest MySQL query I've ever written too for the results...[/QUOTE]
Cool, what does it do exactly though? Just curious: what is your "longest MySQL query"?
If you're using AJAX, I suggest that you use JQuery. It will make everything a lot more faster and easier.
[QUOTE=garry;17201153]BRB adding Sleep( 30000 ) to the start of GMod to look more professional[/QUOTE]
uhh. isn't it already there?
[QUOTE=nos217;17196388]Does it? Loads of games jump about the screen seemingly "trying to find the correct aspect" and they still look ok.[/QUOTE]
Are you sure it's not the monitor?
[QUOTE=Pj The Dj;17207521]Are you sure it's not the monitor?[/QUOTE]
I thought this too, because I get the same thing when I switch my Monitors input from Xbox to PC. Before Xbox had the option of 1440x900 as the resolution I would get a 5 sec delay where the screen flicks trying to match the new ratio.
[QUOTE=bl4h;17205834]Cool, what does it do exactly though? Just curious: what is your "longest MySQL query"?
If you're using AJAX, I suggest that you use JQuery. It will make everything a lot more faster and easier.[/QUOTE]
I've used JQuery and Xajax a lot before, which do massively speed stuff up, but I'm teaching myself xmlhttprequest (which is surprisingly simple). In this case I just need to read the html and print, which is simple, but for other things like my browser-game, xajax is doing the heavy loading :P
What it will do is be a tagged archive of "snips" from the web. For example, if you searched "header grunge blog", it'd pick out all snips of header grunge and blog, and order them by which snips have the most relevant tags. Adding snips will be a matter of clicking go, the page sends you to the site which takes a full length screenshot of the relevant site (sorted screenshotting at last, took hours), and you select the piece of the web page you want to "snip" and tag it. Current plan is just a search, with users adding content, hopefully not too many users. But I was thinking I might do favorites and proper user pages/submissions too... the only problem is duplicate, if someone snips the same footer or whatever, it's almost impossible to detect.
Lastly, the query:
[code]
SELECT COUNT( * ) AS links, s.* FROM links l, snips s, tags t WHERE s.id = l.snipid AND t.id = l.tagid AND ( t.name = 'test2' OR t.name = 'test' ) GROUP BY s.id ORDER BY links DESC
[/code]
It returns the count of tags that apply to each snip, along with all the snip info, and arranges it, meaning I just have to display the snip stuff and it's all done :D
Working on a filehost right now, with a userbase!
It's functional, but hasn't been thoroughly tested yet.
Needs a lot more features, like browsing files (You can already see what files a user has uploaded)
[URL=www.errur.com/New]The new Errur.com[/URL]
Also, Fizzadar, this is the MySQL/PHP code I run when stuffing files in the DB :v:
[php]mysql_query( sprintf( "INSERT INTO FileHost_Files( ID, Filename, IP, Username, UserID, sDate, Size, Downloads, Title, Description, Category, Tags, Thumbnail, Thumbnail_Small, DateU, IsImage, Checked )
VALUES( '%d', '%s', '%s', '%s', '%d', '%s', '%d', '%d', '%s', '%s', '%d', '%s', '%s', '%s', '%d', '%d', '%d' )",
$ID, $Filename, $IP, $Username, $UserID, $Date, $Size, $Downloads, $Title, $Description, $Category, $Tags, $Thumbnails[0], $Thumbnails[1], $DateU, $IsImage, $Checked ) );[/php]
Just realized that Date is one of the sql* keywords, gotta rename that. BRB.
Aaanyway. The site is meant to serve as an anonymous file uploading service, as well as an online gallery if you want that. A few people have complained in the past that you couldn't see the files you had uploaded.
i would suggest looking into mysqli's prepared statements, as that's essentially what you're doing there. it can escape though. much more secure
do you mean sql keyword, also? you can prevent that by using `keyword`
Yeah, sql. And I renamed the field already :v:
Prepared statements looks interesting, but I've always used this method and it works well enough.
I'll look into it a bit more, but I think I'll stick with this.
Daymn biiiiig sql going on there ;)
Maybe mine wasn't my biggest, I've done some long inserts before, but it definitely took me the longest to make :P Now I need to work out how to store favorites, or whether to even store favorites. Maybe a points system for snips, and a separate fav system...
[editline]02:09PM[/editline]
Double post but whatever, lots of arrays and sorting:
[code]
//setup array thing
$res = array();
//loop results
while( $result = mysql_fetch_array( $results ) ):
//$res[links] check
if( !isset( $res[$result['links']] ) ):
$res[$result['links']] = array();
endif;
//add the thing to the array
$res[$result['links']][] = $result;
endwhile;
//sort res by key, just in case
krsort( $res );
//sorting function
function sortRes( $a, $b ) {
return $a['points'] < $b['points'];
}
//loop res, sort each
foreach( $res as $resid => $whatever ):
usort( $res[$resid], 'sortRes' );
endforeach;
print_r( $res );
[/code]
It probably is just my monitor actually.
[img]http://i25.tinypic.com/29mppjc.png[/img]
Third boss in the making. I need to make sprites. FFF.
Oh, and here's how the Profiles look on Errur: [url]http://www.errur.com/New/?page=profile.php?id=2[/url]
Will add a lot more stuff to it, but right now I'm kinda fed up with Javascript, php, sql and orange :v:
Snow!
[URL=http://www.cubeupload.com][IMG]http://www.cubeupload.com/files/ade800snow.png[/IMG][/URL]
About that, what is the best way to handle an array of particles? I just reset it now every time it gets full but that's obviously not a good way.
Maybe a boost::circular_buffer is of interest.
If you don't wanna use Boost for whatever reason, then look into std::deque.
If the characteristics seem not fitting, then std::list.
The circular buffer seems nice, I haven't done anything with boost but I'll try it out.
Hey guys what approach would you recommend for making user text input in game (C++)?
I'm talking about if a dialogue came up asking for your name or something, how would you get the user input? This is easy for console based programs but I don't know I could do it in a full screen app.
I'm using direct X for input at the moment so if anyone knows of a function that can detect any key press and return it in an easy to handle form (perhaps even as a string/char) that would be great.
I'm just guessing here, but every time you press a key it checks what letter it is, checks if you have a text box active and if so adds it to an array, then the array gets blitted to the screen in the appropriate place.
[img]http://i31.tinypic.com/5as8rd.png[/img]
I'm not an artist so my gradients suck, yes. But it's supposed to look like it gets darker further into the tunnel.
[QUOTE=iPope;17212458]I'm just guessing here, but every time you press a key it checks what letter it is, checks if you have a text box active and if so adds it to an array, then the array gets blitted to the screen in the appropriate place.[/QUOTE]
Yeah that's what I was thinking, but I don't know how to check what that key is and return the result as a string/char. I know how to check for individual specific keys, but not how to check and process every key for text input.
[cpp]if(event.key.keysym.sym == SDLK_x) {
char[0] = x;
}[/cpp]
This is for SDL.
[editline]07:23PM[/editline]
Or you could use Select... Case.
[QUOTE=Vampired;17212476]I'm not an artist so my gradients suck, yes. But it's supposed to look like it gets darker further into the tunnel.[/QUOTE]
Maybe try a radial gradient and/or let the shadow 'shine' a bit outwards (place a bit more in front of the tunnel).
As for keystrokes in DirectX: search for DirectInput.
[QUOTE=nos217;17213044][cpp]if(event.key.keysym.sym == SDLK_x) {
char[0] = x;
}[/cpp]
This is for SDL.
[editline]07:23PM[/editline]
Or you could use Select... Case.[/QUOTE]
Not using SDL unfortunately, I hope it's that simple in direct X though :P
Select/case would be my last resort, I don't want a huge long list of 40 cases or so lol.
Thanks anyway.
[QUOTE=ZeekyHBomb;17213236]Maybe try a radial gradient and/or let the shadow 'shine' a bit outwards (place a bit more in front of the tunnel).
As for keystrokes in DirectX: search for DirectInput.[/QUOTE]
I've been googling things for DirectX and DirectInput for ages but I don't think I'm looking in the right places or wording what I want properly, I can never find anything to do with processing user text input.
[QUOTE=MADmarine;17212952]Yeah that's what I was thinking, but I don't know how to check what that key is and return the result as a string/char. I know how to check for individual specific keys, but not how to check and process every key for text input.[/QUOTE]
Doesn't DirectInput give you an event structure when a keypress happens with a unicode value in it? This is how I would do text input, as it would automatically handle cases where you have capslock or a shift key down or something.
[url]http://msdn.microsoft.com/en-us/library/bb219802(VS.85).aspx[/url]
You can find a reference and tutorials there :)
Direct Input is obsolete. Microsoft suggests an other way of input in this document: [url]http://msdn.microsoft.com/en-us/library/bb206183(VS.85).aspx[/url]
The document is about mouse input, but also work for keyboard input.
I don't have to use direct input, it's just that I've got this far with it and it'd be nice to be consistent, but if there's an easier way I'm quite happy to take that route instead.
Sorry, you need to Log In to post a reply to this thread.