• What are you working on? November 2011 Edition
    3,673 replies, posted
[img]http://puu.sh/87yr[/img] woops..
Look at what you guys made me do: [url]http://open.gl/[/url]
[QUOTE=Overv;33126579]Look at what you guys made me do: [url]http://open.gl/[/url][/QUOTE] You should make each one cycle through random posts making fun of you/open.gl.
[QUOTE=Overv;33126579]Look at what you guys made me do: [url]http://open.gl/[/url][/QUOTE] is it finished yet?
[QUOTE=Overv;33126579]Look at what you guys made me do: [url]http://open.gl/[/url][/QUOTE] The music should loop.
I like trying to click the names :downs:
Learning C++. Here's a version of Rock, Paper, Scissors. [cpp] #include <iostream> #include <cstdlib> #include <ctime> using namespace std; void determineWinner( int, int, int ); int convertChoiceToInt( char ); int main () { srand( time( NULL ) ); int gamemode = 0; char player1Choice, player2Choice; cout << "Play against computer (1) or multiplayer (2)?" << endl; cin >> gamemode; if ( gamemode == 1 ) // Single player against computer { do { cout << "(R)ock, (P)aper or (S)cissors? Q to quit." << endl; cin >> player1Choice; player2Choice = rand() % 3; switch ( player2Choice ) { case 0 : cout << "Computer chose rock!" << endl; break; case 1 : cout << "Computer chose paper!" << endl; break; case 2 : cout << "Computer chose scissors!" << endl; break; } determineWinner( convertChoiceToInt( player1Choice ), player2Choice, gamemode ); } while ( toupper( player1Choice ) != 'Q' ); } else if ( gamemode == 2 ) // multiplayer { do { int player1ChoiceNum, player2ChoiceNum; cout << "Player 1 (R)ock, (P)aper or (S)cissors? Q to quit." << endl; cin >> player1Choice; player1ChoiceNum = convertChoiceToInt( player1Choice ); cout << "Player 2 (R)ock, (P)aper or (S)cissors? Q to quit." << endl; cin >> player2Choice; player2ChoiceNum = convertChoiceToInt( player2Choice ); determineWinner( player1ChoiceNum, player2ChoiceNum, gamemode ); } while( ( toupper( player1Choice ) != 'Q' ) and ( toupper( player2Choice ) != 'Q' ) ); } return 0; } int convertChoiceToInt( char choice ) { switch ( toupper( choice ) ) { case 'R' : cout << "You chose rock!" << endl; return 0; case 'P' : cout << "You chose paper!" << endl; return 1; case 'S' : cout << "You chose scissors!" << endl; return 2; } } void determineWinner( int player1, int player2, int gamemode ) { if ( player1 == player2 ) cout << "tie" << endl << endl; else if ( ( player1 + 1 ) % 3 == player2 ) { if ( gamemode == 1 ) cout << "Computer wins" << endl << endl; else cout << "Player 2 wins!" << endl << endl; } else cout << "Player 1 wins" << endl << endl; } [/cpp]
[QUOTE=Overv;33126579]Look at what you guys made me do: [url]http://open.gl/[/url][/QUOTE] My post there wasn't drama I demand you take it down [B]this instant[/B] Okay not really this is pretty awesome
[QUOTE=Overv;33126579]Look at what you guys made me do: [url]http://open.gl/[/url][/QUOTE] oh my god i can't breathe
Worked on some basic algebra/geometry. Eliminating those divisions by zero can be tricky sometimes, but this simplified quite easily. [cpp] float mul = 1.f + cam_vSprint * 8.f; vector3 fthrust(0.f, 0.f, 0.f); fthrust -= rot.GetYawRight() * ((cam_vRt - cam_vLt) * delta * 3.f * mul); fthrust += rot.GetYawForward() * ((cam_vFd - cam_vBk) * delta * 3.f * mul); float circulize; float x2 = fthrust.x * fthrust.x; float z2 = fthrust.z * fthrust.z; if (z2 > x2) circulize = 1.f / sqrt(x2 / (z2) + 1.f); else circulize = 1.f / sqrt(z2 / (x2) + 1.f); if (circulize > 0.0001f && circulize <= 1.f) { fthrust.x *= circulize; fthrust.z *= circulize; } [/cpp] Remember the "run forward and strafe right to run 1.41x faster" problem? This is supposed to be the solution in analog form (the inputs can both vary from -1.f to 1.f and the outputs both range from -1.f to 1.f). (cam_v<dir> ranges from 0.f to 1.f and are subtracted to have a resulting range of -1.f to 1.f. rot is a quaternion. delta is the time in floating point since last simulation tick.) I thought this would be interesting because this is a pretty common problem that isn't discussed very often. I didn't plot values from it to do a thorough check, but it does work for all the edge cases I've tested :)
[QUOTE=amcfaggot;33120008]Has this changed with Source? I recall various keyboard-invoked actions were actually baked into the engine, and I think this is one of them.[/QUOTE] Actually no. It's not present in the config file, but that doesn't stop you from re-binding it. unbind ~ bind <button> toggleconsole Would do the trick. I have done it myself, since I require a Swedish layout so I can use the letters åäö and our layout has § where the American layout have ~ And I'm fairly sure this worked even before the Orange Box update.
If I were to make a 2d block-based game (:v:), does anyone have a(some) reference(s) that would help me/tell me how to do the physics? I thought of using box2d (I'm going to try this in Love), but the problem would be that I don't think it would like me very much if I had some 12,500,000 static squares all being simulated at once (that's for a 5000x2500 map). I know that SupahVee had some game-stopping physics problems, and I'd like to not run into those as well.
[QUOTE=Robber;33123656]Thanks, I'm not sure if I understand your question right, but a live wallpaper is a normal service that has a few methods that get called by Android like when settings change or the user interacts with the app and for animated stuff you either have to use an OpenGL view which can draw automatically at I think 60FPS or use threading. Android has many built in convenience features for that. My app works by waiting until the wallpaper becomes visible which Android will tell me and then register a listener for the gyroscope and start drawing whenever I get new data. And when it becomes invisible again because the user opens an app or turns the screen off I just unregister from the gyroscope and since I'm not getting new data anymore I stop drawing. Edit: Hmm, I think you were just asking what a live wallpaper is. Yes, it's just sitting behind the homescreen (comparable to Windows' desktop). Hopefully someone else finds the technical explanation interesting :v:[/QUOTE] just an additional note: on Android you can also tell GLSurfaceView to not render until you specifically tell it to. That way you aren't pumping out unnecessary frames, only rendering on new gyro data.
[QUOTE=JSharpe;33126819]cpp stuff[/QUOTE] It would look much better if you added brackets to single line ifs and elses. I would also do the switch statement like this instead: [cpp] switch ( toupper( choice ) ) { case 'R': cout << "You chose rock!" << endl; return 0; case 'P': cout << "You chose paper!" << endl; return 1; case 'S': cout << "You chose scissors!" << endl; return 2; } [/cpp] Looking great otherwise, good job! [img]http://www.facepunch.com/fp/ratings/heart.png[/img]
BF3 uses Lua. ( Modding potential anyone? ) [url]http://pastebin.com/A566xdzj[/url] ( This is a decrypted initfs_win32 from the data folder of BF3 )
[QUOTE=dajoh;33127295]It would look much better if you added brackets to single line ifs and elses. I would also do the switch statement like this instead: [cpp] switch ( toupper( choice ) ) { case 'R': cout << "You chose rock!" << endl; return 0; case 'P': cout << "You chose paper!" << endl; return 1; case 'S': cout << "You chose scissors!" << endl; return 2; } [/cpp] Looking great otherwise, good job! [img]http://www.facepunch.com/fp/ratings/heart.png[/img][/QUOTE] I may be mistaken, but doesn't switch only work with integer values? Edit: seems not, I must thinking of a different language than C++.
[QUOTE=subenji99;33127572]I may be mistaken, but doesn't switch only work with integer values? Edit: seems not, I must thinking of a different language than C++.[/QUOTE] But, my good sir, characters ARE integer values!
[url]http://pastebin.com/jcWu8RBv[/url] Got most of the script files deobfuscated. Next step is to find a way to run my own Lua code. Then I can dump the _G table and _R table. [editline]5th November 2011[/editline] [QUOTE=synthiac;33127657]hey jsharpe did they suddenly find a cure for all of your [b]alleged[/b] diseases[/QUOTE] you're an asshole.
[QUOTE=Overv;33126579]Look at what you guys made me do: [url]http://open.gl/[/url][/QUOTE] I could stare at this for hours [editline]5th November 2011[/editline] [QUOTE=GameDev;33126974]oh my god i can't breathe[/QUOTE] oh god see a doctor?
[QUOTE=icantread49;33126548]"exploding" on the app store is a very intriguing phenomenon ... i exchanged a few emails with ed rumley from chillingo, and the most important factor in the "explosion" is what he calls the "deck appeal" - those 5 seconds that either make or break the sale ... how do you make or break a sale in 5 seconds? visual appeal of the game, name of the game, and reviews of the game - if it's a new game, then you're stuck with just the visual appeal and name[/QUOTE] How this wasn't obvious to you from before you even published the app is beyond me. And it's not even 5 seconds. When I scroll past icons in the app store I take a fraction of a second glance and look at the icon, the name, and the ratings, lastly the company (if I feel like it), just for kicks. If your icon doesn't look professional and clean, and the name of your app is shit, I would never even consider looking at the app details. You've lost me in less than a second. If your icon looks professional, the name isn't fucking overbearing and takes up the whole length of the app name entry field, and you have some degree of a high rating, then I'll consider looking at your app page. Once I'm there, you still haven't sold me though. That's when I want to see what the app looks like. If you're not a game and you're a general app, do you adhere to iOS user experience guidelines? Do you make use of layout controls in a standard typical way like Apple would? Is your user interface easy to use? Do you not have 50 billion buttons everywhere? Is the layout well thought out? And I shouldn't even have to ask if the designs at this point are good looking, because if they're not, I'm out of there immediately. If you're a game though, you're exempt from all of the aforementioned UI guideline stuff I look for. I just want a fun game, but your icon and name and all that shit, like I said, better be quality stuff. While apps on the App Store aren't a dime a dozen literally, the quality of them is portrayed as such, so you better be up to par with your design skills, and they better look fresh.
[QUOTE=GARRYMODE;33127706]you're an asshole.[/QUOTE] He kinda is, yeah. But you might want to look up the definition of alleged.
[QUOTE=BlkDucky;33127742]definition of alleged.[/QUOTE] "said without proof." - Pretty sure we saw pictures of Jamie's eyes and him in hospital etc..
[QUOTE=bobthe2lol;33127103]If I were to make a 2d block-based game (:v:), does anyone have a(some) reference(s) that would help me/tell me how to do the physics? I thought of using box2d (I'm going to try this in Love), but the problem would be that I don't think it would like me very much if I had some 12,500,000 static squares all being simulated at once (that's for a 5000x2500 map). I know that SupahVee had some game-stopping physics problems, and I'd like to not run into those as well.[/QUOTE] I'm currently working on a solution for this. Unfortunately it's still not performance friendly quite yet. The solution is to have physics objects destroyed and recreated only within simulation proximity. This is absolutely not an elegant solution, however I cannot find a way around it, and logically, it is the only proper way to go about this.
[img]http://puu.sh/87Nl[/img] Totally copying Terraria [editline]4th November 2011[/editline] Oh shit that tiny green line.. must fix
You know, if you guys tried doing just a little bit of design research instead of copying games without intentionally copying them 1:1, it would really do you all good, and I think you'd be able to break away from just making clones as bases. Just my two cents
[QUOTE=amcfaggot;33127931]You know, if you guys tried doing just a little bit of design research instead of copying games without intentionally copying them 1:1, it would really do you all good, and I think you'd be able to break away from just making clones as bases. Just my two cents[/QUOTE] I said this before. When you're copying a game, it's good programming practice because you have everything already designed. Game design is an art of itself, but we're here for programming.
[QUOTE=GARRYMODE;33127323]BF3 uses Lua. ( Modding potential anyone? ) [url]http://pastebin.com/A566xdzj[/url] ( This is a decrypted initfs_win32 from the data folder of BF3 )[/QUOTE] [url]http://pastebin.com/Dt69kV6T[/url] Made it readable :v:
[QUOTE=synthiac;33127934]extrapolating from his messages on irc from years ago, he should be almost totally blind by now. [url=http://jamiesharpe.info/blog/]none of this adds up to me.[/url][/QUOTE] Well, PM him if you're really that curious about his illness. In other news I can execute a custom Lua file in Battlefield 3. Anything placed in "Documents/Battlefield 3/Settings/overrideAutodetect.lua" is automatically loaded on the games startup. [editline]5th November 2011[/editline] [QUOTE=Dj-J3;33128006][url]http://pastebin.com/Dt69kV6T[/url] Made it readable :v:[/QUOTE] Sorry buddy, way ahead of you. :x
[QUOTE=GARRYMODE;33128008]Well, PM him if you're really that curious about his illness. In other news I can execute a custom Lua file in Battlefield 3. Anything placed in "Documents/Battlefield 3/Settings/overrideAutodetect.lua" is automatically loaded on the games startup. [editline]5th November 2011[/editline] Sorry buddy, way ahead of you. :x[/QUOTE] Oh, missed that.
My game now has some big fucking balls: [img]http://i54.tinypic.com/2vx0dio.png[/img]
Sorry, you need to Log In to post a reply to this thread.