EltenLink

NVGT: The Stronger Game Engine

Back to Computers and Technology

#41 daszekmdn

I included but nothing changed. Void mainmenu is in another file called menu.bgt


Sygnatura to może być w sądzie. Sygnatura sprawy np. :P
2024-06-08 15:56

#42 rudolf

You should change it to .nvgt.



Edited 2024-06-08 16:20

#43 marchoffmann

Question. How do you expect nvgt to work if the file endings really are .bgt?



2024-06-08 17:26

#44 rudolf

I'd need help with this code. The button appears to be broken. I think the result field wouldn't update too.
void calculator()
{
show_window(".");
f.create_window("calculator"+version1);
int n1=f.create_input_box("First number","","",15,false,false,false);
f.focus(n1);
int n2=f.create_input_box("Second number","","",15,false,false,false);
int n3=f.create_input_box("What to do?","","",1,false,false,false);
int n4=f.create_checkbox("Read resoult with SAPI.",true,false);
f.create_input_box("resoult",resoult,"",30,true,false,false);
int n5=f.create_button("calculate,");
int n6=f.create_button("Exit the program!");
while(true)
{
wait(5);
f.monitor();
if(f.is_checked(4)) sr=true;
else sr=false;
if(f.is_pressed(n5))
{
if(n1=="" or n2=="" or n3=="")
{
speak("Error: \r\nError detecting input in one of the first inputs. Please try it again and check if you have entered valid values.");
}
else
{
resoult="The resoult of "+n1+" "+n3+" "+n2+" is: ";
if(n3=="+") resoult+=n1+n2;
else if(n3=="-") resoult+=n1-n2;
else if(n3=="*") resoult+=n1*n2;
else if(n3=="/" or n3==":") resoult+=n1/n2;
else
{
speak("Error: \r\n "+n3+" is not a supported type. Supported types are: \r\nstar, plus, dash and slash or colon.");
}
}
if(f.is_pressed(n6))
{
f.reset();
speak("Thank you for using this program! Have a nice day.");
wait(1000);
exit();
}
}
}
}



2024-06-08 22:43

#45 daszekmdn

@43: Normally? A bgt nvgt or any other file is an ordinary text file. With BGT the extension didn't matter, same with the hsp I use.


Sygnatura to może być w sądzie. Sygnatura sprawy np. :P
2024-06-09 09:45

#46 rudolf

It makes really no sense though. Also nvgt 0.86.0 is out.



2024-06-09 10:49

#47 rudolf

Hi guys. I have done something small to look up ip's location. It uses form, including the not documented audio_form::get_text function so that might help some folks. Thanks for Jonathan for providing the IP location feature itself, but all other code in the main file was made by me.



2024-10-01 21:48

#48 Sir-Charlie

Based. Thanks for sharing


All that I survey, I could easily destroy. From time to time, it is important to remind these small creatures of the true extent of my power.
2024-10-01 21:54

#49 rudolf

Hi, per request of someone I modified the script so you can now also locate domains. To reflect this change, the limit of the input box has been extended from 15 too 128 characters. Further I have added the letters a-z, dashes and dots to the list of allowed characters. I also have added a slight check so you can't locate the same IP two times after each other. locate.nvgt still stays unchanged, so you can take over locate.nvgt from the previous message. The main file, ip locater.nvgt is attached.



2024-10-01 22:06

#50 fire

these scripts are pretty cool
edit, I just tried to run it and I got compolation errors for both


Very bored. visit my site https://spacemangaming.games if you want.
Edited 2024-10-04 16:21

#51 rudolf

If you would share them, I could help to identify the issue.



2024-10-04 19:24

#52 fire

no the attached ones


Very bored. visit my site https://spacemangaming.games if you want.
Edited 2024-10-04 19:24

#53 fire

that you posted


Very bored. visit my site https://spacemangaming.games if you want.
2024-10-04 19:24

#54 rudolf

Yeah. I forgot to add that this has been coded with NVGT newer than 0.88.0. Currently, I'm using a pre-release send by Sam Tupy in the nvgt channel. However I see no changes which should cause that the script doesn't work.



2024-10-04 19:29

#55 rudolf

the errors?
-- (fire):
no the attached ones

--



Edited 2024-10-04 19:29

#56 fire

hang on let me get them and I will send you in pm


Very bored. visit my site https://spacemangaming.games if you want.
2024-10-04 19:30

#57 rudolf

