Re: Game Creation

2014-09-02 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: Game Creation

I feel like trig (or at least the parts an audio game is likely to need) should be easy to explain. Should I try it?

URL: http://forum.audiogames.net/viewtopic.php?pid=187568#p187568




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: Game Creation

2014-09-02 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: Game Creation

To preempt complaints about indentation accessibility: I only really started taking Python seriously this year. Indentation was not at all hard to get use to. I dont have NVDA read tabs all the time--that would just get annoying--but if I need to check, a simple use of the home and right arrow keys is sufficient (also, braille helps loads, but Ive made do without quite a bit). Its easy to spot when indentation is broken if the interpreter complains, and applying indentation to other languages that dont require it has cut down on my Unexpected end of File errors tremendously. (It makes me wonder if sighted programmers are even more powerful by virtue of being able to see all of that at a glance, considering that just indenting with only a screen reader feels like a power boost.).

URL: http://forum.audiogames.net/viewtopic.php?pid=187610#p187610




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: Implementing TAS support into BGT game?

2014-08-22 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: Implementing TAS support into BGT game?

I would just plain avoid relying on speech/audio timing entirely. Possibly use frames instead of timers. If its really important that audio finish playing, avoid having frames pass while this is happening if possible (you couldnt get away with this in anything with graphics, but it should be possible in BGT).If TTS is involved, record at the slowest voice rate you can stand. If laggish audio is likely to be inaccurate to frame count, delay as long as possible (but I think loading sounds is serial, so Im not really sure if playback on its own does that much lag-wise?).And if you havent already, try to implement something that keeps frames as even as possible. Youd want to keep the framerate no higher than it needs to be (I wouldnt go any higher than 50FPS, but you can probably get away with as low as 20 before anyone notices.).I wonder if someone shouldnt just implement an FPS clock?... Ah. Then I went and did it in
  the post before I remembered you could probably do it better.

URL: http://forum.audiogames.net/viewtopic.php?pid=185919#p185919




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: Learning String Variables in BGT; puzzled over example.

2014-08-19 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: Learning String Variables in BGT; puzzled over example.

(The [[wow]] brackets are just the spam filter. I dont know if theyre still around, but bots peddling World of Warcraft Gold with lots of links were extremely common a few years ago, so the brackets get added to break their posts without removing anything from legitimate posts.)This is one advantage that scripting languages like _javascript_ and Python and I believe _vbscript_ have for newbies: the syntax of functions is not easy to confuse with variables. The downside is that the first two dont specify a return type, which can have drawbacks if you arent careful (and makes for more confusion if you want to learn a lower level language later).Compare:// _javascript_:function anumber(x, y){return x+y;}# pythondef anumber(x, y) :  return x+y// BGT/C/etc:int anumber(x, y){return x+y;}You dont specify an output variable in any case, but 
 in the last, you do specify the type of variable to return. (There is a reason, but I get how it can be confusing.)Calling the function still works likeint x=anumber(5, 3);I have no idea if this post is helpful. 

URL: http://forum.audiogames.net/viewtopic.php?pid=185539#p185539




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: Learning String Variables in BGT; puzzled over example.

2014-08-17 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: Learning String Variables in BGT; puzzled over example.

There are three (well, technically 4) errors:1. Youre missing a semicolon when you first define x.2. The first and last quotes in the alert are missing again.3. When you define the function, you dont need the x=.HTH

URL: http://forum.audiogames.net/viewtopic.php?pid=185230#p185230




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: accessible java IDE/SDK?

2014-08-06 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: accessible java IDE/SDK?

I missed this somehow, but, yeah, Tward has it right. If you need an IDE, go for Eclipse, but you can do without if you use the command line.

URL: http://forum.audiogames.net/viewtopic.php?pid=183830#p183830




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: FPS: How to mute the objects located at the other side of wall?

2014-07-28 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: FPS: How to mute the objects located at the other side of wall?

