+ 3

How to code

How can I code audio and sound and characters?

14th Oct 2024, 7:56 PM
Nicolas Robledo
Nicolas Robledo - avatar
25 Respuestas
+ 10
The code you shared is a mix of Python and maybe some C++ thrown in. I see references to openai, which has nothing to do with audio. There are so many issues. My impression is that you've never written a program before and you've copied a few things together. You will never sort it out that way. Assuming you've never programmed before, I would not suggest starting with C++. I would recommend Python as a first language. But if you really want C++, go for it. It will just be a little more to learn. When writing a program, there are modules / packages / components you can include to help make programming easier. Before you try to learn those, you'll want to know how to structure a basic program and handle things like variables, loops, and functions. Here is a very basic C++ program that calls a function that outputs "Hello World". #include <iostream> // Define the function that prints "Hello World" void printHelloWorld() { std::cout << "Hello World" << std::endl; } // Main function where the program starts execution int main() { // Call the function to print "Hello World" printHelloWorld(); // Return 0 to indicate that the program ended successfully return 0; } For comparison, here is the same program written in Python. # Define the function that prints "Hello World" def print_hello_world(): print("Hello World") # Call the function to print "Hello World" print_hello_world() Notice how these programs look completely different from each other. Python code is shorter and uses a different syntax. C++ has a few more lines, but is not that complicated. Try to read each line of both programs and figure out what they do. Test both of them in the Code Bits section. As for playing audio, there are a few steps to make that happen, but it won't work in the Code Bits section because you don't have access to the audio file you want to play. There are ways to make it work, but it's probably out of reach right now. For now, focus on the basics.
15th Oct 2024, 12:34 AM
Jerry Hobby
Jerry Hobby - avatar
+ 5
Patience, organization, perserverance. Being full of ideas is a good thing. But there is no shortcut to learning anything. It's hard, boring work that you have to do over a long period of time.
15th Oct 2024, 1:51 AM
Bob_Li
Bob_Li - avatar
+ 5
If you want to program games, you have to get some basics down first. It's a long journey, but it's worth it. I recommend you start with Python. Learn about variables, loops, functions, and object oriented programming. After you get through one or two courses here, you'll be able to write some basic programs in Python and you will understand some of the core concepts. If you want to program games, you will then have to learn a game programming system. Most games are written using Unreal, Unity, or Godot. Unreal is the game engine used for some of the most beautiful games out there. But it does require a very powerful computer. It uses C++ as the programming language. It is free for users who aren't making a lot of money. Unity is the most popular game engine. It uses C#. It is a very nice engine and has a ton of assets to include in your games. It is also free for users who aren't making a lot of money. Godot is an open source game engine. It is not as robust as Unity, but it will make fantastic games for 3D or 2D and can run on any platform. It is easier to learn than Unity or Unreal. It has it's own language, GDScript, which is similar to Python. It also lets you use C# if you like. Honestly, if you want to wrote games, you need to learn Python first, then C#. That will give you enough foundation. You really must understand some core concepts before you can build games. Game programming requires you to understand object oriented programming, event management, signals. and asynchronous concepts. You simply cannot skip over those things. The other part of game programming is the art work. But you also need all the graphics for every little thing in your game. A typical game may have hundreds or even thousands of original 3D art objects and custom music too. Some of the popular games these days take hundreds of professionals years to build. The few games that are built by independent developers, those developers are very skilled and spend many months. I write games myself.
15th Oct 2024, 3:13 AM
Jerry Hobby
Jerry Hobby - avatar
+ 3
I would start HTML....
16th Oct 2024, 5:45 PM
Daniel
Daniel - avatar
+ 3
Good question Next question 💀💀💀💀💀
16th Oct 2024, 6:02 PM
Daniel
Daniel - avatar
+ 2
You did not specify a language. However, for whichever language, there are courses here you can take. There are also tons of sample scripts in the Code Bits section as well. Once you make some efforts, you can put your code into a Code Bits section and share it with us. We will assist you with any errors or questions. If you want more initial guidance on how to start, provide us with more information. What language do you want to program in and what exactly do you want the program to do. Making "sound" can mean several different things. Give us a better idea of what you want to learn.
14th Oct 2024, 8:06 PM
Jerry Hobby
Jerry Hobby - avatar
+ 2
I wish I had money to do the actual tutorial but I have no money
14th Oct 2024, 11:49 PM
Nicolas Robledo
Nicolas Robledo - avatar
+ 2
Zvi, My first game was back around 1995 or so. It was a Wheel of Fortune game for the PC. Shortly after, someone else released one that was better than mine so mine didn't take off. Mine had some really cool technology back in those days. But it takes more than good code to win in the game business. I even created my own copy protection feature for it. I'm a little embarrassed at how many of my games were never finished. But that's part of the process I guess. Honestly it's more fun in the design and game building phase. It's a lot less fun to package, release, document, and support a game. I wrote a side scroller game. Never finished it. Pretty good though. I might go back and finish it. Beta testers really loved that one. I've probably written twenty games, finished five. My new goal is to create an augmented reality game where you can play using your camera and play against other players in a real-world game. Perfect for these new headsets like the Quest3 or Apple Vision Pro. Still working on the details on that concept.
15th Oct 2024, 10:15 PM
Jerry Hobby
Jerry Hobby - avatar
+ 2
Good question Next question
16th Oct 2024, 5:58 PM
✧Bhavik✧
✧Bhavik✧ - avatar
+ 1
And this is what keeps on happening cuz I have no idea
14th Oct 2024, 11:50 PM
Nicolas Robledo
Nicolas Robledo - avatar
+ 1
Jerry Hobby What games have you written yourself?
15th Oct 2024, 3:33 AM
Zvi
Zvi - avatar
+ 1
Through learning
16th Oct 2024, 3:15 PM
Sibin I V
Sibin I V - avatar
+ 1
its better to crawl before you try to walk.
19th Oct 2024, 12:29 PM
Alpha dec
Alpha dec - avatar
0
Jerry ok um I am trying to use c++ or it's cpp but I have no idea how to do it
14th Oct 2024, 11:49 PM
Nicolas Robledo
Nicolas Robledo - avatar
0
I don't know if I messed up or what but can you please tell me and help me understand
14th Oct 2024, 11:51 PM
Nicolas Robledo
Nicolas Robledo - avatar
0
Please give me a DM private message let me know
14th Oct 2024, 11:51 PM
Nicolas Robledo
Nicolas Robledo - avatar
0
Ok what is the basics Jerry? So I can cuz I really want to make a game of my own and I already have story lines written up now I'm just wanting to focus on coding and yes I am new another code in my life this is my first time I've never written a program before
15th Oct 2024, 1:07 AM
Nicolas Robledo
Nicolas Robledo - avatar
0
I am making zyron
15th Oct 2024, 1:42 PM
Nicolas Robledo
Nicolas Robledo - avatar