Show Posts
|
|
Pages: [1] 2 3 ... 16
|
|
4
|
Community / Jams & Events / Re: GDC: So it begins again.
|
on: March 16, 2013, 02:31:02 PM
|
GDC soon! I honestly have no idea what my plans are yet. I was hoping to participate in some game jams, see some talks, have some drinks, and hopefully hang out with people. I heard there was events going on, but I sort of missed the sign-up for some of the parties, ugh. Hoping to attend POW POW at the DNA Lounge, if I can get in. Anyone know what there is to check out this year? I'm currently sort of interested in collaborating on game projects. I do programming (mostly C++, Lua, Python, JS, 6502/Z80 assembly) and pixel art. Given the speed my solo project is going, I am looking to team up in some way, and try something new. So it'd be nice to meet some folks. Here are my cards...  I am really excited! Also it is my birthday on March 28, and it'd be cool to do something then too! Hope we all have fun. :D
|
|
|
|
|
5
|
Developer / Art / Re: Art
|
on: February 05, 2013, 09:07:23 AM
|
I couldn't fall asleep last night, so I drew this. Not really sure what it's for: 
|
|
|
|
|
6
|
Developer / Technical / Re: plaid/audio 0.1.0, a free portable audio framework
|
on: December 29, 2012, 07:37:29 PM
|
Overkill: Got the audio working. Whoever talked about logspam earlier wasn't kidding -- printing stuff to the console from the audio thread is baaad, that's why the audio engine is misbehaving so badly. Sorry for shipping the temp code like that. Sounded fine otherwise.
Heh, you're right! Removing the logspam from the .ogg decoder basically fixed all the performance issues. Awesome. :D
|
|
|
|
|
10
|
Developer / Technical / Re: plaid/audio 0.1.0, a free portable audio framework
|
on: December 28, 2012, 10:48:15 AM
|
Actually, I won't private message, I can just dump things here, I suppose. Yeah I figured there was some justification for the non-interleaved buffers, and I guess I might have to toy with adding some custom effects to the master Mixer, if that is possible, because it'd be nice to have a master pitch shift/pan in addition to the volume shifting already available. I currently do this effect application per active sample played in the update call to simulate having a master control with all of those effects, it's sort of a hack. Hmm, my wav parser might need a bit of work to be standalone lib, haha, but it shouldn't be toooooo bad. I need to headbash some more and it'll hopefully come together. Main concerns are endianness (and the fact there are two RIFF formats depending on host machine saved), and that WAV can either be different bitdepths, so I need to scale them up to a common depth. I'll try and throw something together eventually. Here is the modplug codec by the way (uses my custom file wrapper, but really, you could just use a FILE* or whatever): https://github.com/Bananattack/Plum/blob/master/source/plum/platform/plaidaudio/codec_modplug.cppYour face may melt if you read my code too much, because it's heavily work-in-progress, and I'm refactoring the hell out of code I started around 2008, and my first priority was getting every dependency in the engine to be permissively licensed. Feel free to look around, if it seems interesting, and check out test/Maximum Yak Maniac/ and run Plum.exe if you want to try a silly little test app.
|
|
|
|
|
11
|
Developer / Technical / Re: plaid/audio 0.1.0, a free portable audio framework
|
on: December 26, 2012, 08:07:21 PM
|
Hey, Cellulose! I just tried this, and successfully integrated it with my project! It seems pretty rad, good work! And thank you for providing it under a zlib license, that was super awesome, and saved me the mind-imploding headache of writing my own permissive-licensing friendly audio library, something I know next to nothing about. I thanked you on Twitter earlier, but I finally got around to playing with it. I even managed to make a new codec without many problems, so I could play mod/s3m/it/xm with libmodplug, and it was super easy! It was a bit hairy to convert an interleaved libmodplug buffer into the non-interleaved block that AudioChunk provides, but thankfully not tremendously bad. I'll probably do the same for wav loading (I have silly parser lying around), and swap stb_vorbis for libvorbisfile for conformant .ogg playback. I noticed the performance and audio quality really degrades if too many samples play concurrently. Is there anyway to make the clipping + weird distortion + audio lag less severe when several stream playbacks all stack together? I'm guessing this needs a different scheduler implementation, which actually uses threading for stream buffering? I don't know the first thing about improving that sort of stuff though, I just know the quality currently suffers compared to Audiere, which I was using before for playback purposes despite being LGPL and like a decade old. I can send you a sample build of my silly demo game and point you at engine source if it's any help testing. Also! There is a lot of std::cout spam. Any chance that could be conditionally compiled? 
|
|
|
|
|
12
|
Developer / Technical / Re: Technical Mod?
|
on: November 21, 2012, 11:03:02 AM
|
|
As an infrequent poster, but frequent lurker of the technical forums, ThemsAllTook and rivon both get my vote.
|
|
|
|
|
13
|
Developer / Technical / Re: The grumpy old programmer room
|
on: August 09, 2012, 03:27:23 AM
|
GCC definitely throws warnings when comparing signed and unsigned ints. When compiling, use the -Wall and -pedantic options to get all the warnings. Definitely worth it to correct all of them.
+1 on this one. Visual Studio has a warning for this too. You might get an occasional irritating warning when you write for (int i = 0; i < vector.size(); i++) { ... }
... but I think it's worth it. Liosan Yeah, signedness warnings are really helpful and catch a lot of potential mistakes. For simple stuff, these warnings can admittedly be annoying, but for that particular example, you should really get in the habit of using std::vector<T>::size_type or size_t, which addresses the warning and does the right thing. Alternatively, use iterators, which with auto type inference basically have the same boilerplate regardless of container. for (auto it = vector.begin(), end = vector.end(); it != end; ++it) { ... }
Or even use range-based for loops if you have a really new C++11-supporting compiler (recent GCC and Clang have it, Visual Studio 2012 will have it): for (auto it : vector) { ... }
|
|
|
|
|
15
|
Community / Creative / Post your embarrassing first game projects
|
on: July 14, 2012, 01:23:42 PM
|
Hey, I thought it'd be fun to have a dumb thread, where people share their embarrassing early attempts to make games. I'll start! These were games from when I was grade 6 or 7. I tried to make stuff in Verge 2 on my Win98 machine. I knew nothing about programming, and really sucked at art, music and writing, but somehow I persisted. I've recorded videos of the games in their hilariously incomplete states. Shadow Realms: This is the oldest project that I still have kicking on my hard drive. This was an RPG that was supposed to have a multi-scenario choose-your-character system inspired by SaGa Frontier, and battle elements inspired by Final Fantasy, SaGa 1 and 2 (Final Fantasy Legend), SaGa Frontier and others. This is not my only attempt at making it, but the earliest I have a copy of still. Here is some terrible story doc to go with it all http://codepad.org/KYQjysYSBeyond Chaos: I don't really get the point of this one, some sort of weird platformer thing that I think was supposed to be a bizarre mix of Mega Man and Mario. It was some really weird hack of a platformer engine that Zaratustra made for his game 4Four. (Unlike this, 4Four is actually a pretty cool platformer. It has a bit of metroidvania style exploration and it was made in like, 48 hours). Anyways, I'm done making fun of my creative abominations from grade 6. Your turn!
|
|
|
|
|
16
|
Developer / Technical / Re: How to program an attract mode / demo recorder?
|
on: July 03, 2012, 02:55:44 PM
|
can't you just use a random number generator which doesn't use floating points? integer random number generators probably exist
Most random number generators are integer functions of a random seed, and lots of library functions (Math.random() and the like) will normalize to a number between [0, 1) by dividing by their max range + 1. The real problem is random number generators differ between platforms. Since most languages use the C stdlib rand() function to implement their randomization, you may have a problem, no guarantees can be made about its properties, other than it returning a number betwen 0 and RAND_MAX -- and implementations vary between compilers and platforms. If you want a cross-platform random, you may need to write your own RNG or more sensibly, find a library that implements one. This probably is a good idea anyways, since stdlib rand is usually a crappy Linear Congruential random generator (which is a fairly periodic random function). I recommend Mersenne Twister instead.
|
|
|
|
|
17
|
Developer / Technical / Re: How to program an attract mode / demo recorder?
|
on: July 03, 2012, 01:01:59 PM
|
|
The way I've done this is just record a few simple things: your random seed, a snapshot of the state of all entities in the game (and the external state they rely on like powerups collected or whatever), and a compressed stream of the user input. It's very important your timestep is deterministic here though, or else it's possible to glitch the playback and get subtly different results every time.
This worked pretty well for me in the past, and requires less effort than capturing all events -- just capture the user inputs.
|
|
|
|
|
18
|
Developer / Technical / Re: Binary Search
|
on: June 17, 2012, 11:39:27 PM
|
|
Well, imin/imid/imax are array indices, so anything < 0 is outside the array. Really, to document this better, the type of the index variables should be "unsigned int", or better yet, "size_t". Also, truncated division/round-toward-zero is a perfectly valid method of rounding, you don't really need floor-to-infinity division, especially for this when you shouldn't have negative indices to begin with.
And yeah, you're right, that should actually be a right-shift operator ">> 1", because it is actually a division by 2. You are finding the midpoint between the min and max indices, by summing the two values and averaging. Multiplying makes no sense here, especially since that is guaranteed to go outside the array bounds for the trivial case with imin = 0 and imax = sizeof(A) / sizeof(*A) - 1.
But really they should just write "/ 2", since it's clearer, and most compilers are smart enough to optimize division/multiplication by constant powers-of-two into shifts.
EDIT: Also, I recommend making this function take the array's length as an argument instead of imin/imax, and make imin/imax into locals instead -- this allows you to completely avoid bugs where imin > imax.
|
|
|
|
|
19
|
Developer / Technical / Re: Coding without curly brackets
|
on: June 16, 2012, 11:05:26 PM
|
When using braces, I mostly put the brace on their own line, and indent the lines between the braces. if(cond) { statements; } else if(cond) { statements; } else { statements; }
Also, I basically never put whitespace after keywords if there is a parenthesized expression required directly after the keyword. Nowadays, I have come around to occasionally using brace-on-the-same-line. Particularly, I do this in JavaScript, because it becomes sort of nasty to write some of the annoying define-a-function-literal-and-call-it stuff to fudge around the terrible variable scope issues in the language. var funk = (function(lib) { lib.foo = function() { if(thing) { ... } else { ... } } ... return lib; })({});
If I were to prefer a language syntax, I would say that I want something that is easily machine readable, human readable, explicit, and parses the same regardless of whitespace formatting. C-like languages have some annoying syntax problems particularly the "dangling else" problem. Here's some shoddy psuedo-BNF: if_statement: 'if' '(' expression ')' statement ('else' statement)? compound_statement: '{' statement* '}' statement: if_statement | compound_statement | ...
Since the braces are optional, you get ambiguous cases in stuff like: if(foo) if(bar) statement; else statement;
Does the 'else' bind to the inner if, or the outer if? It's not entirely clear to everyone. The resolution is to bind 'else' to the nearest if statement, but certainly it makes parsing more difficult, if you use a parser-generator. This is why Lua gets my vote. It has a very simplistic syntax, with a fairly low number of keywords and operators. Semi-colons are optional empty-statements to improve readability, but are not required. Newlines are also not required. There is no magical statement completion, like languages like JavaScript. Blocks have unambiguous 'end' delimiters, so this avoids the 'dangling else' problem that C languages have. List and dictionary initializers use the same syntax -- because in Lua, there is one type, the table that mixes both types. Unlike Python, you are free to use whitespace as you wish to make things more clear (although indentation is still generally recommended), without having to add syntactic noise to indicate "split this across multiple lines" or "put these related statements on the same line". Unlike C, and like Python, you assignment is a statement, not an expression -- making a certain category of typos (accidentally using = instead of ==) impossible. They also don't clog up the language with unnecessary assignment syntax shorthands you see in most languages, like: for increments (++), decrements (--), and other in-place calculations (/=, *=, <<=, etc). In Lua, unlike Python, local scoping is made explicit (undeclared variables are global lookups), and any block may shadow local declarations in an outer block, and can pass variables in outer scope as an upvalue to closures in a reliable way. Unlike JavaScript or Python, variable declarations are lexically scoped to blocks, instead of function-scoped. Unlike JavaScript's rules for global-fallback, you can actually change the lexical environment of a block to another table which is used instead of the globals table -- allowing you to reliably sandbox pieces of code from using insecure functions, or to prevent namespace pollution. Python is also very nice, but I am often annoyed by the parsing complexities caused by using indentation as a block delimiter. Also, the fact that function syntax is sort of messed up -- there isn't really *good* syntax for anonymous functions aside from lambdas -- nested functions just feel really wonky, especially the variable scoping rules for them. I guess I just prefer explicit keywords. Anyways.
|
|
|
|
|
20
|
Community / DevLogs / Re: Dungeon Crawler (GameBoy Color homebrew)
|
on: April 05, 2012, 10:31:59 PM
|
|
Yeah I broke my scaphoid bone pretty bad. I can still type, but everything else has basically been fucked for left hand/arm. I'm hoping to still make progress on this though, but it's gonna go slow.
I've survived one week! I get the see the doctor on April 23, hopefully I can get this cast removed at that point, and get back to my typical life.
|
|
|
|
|