I once asked Aprone if he had anything better than iterating along the line segment between the listener and the object. I believe his answer was something like If you come up with such a thing, Id like to hear about it! I dont think my Skype history from that far back is still around, but I could check. I remember trying this once, but I dont remember which project.I keep expecting it to lag, but it somehow has no noticeable effect on speed. Maybe it would if there were too many sounds in the distance?

URL: http://forum.audiogames.net/viewtopic.php?pid=182546#p182546




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: is coding in python easy? just interested

2014-07-26 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: is coding in python easy? just interested

I ported sound_positioning.bgt to Pygame. I dont know if the copy on this computer is the completed version, but I know that I do have a copy that works pretty much identically to the BGT version.(Disclaimer: other than mapping BGTs sound ranges to Pygames, I mostly just formatted Phillip Bennefalls code as Python.)

URL: http://forum.audiogames.net/viewtopic.php?pid=182209#p182209




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: movement and turning for an fps.

2014-07-20 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: movement and turning for an fps.

Im not sure I understand what you need. Can you maybe describe an example where the desired restrictions come into play?

URL: http://forum.audiogames.net/viewtopic.php?pid=181454#p181454




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: creating status sounds in python

2014-07-16 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: creating status sounds in python

The four basics are sine, sawtooth, square and triangular.This page gives examples (it looks like one of them uses headings to separate them, so it should be easy to find):http://stackoverflow.com/questions/1073 … angle-waveThose arent incredibly useful on their own--you still need to change a few values and such--but that covers the most common basic waves.

URL: http://forum.audiogames.net/viewtopic.php?pid=180908#p180908




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: creating status sounds in python

2014-07-16 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: creating status sounds in python

The four basics are sine, sawtooth, square and triangular.This page gives examples (it looks like one of them uses headings to separate them, so it should be easy to find):http://stackoverflow.com/questions/1073 … angle-waveThose arent incredibly useful on their own--you still need to change a few values and such--but that covers the most common basic waves.Also, its for C, so there are some bits of notation in there you might or might not find confusing, depending on your experience. Specifically the liberal use of ++, and the ?: thing (Python has equivalents to these, but the latter at least looks pretty different).Ill translate the square one into Python as best I can:y = 3 if(x % 6)  3 else 0(Except youd want -1 and 1 for the maxima instead of 3 and 0, and the 6 and 3 in there should be replaced with the period and half of said period respectively. So it looks more like this:bytes[i]=-1.0 if((t%(1.0/f)  0.5/f) else 1.0... I think. Im having a stupidly hard time remembering how to calculate hte period all of a sudden.)

URL: http://forum.audiogames.net/viewtopic.php?pid=180908#p180908




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: creating status sounds in python

2014-07-16 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: creating status sounds in python

The four basics are sine, sawtooth, square and triangular.This page gives examples (it looks like one of them uses headings to separate them, so it should be easy to find):http://stackoverflow.com/questions/1073 … angle-waveThose arent incredibly useful on their own--you still need to change a few values and such--but that covers the most common basic waves.Also, its for C, so there are some bits of notation in there you might or might not find confusing, depending on your experience. Specifically the liberal use of ++, and the ?: thing (Python has equivalents to these, but the latter at least looks pretty different).Ill translate the square one into Python as best I can:y = 3 if(x % 6)  3 else 0(Except youd want -1 and 1 for the maxima instead of 3 and 0, and the 6 and 3 in there should be replaced with the period and half of said period respectively. So it looks more like this:bytes[i]=-1.0 if((t%(1.0/f)  0.5/f) else 1.0... I think. Im having a stupidly hard time remembering how to calculate the period all of a sudden.)[edit] The last answer on that page might be more helpful, but warning: uses C.http://stackoverflow.com/a/21197837And ignore the plotRGB lines in there. Those appear to be for graphics.[/edit]

URL: http://forum.audiogames.net/viewtopic.php?pid=180908#p180908




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: creating status sounds in python

