On key release, find specs of game, how old os's can run?

Started by hoanghuynh, January 11, 2018, 08:11:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


How would I do a key release function?
Código: [Seleccionar]
//rename the current level
            //Draw the dialog box
            //Draw the text on the dialog box
                text_z = -5; //this way its above the dialog box
                write(0,80,70,0,"NAME: ");
                write(0,80,90,0,"*rename the current level");
                //Type in the name
                temp_string = textinput();
            //level.filename is textinput()
                say("level.filename has been renamed to: "+level.filename);
        rename_pressed = true;
        rename_pressed = false;
Works when I press r, but it always types r as well. So I figure I can easily fix this by making it an on-release command. How could I make it so that this will work when I RELEASE the R key?

2. How would I find the specs for a game made in bennu?

3. How old of operating systems can run these games? Windows 3.1, Mac OS 9, Linux from the early 2000's, etc.?



Hi hoanghuynh,

For your first question, my strategy is use while loop after use the key detector in this way:

if (key(_a))
  //whatever that you want to do...

About your second question, if you are reffering about your game specs it will depends on the kind of things that you do. But in my opinion, is better a good CPU instead of a good VGA for run bennu games.

And about your last question, I don't know the answer.


5Leaps, el primer juego comercial desarrollado para BennuGD. http://www.5leaps.com


Well, releasing the key works the same way as pressing the key: you need a variable to know the previous state of it, so

byte pressed;
if ((key(_a) && !pressed)
    //do stuff for just pressing the button
    pressed = true;
if (!key(_a) && pressed)
    //Do stuff for releasing the button
    pressed = false;

About the specs, as Arcontus said, it depends on how many process do you have, how much code they execute, how efficient it is, if you're using 8bits, 16bits or 32bits color mode, the use of rotation, transparencies, blendop tables... So the only way to know is to try your game in an old computer.

And how old can a OS be? Well, I think I had Bennu working on a W2000 and I think in a W98 in virtualbox. As long as SDL can be executed on that machine, Bennu can be run or ported.
Hala, como con 1001 procesos sólo va a 9 FPS, vamos a meterle 32 veces más, a ver si revienta.
(Drumpi epic moment)