Code Monkey home page Code Monkey logo

ngt's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ngt's Issues

Urgent: tasks that MUST be done

So, a few things need to be done, ASAP, before you go adding anything else:

  1. Get rid of all the DLLs/libs/binaries in the repository. This is a source code repo, not a source code/binary repository.
  2. Switch to using CMake. Seriously. You can use a starter template like this one to get going. For dependency management, use something like vcpkg or conan. If you need dependencies that aren't in the vcpkg or conan repositories, use something like cpm.cmake.
  3. Switch to using non-windows-specific libraries and instead use platform abstractions. If you need UI support, either use a library like wx or qt directly, or, if you want a bit of abstraction, try something like xtd.
  4. Stop putting everything into one file. This is incredibly bad practice and makes your code very difficult to work with. One way is to put each class in it's own file. Another way is to categorize classes (e.g. one file for audio, one file for IO, one file for crypto, etc.).
  5. Stop using both OpenAL and Miniaudio together. Pick one or the other. When it comes to audio playback and basic audio handling, both can do the exact same thing. Using both simultaneously not only complicates your code but risks problems later when you port to other platforms because not all platforms handle audio IO the same way, and a platform may open a device exclusively or something. If you want HRTF or whatnot, use OpenAL, FMOD, or use SteamAudio alongside Miniaudio (or use something like LabSound).
  6. Implement error checking. Out of all of the above points, this is by far one of the most important. Right now, glancing through the code reveals a ton of function calls to C APIs (yes, C, not C++) that return error results, but you don't verify those results to confirm that the call your making succeeds. Not every library you ever use in C++ will throw exceptions. Do not assume that a library will throw an exception unless this is explicitly documented or otherwise obvious, and if your working with C libraries, always assume that the result you get back can be either (1) NULL, (2) an error value, or (3) the value you want, unless the function signature explicitly indicates that no result is returned. If the library uses out parameters, always check those out parameters to ensure that they aren't NULL or otherwise undefined.

All of this needs to be done. As it currently stands, this repository is an utter mess, and so is the code, and if you want this to get off the ground then it needs to be maintainable, easy to work with, reusable, and well-organized. Using CMake and the template above to get you going is going to go a long way towards that goal. Using platform abstractions will dramatically reduce the amount of code you need to write, and will make your project a lot easier to understand because your intent will be far more obvious. You should only use raw platform APIs if you have no other option. If you do use raw platform APIs, abstract them so that your code is reusable and people who want to use them don't need to worry about how it works under the hood.

a kritical problem with ngt's context menu registrations

hello. I've installed ngt, and then, when I pressed application on all my files which had .ngt extention, The open o option has been renamed to open with ngt, and when I uninstalled ngt, and then I pressed application on my files which had .ngt extention on them, the Open o option was gon from them, so now if i press application on any of my files with any extention such as .badBoy, .BadGirl, I have the open o option, but for .ngt files I don't have this option. What is wrong with ngt's registration of changing context menus up on uninstalation?

Lack of Any Tests

This currently lacks any sort of tests, which makes it difficult to know whether anything broke with latest changes. In addition, this also means we do not entirely know whether we have any memory leaks within the project. Since the engine is relatively modularized, it should not be hard to add both tests for correctness and checks for memory leaks.

Engine To Do List

To Do list.

This list contains things that must be done, which includes but is not limited to potential breakups and other problems. I will include with each thing in a heading using level 2 to navigate easyer. The list is sorted by top needed, which means the first thing you see would be very necessary to fix.

Soundsystem

The sound system is consuming excessive memory. This indicates that the engine isn't loading sounds efficiently compared to other audio game engines like BGT, which utilizes memory caching. Memory caching allows sounds that are already loaded into the program to remain in memory for as long as the script is running, preventing the need to repeatedly load them.

Encryption

The encryption functionality is not working properly, particularly the encryption functions such as string_encrypt and string_decrypt. This means that data cannot be encrypted, making it easier for individuals who wish to access the program's code behind the scenes.

File and filesystem

The file class and filesystem needs improvements. Especially the filesystem class, the use of the functions in it is very complicated

For the class, I expected like this:

class filesystem
{
int rmdir(string dirs); //Remove one or more directories.
int mkdir(string dirs); //Makes one or more directories
int rmfile(string filename); //Removes the file, delete.
string get_current_path() const property     //Stay as current
string[] ldirs(string search); //Searches the directories, like BGT's find_directories function, with supporting patterns.
string[] lfiles(string search); //Searches the files, like BGT's find_files function, with supporting patterns.
int copy(string source, string destination, bool overwrite=false); //Copies directories or files.
}

Screen reader

Using screen reader is not complicated but of course it is a little unclean.

I expected to have a class for screen reader.

The class would look like the following:

class screenreader
{
bool default_interrupt=false; //Default speech interruption parameter, false is the default. Users can set this to use as a class global interrupting parameter without having to specify each time in the speak class, see below.
string get_current_reader() const property //Returns the currently running reader.
bool speak(string text, bool interrupt=this.default_interrupt); //Speaks and return true or false.
bool speak_wait(string text, bool interrupt=this.default_interrupt); //Speaks and wait for it to finish, and return true or false.
bool stop_speech(); //Stops the speech.
}

Network

Finally, as you may have expected, here the network comes. However, this must only be done after completing the soundsystem, and encryption system first before doing, otherwise the engine might have issues in the future, such as not being able to encrypt the data on the internet.