2014-07-15 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: creating status sounds in python

x%y = the remainder of x/y.So 13%3 =1, because 13/3=4 remainder 1.For example, an easy way to tell if an int is even or odd is to do x%2, since the only possible remainders for division by 2 are 0 and 1.x%y = remainder of x/y. If x is a multiple of y, then x%y = 0.So you wouldnt want to try x%0, because youd get a division by 0 error (or infinity, or NaN... different languages handle this differently).

URL: http://forum.audiogames.net/viewtopic.php?pid=180789#p180789




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: is coding in python easy? just interested

2014-07-13 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: is coding in python easy? just interested

Ive made games in Java and _javascript_ and learned my lesson about lag back when I tried to have IE5 update 80 images a frame. Other than using boatloads of transparent gradients, I dont see speed issues in interpreted languages becoming much of a problem (and for most of those, most of the work can be saved in images and reused, and thus lag disappears).In BGT, I only ever get lag when I have a ridiculous number of collision checks per frame, and even then I suspect theres some inefficiency in there somewhere I havent been able to track down. So far Ive done nothing sensitive enough that spreading out checks over multiple frames cant help.Yukionozawa did a speed comparison between HSP and BGT shortly after BGT became freeware. I remember BGT being slightly slower (but winning in a different test I dont remember). I wouldnt really expect a significant speed difference between BGT and Python, is what Im saying.<
 p>(Ill second Camlorn on the indentation thing: Im still focusing mostly on BGT just because its easier to continue with what Ive been using, but Ive had one eye on porting to Python if I get a game strong enough that I can support adding graphics, so Ive been using indentation and placing braces etc such that theyre easy to clean up programmatically. My number of unexpected end of file errors has dropped dramatically.)

URL: http://forum.audiogames.net/viewtopic.php?pid=180553#p180553




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: is coding in python easy? just interested

2014-07-13 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: is coding in python easy? just interested

I was thinking in the general direction of a spatial hash myself after the first huge dose of this (it wasnt a spatial hash exactly because I tried to come up with it on my own). Then I decided that was too inconvenient and settled on the memory inefficient technique of using 3D arrays; the objects are still objects, just stored in each tile they overlap. This only works for fixed objects, of course, but 99% of objects are likely to be fixed in most games anyway. This will probably wind up pointless if I try to use Box2D (recreating physics from scratch is just tedious), but for now I think what Im working on can survive on aproximations.(But if I pick up Sonic again? Definitely moving to Box2D. Ive always suspected the original concept was just a physics simulator on a blue ball, then they turned the ball into a hedgehog.)

URL: http://forum.audiogames.net/viewtopic.php?pid=180580#p180580




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: a few audio gaming/programming questions

2014-07-10 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: a few audio gaming/programming questions

What kind of games are people looking for?All of them. Short of space invaders and casino games, there isnt really a single genre that Audio Games couldnt use more of. And, heck, if youve got an epic space invaders/casino concept that blows the vanilla stuff weve had for aeons out of the water, go ahead and give it a try.But mainstream-style RPGs, action/adventure, sports, 2d 3d or otherwise, fantasy/sci fi/realistic, whatever; itd still go over well if its designed well enough.Also, What programming language best fits creating audio games, with 3d sound.3D sound has been pretty hard to reach for years, now (blame the XBox for convincing Microsoft to drop support for hardware acceleration in favor of consoles with surround sound setups). Camlorn is working on bringing us back 
 up to the futuristic standards of 1999, but in the mean time, 3D sound is a function of how much effort youre willing to put in to making something like OpenAL or fmod do what you want (and Camlorn found some flaws in OpenAL that encouraged him to just build his own from scratch).I was recently using bgt to see if I could create a sort of map you could walk around and turn around (360dg) in. However, I struggled when it got to changing sounds depending on where the player is facing as the bgt gaming engine was not able to use 3d sound. I could turn and have the sound quiet and lower in pitch depending if you were facing away or towards the object on the map, but this could also be confused with weather you are behind or in front of the object.3D sound is one of the most commonly requested features for BGT, but its nontrivial to implement. THe sound_pool class uses a slight pitch decrease to indicate behin
 d-ness (you can adjust the magnitude of the decrease), but its not quite the real thing. I made a modified sound pool that supports rotating the listener, and makes an attempt at vertical sound but its nothing resembling impressive.I usually make the behind pitch decrease a little on the bigger side (like 5% or so) just so its easier to distinguish, but thats not the best solution by a long shot.

