2019-02-25 19:38:40

Should i write all the code in the save file? Could someone give me an example of save file i would want to create? Best regards: Marco

Best regards: Marco

2019-02-25 20:40:33

cmerry wrote:

God dam it people. You can't just ask questions like that, if you'd spent more than 5 cminutes reading the bgt docs you'd know that there isn't just a standerd way of doing shit like that. You could ask for tips or for someone's code that they've already written, but if there was just *a* way of doing stuff like that we wouldn't even have programming languages.

Well, can someone give me an example of how to save the game, please?

Best regards: Marco

2019-02-25 21:08:10

Personally I have a class I always use for sutch things, but i'm pretty sure it isn't open source.

2019-02-25 21:16:33

I mean you could have, for example, wen you click save game, it calls save();
Then void save() and f.open and f.write all the stats separately, but ehh. Be more specific

----------
“Yes, sir. I am attempting to fill a silent moment with non-relevant conversation.”
“You don’t tell me how to behave; you’re not my mother!”
“Could you please continue the petty bickering? I find it most intriguing.” – Data (Star Trek: The Next Generation)

2019-02-26 17:50:00

Is there an operator which can redirect: x.y=2;
To end up as: x[y]=2
If so, you could probably make a dictionary. Then, all you gotta do to save and load is serialize it.

You might also be able to do something like this

dictionary data;
int counter=0;
class int_overloaded
{
key="";
int num=0;
int_overloaded()
{
counter++;
this.key="int"+counter+"";
data.set(key, this.num);
}
int opAssign(int val)
{
this.val=val;

}
//Redirect all the operators to access this.num, then, every time the value is changed, update the dictionary.


}


This might work, if someone or me wants to build it tongue

2019-02-27 01:25:34 (edited by JLove 2019-02-27 01:31:13)

One observation here.  Cmerry, the vehemence with which you've posted your displeasure baffles me.  Aside from the fact that the amount of your displeasure strikes me as overkill for this situation, your post didn't help anything or anyone.  Posts like this don't do anything but serve to inflame a situation or cause tension where there doesn't need to be any.  I've often wondered why this community leans toward being so discouraging at times.  Instead of ranting on the OP for his question, I submit that it would be more productive to either actually help him, or just not say anything and let someone else who is willing to actually help him do so.  And for the record, I have read the BGT manual.  I've coded in BGT as well.  I'm in the middle of a project, actually, and I myself have questions about this very thing.  I just haven't asked because I'm not at that stage yet.  Does it make me stupid since I'm not sure of the best way to handle or implement save and load states?  Are you going to raise hell at me and take the Lord's name in vain when I get to that point and ask the question?  Just because I don't understand something, or I'm not sure of how to, or the best method for, implementing something does not make me an idiot.  Same applies to the original poster.  Hell, same applies to you and every other programmer in the world.  No programmer understands every facet of any programming language.  Just food for thought.

2019-02-27 02:21:14

Because this isn’t the first time he’s posted topics like these, basically wanting people to write his code for him. He’s not the only one, mind you.

2019-02-28 14:14:41

Hi,

First of all, +1 to jlove for this post.

Second, @marco,

You can use the dictionary function and serialise it as @6 suggested. The only thing you have to do when loading your data, is deserialise it, in fact, reverse the save script, to put it that way smile

Greetz mike

Visit the following website to see what games we have:
http://www.nonvisiongames.com
Or the following English marketplace to see what retrogames and game merchandise I am selling:
https://www.retro-kingdom.com

2019-03-03 14:13:37 (edited by marko 2019-03-03 14:19:08)

JLove wrote:

One observation here.  Cmerry, the vehemence with which you've posted your displeasure baffles me.  Aside from the fact that the amount of your displeasure strikes me as overkill for this situation, your post didn't help anything or anyone.  Posts like this don't do anything but serve to inflame a situation or cause tension where there doesn't need to be any.  I've often wondered why this community leans toward being so discouraging at times.  Instead of ranting on the OP for his question, I submit that it would be more productive to either actually help him, or just not say anything and let someone else who is willing to actually help him do so.  And for the record, I have read the BGT manual.  I've coded in BGT as well.  I'm in the middle of a project, actually, and I myself have questions about this very thing.  I just haven't asked because I'm not at that stage yet.  Does it make me stupid since I'm not sure of the best way to handle or implement save and load states?  Are you going to raise hell at me and take the Lord's name in vain when I get to that point and ask the question?  Just because I don't understand something, or I'm not sure of how to, or the best method for, implementing something does not make me an idiot.  Same applies to the original poster.  Hell, same applies to you and every other programmer in the world.  No programmer understands every facet of any programming language.  Just food for thought.

Yup, i agree. People who say things like this( for example Kmerry) should be quiet. But, this is not the only forum. I've seen many things like this, when someone "stupid"( note the quotes) asks something that he/she doesn't know.
I am not hurt, but i say just one more thing: If i was speaking with you for example in my room, would you say things like you said in post 2? The answer is probably no.
Best regards: Marco
And oh, thanks for help.

Best regards: Marco

2019-03-13 09:39:21

and he deleted it.

2019-03-13 12:28:33

hi
read reza's fps map