Conclusion

Well, I think that's it! If there are anything more to do list, I will provide again, but seriously the soundsystem needs repair first, then encryption.

My last word? Simple, do not make new features unless everything is fixed. If you found a bug, continue fixing it otherwise rather than trying to add new and new features. Even though it has much features, a game engine cannot last with bugs.

Best regards, Harry Min Khant, An indepentent developer.

Benchmarks for Engine Data Structures

There is currently no measurable way of comparing implementations or speeds of data structures used by the engine. In addition to tests, it would be nice to have quantified data showing performance / data sizes for the engine.

Timer overflow

Hello, I noticed that an integer is used for timer.elapsed(), but I have experience from bgt that we also use the timer to monitor the player playtimer and if int32 is used, overflow is possible after two months.

More Flexible Speech Implementation

As of now, Tolk is the only backend possible for using speech and the architecture is not very flexible. For instance, it would be mildly painful to expand this implementation to support Linux. Have you considered using libraries like Universal Speech or looking for interfaces to Speech Dispatcher/VO for greater cross-platform compatability?

Signature, + code signing, + project reliability

Hello everybody
It would be possible to implement a code signature or signature for games compiled using px, or .pem certificates to verify the authenticity of your game / project and improve the level of reliability and security so that an antivirus does not accuse the games or projects created like viruses?
Also, when compiling include metadata that demonstrates who the creator of the project was?
In addition, sign the code and all modules / sub-items that are included and then compile it so that the AVS detection rate is minimal.
These are just thoughts to improve security.

New features

please add new methods:
string get_current_directory, bool file exists double get_file_size

Security questions

Hi, I have questions gameobject.ngtb must be with the exe file? if so isn't it dangerous? in my opinion, it should be included directly in the release exe, and it should be encrypted using aes or something like that, and I would initialize the aes myself when starting the game or in some other safe way, because at the moment it looks like this, if I saw the game like this, people would they could read both my data and file location

CMake Support

Hi,

So far, there is no alternative ways of building the engine aside from using Visual Studio. This limits cross-platform potential of the project and restricts one's development options to this particular IDE. We need to reconsider the build process for the tool so that it is more flexible and portable. Please add the capability to build this using tools like cmake.

General issues

Hello, I would like to summarize a few more issues
1.
if you initialize the timer t; and then you don't use restart but you give an alert and it will show you -2147472384
2. compiling executable doesn't work only in release/game_object.ngtb folder
3. I think that when calling the init engine, the 3d bass sound parameters should not be set or the bass shouldn't be initialized, because in the event that later there will be dll support and I want to implement my own sound system, I will have a problem
4. it would be good if the sdl2 library was implemented directly into the static exe file when creating the executable

several ideas

several requests:

random:

please make the random function to no limit on it.
for example, change below to double.
long random(long min, long max)
to
double random(double min, double max)

scr class:

please make the screen reader class.
the class will hold the ability to speak, stop, and determine which screen reader is active.
for example, like bgt.
class screenreader
{
bool speak(int reader, string text);
bool is_active(int reader);
bool set_lib_path(string path);
}

init engine:

please make the init_engine function to the ability to set the path of the dll files. for example
init_engine("libs");
this means the function will look dll files in libs/.

Jaws and keyhook

I tried jaws and keyhook but I found that it doesn't work very reliably yet and when the window opens it can't be minimized

function duplecation required

function duplecations.

please make like file::write_int, file::write_string, to be only one function (file::write), as bgt.
because now, the code may seem more harder than php now.
also.
file::read_string, to file::read.
the read and write functions must only their respective 1 function, and there should not be read_string, read_int.

also, make the string parameter to hold other datatypes, such as ints, floats. string must have hold all other types, including numbers, ints, floats, as of bgt.
for example, this fails. but this should not be failed.

void main()
{
double x=5;
alert("ok",x);
}
error. no such function alert(const string, const double)

Script Fails to Compile without Error Messages When Method Called without Parentheses in For Loop

The script fails to compile when a method is called inside a for loop without using parentheses (). Instead of using parentheses, a semicolon ; is placed at the end of the method call. This causes the script to not compile, but surprisingly, it does not throw any error messages, leading to a silent failure.

Steps to Reproduce:

  1. Create a script with a for loop.
  2. Inside the for loop, call a method without using parentheses () but end the line with a semicolon ;.
  3. Attempt to compile the script.

Expected Behavior:

The script should either compile successfully if the syntax is correct, or it should throw an error message indicating the syntax issue when parentheses are omitted in the method call.

Actual Behavior:

The script does not compile, and no error messages are displayed, leading to a lack of feedback on the syntax error.

Possible Impact:

This issue can lead to significant debugging challenges, as the lack of error messages makes it difficult to pinpoint the syntax error in large codebases.

Timers

I recommend that you add timer:: elapsed_micros,_millis and nanos if possible because it would allow more accurate measurements during micro optimizations and at the same time if it was about compatibility in bgt then it is not a problem to overwrite elapsed to elapsed_millis in the projects. Also if you are not using folder x64 in the project you can add that to .gitignore and avoid people pushing compiled builds.

closing game window

Good day, it would be good if in sdl2 you could disable closing the window using alt f4 and rather allow me to call quit when I want it, because this way if the player presses alt f4 the window will close forcibly and I have no control over it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.