URL: http://forum.audiogames.net/viewtopic.php?pid=180283#p180283




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: creating status sounds in python

2014-07-07 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: creating status sounds in python

Is there no way to synthesize tones? Something simple like this could be accomplished with a short triangle or square sample. The code to generate the data for those is trivial; the question is more if theres a way to then play it.

URL: http://forum.audiogames.net/viewtopic.php?pid=179974#p179974




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: pack files in bgt

2014-07-04 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: pack files in bgt

At The Doctor: I have my website through Freeservers. In spite of their name, they cost about $100/year.At Roro: Youd do it the same as with any other sound. For example:if(key_pressed(KEY_Q)) { pool.play_1d(sounds/mysound.wav, player_x, sound_x, true);}I think it works with regular sound objects as well. I use the sound_pool so much Im not really sure, but I think thats the point of the set_sound_storage function.

URL: http://forum.audiogames.net/viewtopic.php?pid=179487#p179487




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: A BGT error, or what?

2014-07-01 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: A BGT error, or what?

The if statements in game() are not inside a loop, so it only checks them once, then there is nothing left to do, so it exits.Between these lines:h.load(sounds/h.ogg);
if(key_pressed(KEY_Q)) {There should be something likewhile(true) {And between the last two braces, there should be something like:wait(5);}

URL: http://forum.audiogames.net/viewtopic.php?pid=179091#p179091




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: pack files in bgt

2014-07-01 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


  


Re: pack files in bgt

(My trackpad mysteriously came on and started clicking things and it ate my last attempt to reply.  )I dont know if I can do anything better than the tutorial, but Ill try a simple example assume any minor errors are a test. ... Yeah.// Pack all files in a certain directory, recursive.
// This probably needs to be in its own script; pack everything separately from the game, otherwise it will do weird things when someone tries to play it.

// Both parameters here have a default value, so you can just call pack_all().close() and thats everything. You might try pack_all(sounds) if you only want the sounds folder, for example.

pack_file@ pack_all(string top=, pack_file@ ret=null) {
 if(@ret==null) {
  pack_file temp;
  @ret=temp;
  ret.create(data.dat);
 }

// Formatting:
if((top!=)(string_right(top, 1)!=/)(string_right(top, 1)!=\\)) {
 top += /;
 }
string[] dirs=find_directories(top + *);
string[] files=find_files(top + *);

for(uint i=0; ifiles.length(); i++) {
ret.add_file(top + files[i], top + files[i]); // The filename in the pack matches the filename on the system.
}

 for(uint i=0; idirs.length(); i++) {
 pack_all(top + dirs[i], ret); // Since ret is a handle, we shouldnt need to save it, but if this doesnt work, try adding @ret= to the start of this line.
}

return ret;
}


void main() {
// Example, packing everything in ./sounds
pack_all(sounds/).close();
}



// Now, a program that plays a file froun the sounds pack, while including it in the executable:


#include data.dat
#include sound_pool.bgt

void main() {
set_sound_storage(*); // Now, whenever we try to load a sound, it will look in data.dat. The * indicates that its the included pack.
pack_file test;
test.open(*); // You can now access files from the icnluded pack directly, if you need to.

sound_pool pool;
pool.play_stationary(sounds/sound001.wav, false);
wait(1000);
test.close();
alert(Done, You should have heard an included sound.);
}
}I have no idea if this was helpful. 