Hi everyone!
I will paste some messages that I send to fire. At the end this does mean that I have found a sulotion for the issue and would like to share it with the rest of you experiencing this issue.
Yeah. The compilation error just basically says that no void main can be found. This happens if you plan to run an include. In bgt, it was an extra error with a sound stating compiler error, void main can't be found. Here's just that compilation errors but the basically mean the same. If you run the other file which is the main file, you should be got too go.
I see. This compilation errors relate to the speak and audio_form::bool set_disallowed_chars which both appear to be non-existent. The first one has been fixed in one of the later nvgt releases (I'll check in a second which one exactly) and the second one just requires an updated version of form. I'll also check it in a moment. The speak error was caused because the audio form include didn't included speech since a quite while, though it was needed so.
Alright. It seems as the audio_form::bool set_disallowed_chars metod has een added since 0.88.0. I believe the other speech error has already been fixed in between 0.86.0 and 0.87.2 but that doesn't matter at the end, as it means that you will need 0.88.0 at least. I'll upload the newer one instead though, which is very close to the not released 0.89.0 and contains some more stuff.
Sorry, it took quite a while as I had to mess around with some permissions on my ubuntu machine, but here yu are.
https://garogaming.xyz/files/archive/programming/nvgt/installers/nvgt_0.88.0_beta.exe



2024-10-04 22:32

#58 rudolf

Hi everyone. NVGT 0.89.1 has been released on October 10th. In attachment you can find another script which I have made and which deserves as music generator for the 2 and 3d building game sketchbook, your world. Void main is just an example of the usage of the function below. I'll, however, also paste the code below and do some comments.
Just a quick note that this also could be set up as form function. If you want to do so, you would need to use the function parse_fload(string="") instead of bgt's stn (string to number) to convert the string into an int. E.g. string 1=audio_form::get_text(input_box_1); int 2=parse_fload(2);
Say you have written 1 in the input box. string 1 (audio_form::get_text(int="") will just put that 1 from the input box into a string. int 2=parse_float(string="") will just convert that 1 fro a string to an int. The 1 remanys the same number, just useable with my function right now.
I have tested the script's abilities even further and it is able to write nearly 100 million characters in 10 seconds.
void musicgen(int music, int volume=0, bool randompitch=false)
{ // inicialising function.
string musicstring;
timer t;
t.restart(); // If you would use this function multiple times, this would ensure the timer doesn't run continuisly.
for(uint i = 0; i < music; i++)
{
/*
I know that this function is very difficult for the one or other. So we'll devide it down.
for( = inicialising the for statement.
uint i = 0; = inicialising an uint called i which is 0. i is being used nearby always, and 0 can be adjusted. It also can be an int instead of an uint.
i < music; = Declares that the actions in the following statement will only be run if uint i is smaller than int music (an int inicialised in void musicgen).
i++ = tells the program to add one to i every time the for loop has been run.
) = ends the commands.
*/
if(randompitch=false)
{
musicstring+="ambience "+i+" "+i+" 0 0 loop_music"+i+1+".ogg "+volume+" 100\r\n";
musicstring+="zone "+i+" "+i+" 0 0 music "+i+1+"\r\n";
}
else
{
musicstring+="ambience "+i+" "+i+" 0 0 loop_music"+i+1+".ogg "+volume+" 1R500\r\n";
musicstring+="zone "+i+" "+i+" 0 0 music "+i+1+"\r\n";
}
// I know that I have written the code not as good as it could be, as the if statement just could add the music ambience to the loop and after else has closed the zone could have been added, that's minor though.
}
// End of for statement block.
int time=t.elapsed; // Gets the current time since timer t is running since and saves it in an int.
clipboard_set_text(musicstring); // Selfexplonaratory
alert("finished within "+time+" ms","Please see clipboard for result."); // Tells the user the final time.
}
void main()
{
string length1=input_box("Enter the amound of songs to generate","","500");
if(length1=="") exit();
int length2=parse_float(length1); // string to int
musicgen(length2,0,true); // generates music with the defined length and volume 0.
exit();
}



2024-10-12 18:06

#59 alchappers

Now that's interesting, if it weren't for the fact I have a butload of other stuff going on, I'd actually experiment with this stuff lol.



2024-10-13 13:46

#60 rudolf

Hi all.
Perhaps it's time to update the last project I have sent in here? Well, let's actually see what I have got here. I have updated several projects:
- MusicGen
If you haven't read the previous post (58), you might be interested in a quick introduction. MusicGen is a music generator for the 2 and 3 dimensional building game Sketchbook, your world. It allows you to customize the amound of musics to generate, the volume, wether the pitch should be generated randomly and wether you would like to have preset mapdata included. Perhaps there are a few tweaks which can be done, such as that it can be used on 3d maps, the x and y coordinates can be adjusted and lastly in which direction such as left, right, up or down it should generate, but over all it's functional!
As you possibely could remember, last time it was just a small function. Now I present you, an actual audio form with a function that has been tested countless times for bugs and has verified itself. Come on, give it a try if you are one of these crazy builders.
Find it attached. musicgen.nvgt
- IP Locator
I can't remember what I have done to that script besides that it's now a single file which can run out of the box. Enjoy the attachment, I supose?

Other than that I have done the works at three or four projects. They are not ready to share yet and if they ever will be is amongst the stars. Well, perhaps it's just a thing of motivation? Well anyways.
Editor:
I'd say although this is the most old one this is the one that works by the most as of now. I just need to fix a really really weird issue with some if statement issues in the changelog file.
This about 12 to 15 kb sized program was inicially there because I was really bored and thought I could write something in form. Well, now we have it right there, an editor which fights itself with some file core functions in nvgt. It has just file opening, creating and deleting itself among some error checking, but no spelling, intending or yet even settings. The UI is made horrible and I want try make you hate it because it's really horrible.
I have thought doing a rewrite where you have an actual file manager similar to flash files but just a bit more focused on editoring with actually useful functions, but who knows what the future holds.
On a serious note, I perhaps might share it just for fun and enjoyment, although you seriously should not try to edit something with it because for some reason it has a very weird bug with multi line files which I haven't brought to the Discord yet.
Story Game:
Sounds maybe a bit odd, does it? Yeah indeed it absolutely does, although the creation history of that thing was somewhat fancy as well. I sat with other german people on teamtalk and we thought creating about a story game. Story game, story game, you get it (ha ha)? To that point NVGT was barely released (I think it was June) and my knowledge let remayn things to wish.
Still I created this git hub repository. And you know what? Besides a 17 kb not uploaded document with several release announcements and progress logs this does literally only contain 4 kb code by me and about 30 kb weird copied includes by others. It can be super burning out if you work alone and at some point get the shit full of something, so I barely managed to work there partly because my knowledge was lagging and/or I had no motivation, and partly because I simply by fact had no time because a lot of class tests during the last months and me being generally very actively in in things such as programming other things (huh?) and a few games.
Long story short, I have been the only one doing something to that project during the last few months. I might return to it at some point but I have been tired from coding a bit.
To conclude this I might would want to give you a hint what the game of this goal was intended to actually be. I will quote from my writings and the readme:
Story game is, obwiously, a storygame. It has been written in nvgt and your goal is it to guide your character though many difficult situations which could occur. With our very realistic systems (That includes, but is not limited to catching fishs, producing food, surviving,, a realistic hunger, energy and sleep system which is in any case not limited or basing on viewable numbers) you can have hours, or even days, of fun. Some kinds of readme or documentation are build in the game, so instead of having a huge document which probably would take ages to search that what you are looking for in, we have a strong and good sorted documentation library ingame which will update automatically when you are at a point where you would need certain knowledge, so don'T worry if you wonder why it may seem empty at the start.
Currently the development goes on rather slow and inactive, with me being the only one patching and adding some things from time to time. The current codebase contains already many includes and functions, but most of them being taken from somewhere else, that is, the nvgt discord server. Though I can announce proudly that we already have a coded updater system, it just needs to be set up regarding web server, which I plan to use nginx or caddy with a caddy reverse proxi at the end for, and finally some long standing compiling errors need to be dealed with. But over all I expect the updater class to work once it has been fixed. Then there is the thing that we want to add many real time updating statistics, including that you will need sleep, to eat, to drink and some more stuff. Adding a cream top to the cake we want this to be very special. We want to force the player to learn how to survive, this means the character will has to hount, go fishing and at the end eventually also simple cooking or grilling abilities. Not only that, we plan to add a help library you can access and which contains helpful topics about the game, but we have this idea where it updates while the game so you just see something when you actually need it. This sounds really promesing to say the least, but as all three of us have a real life with school and other tasks this might go on rather slowly, as above already told. Besides the fact we haven't even set up a map system we can work and base on. Then there is that thing with the sounds - we have found some music we can use for the menu and a sound for the menu, but that are just two of them, and hounting for sounds we would be allowed to use, lizensing them, and checking out their lizense, then finally crediting them is a tiring work to say the least. Finally, another fact which let's the development of our story game pass on rather slowly is that some features we need or want to see documented are by no just not that. And finally coming to the end of reasons why development takes so slow, of the 3 contributors, including me, on this project am I the only one being able to code right now, the other has forgot this project likely entirely and hasn't learned how to code, hount for sounds and how to use git yet, and the third person wants to learn nvgt, but I never got a status update about this.
Well, I guess that was enough for this part. Let's hop to the next one.
Chat Client:
So this was actually a project I started pretty late (a few weeks ago). At this point our state in Germany had holidays so I have enough time to mess up my shedule and code at this chat client. This was my largest project as of now (about 20 kb project code and documents for client and server).
Chat Client was intended to just be a network test, but already at the start I have planned to expand to the possibility to create maybe own rooms and definitely own items. I have been told that this is an overkill of ideas and I will get burned out this way. Now I wish I would have listened to that advice although I haven't even a working client.
So what is going in with chat client? The server works, the client works, I have lots of codebase and have had motivation for it.
Unfortunately, I became burned out and frustrated at nvgt's barely documented network systems pretty quickly. My back mind kept distracting myself by coding more settings, but at some point did I had enough and couldn't program any more because there was literally nothin I could do. I also wanted to code the server in sql, but neither was that documented or easier in the slightest.
I also extremely burned myself out by writing a chat dialog in form with panels for buffering. Sadly this was super headiching, but when I next day woke up and got it to work with some help from some cool people it sadly broke in another way. The form panels, or rather subforms, wouldn't hide. I found no way to fix this yet.
So I guess that we are up to date on that now. Let's move on.
Burger Empire
Burgers? Where? Joke aside. Burger empire goals to be an idling game as close as possible but better to the German Alexa skill. I have grabbed the chatclient source, tossed most code of it out of the way and now we have a working UI. You can setup your stuff already. What prevents me from continuing here is that I need to find sounds which easely could be done but what appears super annoying for me for some reason. At some days I browsed trhough sounds, and it is not like that that I don't have to less, but for some reason I just can't get motivated to really actually search for it rather than just randomly going to the wrong shit. I would say burger empire's code is probably about 10 to 15 KB.
Another thing which prevents me though...
Audio form sounds:
Since yesterday or the day before yesterday I really wanted to create functions so people can easely have their form have sounds. Problem here is that I haven't got to checking out the callback so thus the code here is 0 bytes.
Config manager:
I also got asked wether I can write a configuration manager for a soundpack I am using as well. Of course I wanted to, but the variable declaration looks "#var """. While I started the works at this the biggest thing is that ini prevents me using the # sign in my code. So I must first of all get it generally working (I have managed it half as one could say. The code itself does work, but for some reason it can't load the configuration when it already exists) and then write a parser, which is the more annoying thing, which puts at every line start a # sign and removes the equal signs and does a bit more stuff so the soundpack client actually can use it.
I didn't got to it either, I guess what frustrated me here pretty quickly is the ini error. Then during the last days I just had to many stuff to do such as being busy with something important in a game, deliting my account in another, being sick, writing a German class test and having to learn for a math one at Monday and French at the day after that.
Codebase is here just 3 kb.

So what appears to be the issue is my frustration and power level. In real life I am quite a mix from being absoulutely lazy in sport and having to much energy because which I need hhold something in my hands such as an USB stick when I am working at home. I think the real problem is here though, and which makes me sad, that I have super less coding energy. There are people who don't even get frustrated writing 80 kb form within a few days (x0, I am pointing at you haha) but either that comes with age or it's not my thing whih again, would be super sad because I feel myself wanting to code. But I sadly barely understand anyting aside bgt and nvgt. Of course I have some basic knowledge in some areas, and I can do html as well, but still I don't appear to be a natural talent.
But the same thing goes for my writing knowledge (I really really wanted to write really long announcements when I saw some great of them). At the begin it was super bad, though now I have been able to write countless much stuff in much different areas. Although I'm really lagging some dayly important words and can't even spell the days of the week properly I am a bit of proud on my English knowledge. So possibely this can be trained such a language can be over years.
At some point do I think that I should value the things I have done more. I am 13, have learned all my current English knowledge without any real professional teachers unless a few gramatical things in school during one year and a half, I am able to understand and program a programming language, have way to much projects, coded 50 kb or even a bit more working code within a few days, have A grades in school, am smart (at least for my age, I can't compare the knowledge of mine to other nerds of the blindy community)... Ok I am done with bragging. But yes on the one hand should I value such but on the other hand has that been always the norm for me. Still do I want somehow... More?

Well I am sorry, the last part got somewhat etical? But I guess that was it. If you have read it that way, thank you! You can find all stuff I promised below!



2024-11-22 21:16