Thanks. Does C++ have a sound class?
From: [email protected] <[email protected]> On Behalf Of Nathaniel Schmidt Sent: Saturday, February 13, 2021 11:11 PM To: [email protected] Subject: Re: [blind-gamers] Introduction, and programming questions Hi, If BGT arrays are the same as in C++, they won’t be very flexible if you use them to store cards because you won’t be able to add or remove items very easily. In C++ you can get around this by using vectors but I don’t know how you would do this in BGT. If you instantiated objects, then you could create methods of classes to perform on card instances which could change the values of class members/object attributes. I might have mentioned this on the list before. But if you want to use code similar to BGT that contains fairly easy-to-implement support for a basic graphical interface and keyboard input, you could always consider the option of C++ and a library called Splashkit (www.splashkit.io <http://www.splashkit.io> ). Using this library, you could create a basic game window by simply calling open_window ("window title", 800, 600);// you must specify screen height and width in pixels process_events ()// do this while the game quick query is false so that the program keeps on looking for key pressed events Something like that. Nathaniel ======================================== Nathaniel Schmidt Undergraduate student Bachelor of Computer Science (S306) School of Information Technology Faculty of Science, Engineering and Built Environment Deakin University, Melbourne (Burwood) campus https://sync.deakin.edu.au/profiles/student/njschmidt/ E: [email protected] <mailto:[email protected]> LinkedIn: https://www.linkedin.com/in/njsch/ GitHub: https://github.com/njsch/ Skype: nathaniel_schmidt1994 about.me/njschmidt/ On 14 Feb 2021, at 1:42 pm, Immigrant via groups.io <[email protected] <mailto:[email protected]> > wrote: Hello, everyone. I have just joined the group, and I hope the distinguished gamers and writers in this gaming community understand that I am very much a beginner, trying to write perhaps a couple of simple dice or card games. I wrote a dice game script in BGT, and the script doesn't generate any compilation errors. However, the game window stays open only for a couple of seconds, and then disappears, so none of the program's keystrokes can be executed. I realize that BGT is no longer supported, but it does work under Windows 10, and it is the only engine where I know how to implement keystrokes and add and manipulate sounds. I checked basic tutorials for a few programming languages, and realized that game logic can be programmed in any of the languages but none of these tutorials addresses keystroke-driven implementation, or addition of sound. And even in the BGT tutorial, I have not found answers to some of my questions. The game I am currently trying to write is a dice roller, but if one tries to create, for example, a card game, how do you make a card playable? If cards exist as strings, or parts of an array, or even instances of their own class, they are just abstract logical structures. But cards need to be manipulated - picked up, discarded, etc. If I have a hand with 5 cards, how do I program a way to navigate the list of cards and then perform an action on a card currently in focus? How to make it an element of interface so it can be selected? I hope I clearly expressed my questions, and I am grateful in advance for any clarifications. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#123323): https://groups.io/g/blind-gamers/message/123323 Mute This Topic: https://groups.io/mt/80623843/21656 Group Owner: [email protected] Unsubscribe: https://groups.io/g/blind-gamers/leave/607459/1071380848/xyzzy [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