URL: http://forum.audiogames.net/viewtopic.php?pid=179092#p179092




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: Computing project

2014-06-29 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


Re: Computing project

Are you using a window only because of the sound?I think you can use it without a window, if you call pygame.mixer.init instead of pygame.init. The latter forces you to use the screen, but you can use audio without the rest of it if you just use the former.I think, anyway.If you need/want the window anyway, maybe consider drawing text to the screen with pygame.draw and using ... some kinda screen reader output that Python has (universal speech seems to support python hypothetically, but no idea if it works or not. Getting it to work with NVDA shouldnt be that hard, at least.).URL: http://forum.audiogames.net/viewtopic.php?pid=178839#p178839

___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: Bgt and key customization

2014-06-28 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


Re: Bgt and key customization

(Speaking of errors, I just noticed that I left off a closing brace at the end of that last example.  )The only thing that really matters for customization is separating the input method from the commands. KeyC takes the key that was pressed, and tells you what command its mapped to. The same idea would be useful for joysticks, etc.URL: http://forum.audiogames.net/viewtopic.php?pid=178683#p178683

___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: Bgt and key customization

2014-06-27 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


Re: Bgt and key customization

Heres the class Ive been using. Its designed around java, but it only takes an extra function to get it working the same way in bgt.(The MyKeyC function just generates the default configuration I like using. No one else seems to like it, though, so feel free to ignore that one.) // KeyC bridges poll-based and event-based keyboard input,
 // And enables custom keyboard configurations.

 // Constants:
const int START=128, L=1, R=2, U=4, D=8, A=16, B=32, C=64, none=-1;
 // 1:56 PM 4/8/2010: START was originally 0, but since this makes it impossible to determine if start has or hasnt been pressed (and this was causing problems with game controllers), its been changed to 128.
 const int X=256, Y=512, Z=1024; // Added 10:35 AM 5/24/2010.
const int KeyC_START=128, KeyC_L=1, KeyC_R=2, KeyC_U=4, KeyC_D=8, KeyC_A=16, KeyC_B=32, KeyC_C=64, KeyC_none=-1;
 // 1:56 PM 4/8/2010: START was originally 0, but since this makes it impossible to determine if start has or hasnt been pressed (and this was causing problems with game controllers), its been changed to 128.
 const int KeyC_X=256, KeyC_Y=512, KeyC_Z=1024; // Added 10:35 AM 5/24/2010.



 KeyC@ MyKeyC() {
 KeyC ret(); //=new KeyC();
 ret.l=KEY_A;
 ret.r = KEY_S;
 ret.u=KEY_W;
 ret.d=KEY_Z;
 ret.a=KEY_F;
 ret.b=KEY_G;
 ret.c=KEY_H;
 ret.start=KEY_SPACE;
 // X, Y and Z added 10:37 AM 5/24/2010:
 ret.x=KEY_R;
 ret.y=KEY_T;
 ret.z=KEY_Y;
 return ret;
}//I use this one a lot...


 class KeyC {
 // Mapping variables to KeyCodes:
 int l;
int r;
int u;
int d;
int a;
int b;
int c;
int start;

 int x; int y; int z; // 10:36 AM 5/24/2010.
 int flags; // Keyup/keydown bits. Note that this prevents start from being caught.
 int lastPressed; //7:13 AM 2/14/2010. To determine if a key being released is the last key that was pressed.

 KeyC() {init();}
 void init() {
 l=KEY_LEFT; r=KEY_RIGHT; d=KEY_DOWN; u=KEY_UP;
 a=KEY_NUMPAD1; b=KEY_NUMPAD2; c=KEY_NUMPAD3; start=KEY_RETURN;
 x=KEY_NUMPAD4; y=KEY_NUMPAD5; z=KEY_NUMPAD6;
 flags=0; // Keyup/keydown bits. Note that this prevents start from being caught.
 lastPressed=-1; //7:13 AM 2/14/2010. To determine if a key being released is the last key that was pressed.


 }// Initialize.

 int getKey(int k) {
 if(k==a) return A;
 else if(k==b) return B;
 else if(k==c) return C;
 else if(k==x) return X;
 else if(k==y) return Y;
 else if(k==z) return Z;
 else if(k==start) return START;
 else if(k==l) return L;
 else if (k==r) return R;
 else if(k==u) return U;
 else if(k==d) return D;
 return none;
}//Key.

bool isKeyPressed(int k) {
 if(k=0) return false;
 return (flagsk)!=0;
}

 int press(int ke) {
 int k=getKey(ke);

 if(k=0) return k;
else if( (flags  k)!=0) return none;
 flags|=k;
  lastPressed=k;
 return k;
}//Assuming we dont know what k is from the start.
 int release(int ke) {
 int k=getKey(ke);
 if(k=0) return k;
 else if( (flags  k)==0) return none;
 // I always get confused on turning off a bit.
 flags = ~ ( (~flags) |k);
 // So that flips flags. We ensure that k is 0, with absolutely no answer for the rest. We flip it back. K turns to 0, everything else is as it was. Is there a quicker way to do that? :P. Maybe ~k?
 return k;
}//Releasing an unknown key.
 // I cant help but think Im forgetting something. :P.
} //Heh! This used to be a private class...A save/load function for it might look like this:bool save_controls(KeyC@ keys, string filename) {
string text= + keys.l + \n + keys.r + \n + keys.u + \n + keys.d + \n + keys.a + \n + keys.b + \n + keys.c + \n + keys.x + \n + keys.y + \n + keys.z + \n + keys.start;
file fout;
 fout.open(filename, w);
 fout.write(text);
 fout.close();
 return true;
}

KeyC@ load_controls(string filename) {
KeyC ret;
if(!file_exists(filename)) return ret;
file fin;
fin.open(filename, r);
string text=fin.read(0);
string[] lines=string_split(text, \n, true);
if(lines.length()11) return ret; // Otherwise it will crash with a runtime error.
ret.l=string_to_number(lines[0]);
ret.r=string_to_number(lines[1]);
ret.u=string_to_number(lines[2]);
ret.d=string_to_number(lines[3]);
ret.a=string_to_number(lines[4]);
ret.b=string_to_number(lines[5]);
ret.c=string_to_number(lines[6]);
ret.x=string_to_number(lines[7]);
ret.y=string_to_number(lines[8]);
ret.z=string_to_number(lines[9]);
ret.start=string_to_number(lines[10]);
return ret;
}I havent tried compiling those two, though. THere might be errors. THe class is fine; Ive been using it for like 6 years.How to use that effectively is a whole other post, though.URL: http://forum.audiogames.net/viewtopic.php?pid=178598#p178598

___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: looking for bgt game developer

2014-06-26 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


Re: looking for bgt game developer

You could bring on everyone. Have an all-star cast! IIRC that contributed substantially to the hype when Chrono Trigger was first released. And everyone loves hype! So long as theres follow-through.(On that note, I need to go beat my copy of Firefox into submission.)URL: http://forum.audiogames.net/viewtopic.php?pid=178438#p178438

___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: looking for bgt game developer

2014-06-24 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


Re: looking for bgt game developer

Keywasfull wrote:*communicates ideas effectivelyAh, well, I suppose that disqualifies me, then.Im hoping this pans out; if its big enough to require multiple programmers, theres definitely potential, and goodness knows we need some of that.URL: http://forum.audiogames.net/viewtopic.php?pid=178186#p178186

___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: How to find pithon?

2014-06-21 Thread AudioGames . net ForumDevelopment room : CAE_Jones via Audiogames-reflector


Re: How to find pithon?

I havent even bothered setting the path. I just install it and cd to c:\python27, and associate .py files with python so I can run them directly.URL: http://forum.audiogames.net/viewtopic.php?pid=177805#p177805

___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector