Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Alberth

#21
QuoteThe only serious way to secure the data is when game creators modify the engine with their individual encryption, and then hide the modified source code.
And even that is dubious. At the end of the day, a foreign computer has to be able to use the program and its resources, which means that at some point after delivering all data to the foreign computer, it must have all assets to decode and use what it needs.
Finding the spot may be a little tricky, but it's mostly a matter of finding the spot just after decoding, stop the program at that point (ie a standard debugger at machine instruction level can do that), and write an amount of data from memory to disk.

In other words, if you want your data to be really safe, either don't give the data away (eg an online web service where you can play but not download), or give the data without a way to decrypt it (but that is of course totally useless for using the data).
#22
Quote from: Crimson Wizard on Tue 13/01/2015 10:14:54Word "tired" can not describe this, I think "fed up" suits this best.
Stop now is the only advice I can give you.
While it may feel wrong to give up, continuing isn't going to make it better.

Stop now, and do something else. Make a game (and just ignore all issues you encounter in AGS while doing that!), read a book, do nothing, write new shiny code in an unrelated project, whatever makes you happy again. Nobody in the community is going to be happy when you get fed up so much that you walk out (Including yourself is my guess after reading the responses, relieved yes perhaps, happy no.)

Once you cooled down enough to make sane decisions again, decide what you want to do, and if and how AGS fits in that. As you found out, the world has more problems and feature requests than you can manage. Heck, it has more than all developers in the world together can manage. There is no shame in choosing, it's essential to keep your sanity and happiness.

I survive by having 3 or 4 projects at most, and not playing a main role in all but one (anyone here for taking over FreeRCT? :D ) and jumping between them, but it's a personal thing. You will make a different choice, one that works for you.

Quoteand I have no free time now; while everyone around do that. So I grow even more jealous over time.
You're a slave to yourself only.

Nobody has free time, they make it by not doing some things. I have time to write this reply because I don't enter or solve issues for a game script, I don't code the new worldgen window in OpenTTD, I don't code queuing in FreeRCT, I don't make tea, and several other things I can/should do. Other people making eg a game can only do that by not doing other things. You don't have free time, you make it.

Do I feel bad about not doing those things? yes.
At the same time I also feel happy being able to write this message, hoping it's of use to you. At the end it feels like a good choice, even if it is not a very productive one in terms of code or tea. This what it is all about, in my opinion.

Make choices based on what you want, rather than what others want, or what you think others want. Until they pay you, they don't own your free time. (I know it's way easier to say than to do, but you are really in control here. Nobody will come to your house and beat you up because you skipped a day or a week working on ASG, it's safe to do that, really.)

QuoteI know this may look like childish emotions
I think it's brave that you express it here in public. No need to feel embarrassed.

QuoteI can hardly help myself
Here you are wrong, you can make a different decision. I bet you hesitated before opening the new post window, typing the message, and pressing Post. Yet you decided to do it.
In the same way, you can hesitate yet decide not to code AGS for one evening. If that is too long, decide to stop coding an hour earlier than usual. That's how you help yourself. Stop doing bad things by deciding you don't do them. It's as easy and difficult as that.

(And here I am, hesitating whether I want the world to know I wrote this quite personal message...
Yet hoping you can use at least some of it, I decide to go ahead, type this line, and press Post.)
#23
I am lost for words....

My condolences to you and your family.
#24
Can you explain why you are so much against keyboard input?
Why do you force your users into using a mouse, even if they may be more comfortable using a keyboard?

Wouldn't allowing both input media work? If you want to emphasize use of a mouse, that's possible, just explain to the users how they can use the program with a mouse.
Being able to use a mouse doesn't necessary imply removal of keyboard, just don't use it would work already.

The reason I ask is because your solution seems quite extreme to me. I found that in such a case, it often pays to have another look at the higher level objective.
Unless you have a plain hard concrete requirement: "The program shall not accept any keyboard input.", there are often lots of ways to achieve a goal.

Instead of going in the trenches, and fighting the system very hard to achieve your solution, stop for a moment, take a step back (go for a walk, do the dishes, have a long relaxed shower, whatever works for you to stop thinking about details of your keyboard problem), and look again at your higher level goal, a birds-eye view, and check whether there are other ways to achieve what you desire.


If you have to fight a system to achieve a goal, that usually means that either you picked the wrong system, or you're going about it in the wrong way. There are good reasons why a system behaves as it does even if it doesn't look that way. People have carefully considered things, and decided to implement it as you find it. Those people are just as sane as you and I are, which means they picked the best solution they could find. If you want a different solution, you're moving away from that best solution. In other words, in some aspects, your desired goal is sub-optimal in the view of the system designers. The interesting question to ask is thus, in what way are your goals different from the general AGS goals?
Do you have additional goals? Are some of the system goals not applicable for your case, or are they even contradictory?

#25
A little late, but you can write this much shorter. The key is to realize "bool" values are data, just like "int" numbers.
I'll make very small steps, so I have a lot of code fragments. For brevity, I'll squash the curly bracket stuff as much as possible onto single lines. If you are used to writing the curly brackets at other places, feel free to split things onto separate lines again.

Before looking at your code, let's look at a simpler piece of code. The problem is very simple. I have an integer variable "x", with the value 1 or 2. I want to assign a value to integer variable "y", where "y" should get the value 1 when "x" is 1, and "y" should get the value 2 when "x" is 2. In code:
Code: ags
int x = ...; // x is either 1 or 2.

int y; // y should become 1 if x == 1, and 2 if x == 2.
if (x == 1) {
    y = 1;
} else { // x is not 1, thus x == 2 here.
    y = 2;
}
Works, right?

Now when you look closely at what is actually happening, At the "y = 1" line, we assign "1" to "y" when "x" is also "1". At the line "y = 2", we assign "2" to "y" when "x" is also "2". In other words, the following code also works:
Code: ags
int x = ...; // x is either 1 or 2.

int y; // y should become 1 if x == 1, and 2 if x == 2.
if (x == 1) {
    y = x; // y must become 1, and x is 1 here.
} else {
    y = x; // y must become 2, and x is 2 here.
}


Now if you look at the overall picture, what happens here is that "y = x;" is being executed in both branches. In other words, the same statement "y = x;" is performed no matter what the outcome of "x == 1" is. Thus it is equivalent to:
Code: ags
int x = ...; // x is either 1 or 2.

int y; // y should become 1 if x == 1, and 2 if x == 2.
if (x == 1) {
} else {
}
y = x;
The entire "if" is empty now, and can be removed. The solution to my problem is thus a simple
Code: ags
int x = ...; // x becomes either 1 or 2.

int y; // y should become 1 if x == 1, and 2 if x == 2.
y = x;
Now that's a lot shorter eh?


Back to your problem.
Code: ags
if (player.HasInventory(iBurnie)) {
    object[2].Visible = false;
    object[3].Visible = true;
} else {
    object[2].Visible = true;
    object[3].Visible = false;
}

Let's add a new variable "b" to store the boolean condition, and make the "if" code a little more clear:
Code: ags
bool b = player.HasInventory(iBurnie);
if (b) {
    object[2].Visible = false;
    object[3].Visible = true;
} else {
    object[2].Visible = true;
    object[3].Visible = false;
}
Boolean "b" can have two values, "true" and "false". When "b" is "true", you execute the two lines directly under the "if" line, and when "b" is "false", you execute the two lines directly under the "else" line.

Now I can pull the same trick I just did in the integer example:
Code: ags
bool b = player.HasInventory(iBurnie);
if (b) {
    object[2].Visible = false;
    object[3].Visible = b; // "object[3].Visible" must become "true" here, and "b" is "true".
} else {
    object[2].Visible = true;
    object[3].Visible = b; // "object[3].Visible" must become "false" here, and "b" is "false".
}


Since in both branches, you perform the same "object[3].Visible = b;" statement, it can be moved out of the "if":
Code: ags
bool b = player.HasInventory(iBurnie);
if (b) {
    object[2].Visible = false;
} else {
    object[2].Visible = true;
}
object[3].Visible = b;


Now the "object[2].Visible" assignment. It looks a lot like the "object[3].Visible" assignment above, except the values are reversed, you assign "false" when b" is "true" and vice versa. So how to do this?

Luckily, AGS provide a 'reverse' function with the weird name "!" (exclamation mark), that reverses the value of a boolean. When "b" is "true", "!b" is "false". When "b" is "false", "!b" is "true". The code can be rewritten to:
Code: ags
bool b = player.HasInventory(iBurnie);
if (b) {
    object[2].Visible = !b; // "object[2].Visible" must become "false" here, "b" is "true" thus "!b" is "false".
} else {
    object[2].Visible = !b; // "object[2].Visible" must become "true" here, "b" is "false" thus "!b" is "true".
}
object[3].Visible = b;


And again, both branches perform the same statement, the "if (b)" test makes no difference any more. The assignment can be moved below the "if":
Code: ags
bool b = player.HasInventory(iBurnie);
if (b) {
} else {
}
object[2].Visible = !b;
object[3].Visible =  b; // Added an extra space before the "b" to get nice vertical alignment.


The "if" statement is again empty and can be removed, resulting in:
Code: ags
bool b = player.HasInventory(iBurnie);
object[2].Visible = !b;
object[3].Visible =  b;


Depending on your taste, you can keep it like this, or remove the "b" variable:
Code: ags
object[2].Visible = !player.HasInventory(iBurnie);
object[3].Visible =  player.HasInventory(iBurnie);


While it saves a line, the "player.HasInventory(iBurnie)" text has been copied here. If that expression is long, it is preferred to keep the "bool b = ...;" assignment, as it makes more clear what value gets assigned to "object[2].Visible" and "object[3].Visible".
#26
I am a total noob in adventures, but intuitively, I'd use left-click (select = look) and double left-click (action = use).
It's not even mentioned here, am I missing something?
#27
Quote from: Darth Mandarb on Mon 15/12/2014 19:08:50I do see what you're saying as well, though I wouldn't want to constantly have to 'mark all as unread'.
Don't you have the problem of deciding what old threads to skip at the bottom then? (No new posts in them since your last visit, but still "new" as you didn't mark them as read the last time.)
#28
Quote from: Cassiebsg on Mon 15/12/2014 18:58:57
Quote from: Alberth on Mon 15/12/2014 18:21:20
@Cassiebsg: I tried "unread posts" for a while, but found it too complicated as you don't have thread context any more.

What do you mean by "don't have thread context"?
:O  That link may be useful, thanks :)
I thought you meant the link at the bottom "View the most recent posts on the forum." in the Forum stats. The latter has the problem I described, as it really only shows the new posts.
#29
@Cassiebsg: I tried "unread posts" for a while, but found it too complicated as you don't have thread context any more.
Back button does work, but "read" status isn't updated iirc. Not a big problem though, you usually remember what you just read :)

Quote from: Darth Mandarb on Mon 15/12/2014 17:59:10The good news is; you're not missing anything!
Bummer, I had hoped there was something I missed :(

Quote from: Darth Mandarb on Mon 15/12/2014 17:59:10The bad news?  This is how it's designed to work!
I was somewhat afraid of that. Well, at least I can now stop trying to find a solution, as there is none, apparently.


Quote from: Darth Mandarb on Mon 15/12/2014 17:59:10There are hundreds of pages of threads (20 per page) in the General Discussion board and it's highly doubtful a person has viewed EVERY single one of them!  So if it worked how you were thinking it did, the blue cup would certainly always indicate 'new' activity in each board.
I have, as in, the very first time I visited, I clicked "marked everything as read" (at the top-level, covering all boards thus). As a result, unless someone actually posted something new, I should not have any activity.
#30
Ever since I started reading this forum, I have a silly problem with the "unread" notifications. Let me explain what I mean.

At the top-level "Adventure Game Studio | Forums" page, there are blue cups at the left of sub-forums that have unread news for me. For example, in "Adventure Game Studio | Forums » Community » General Discussion" has a blue cup next to it, and upon opening it, there are 3 threads marked with a "new" icon at the moment. I can select one, and read the new posts, no problem.

However, after reading the new posts in one thread, I get out by clicking at "Adventure Game Studio | Forums" or "Adventure Game Studio | Forums » Community", as it works that way at other boards.
At this point the blue cup next to the "General Discussion" forum is gone! No indication at all that there are still 2 threads with unread news. If I ignore that, and open the forum anyway, the two remaining threads marked as "new" are still there as expected. Is there any way to make the blue cup stay until I have seen all new posts?
The disappearing blue cup makes it very difficult to make sure I have seen all news.

I have tried a few things (reading newest post first or reading latest post first, for example), but none of it fixes this problem. The problem seems to be too simple to exist, I am probably missing something trivial, but I cannot figure out what :(

Am I the only one with this problem?, how do you handle this?
#31
Quote from: Snarky on Wed 03/12/2014 18:01:02
Well, the current AGS scripting help is sorted alphabetically (by class), and looks like it wouldn't be out of place in source comments, IMO. (But on that last point it's really the developers' opinions that count.) I assume it would go in either the .cpp or .h files
In my experience with C++, near the actual implementation works best, as that gets changed when you change semantics of the call. It also helps in keeping the .h file less cluttered so it is easy to read.

QuoteAs you can see, there is no documentation in the source code currently, so there wouldn't be any conflict.
I browsed through the code for half an hour to see if I could understand what belonged together but didn't get very far.

As for lack of comments, yeah, I noted. It's the same with almost every open source project. It's unfortunate that people (no offense intended to anyone, it's just an observation) don't take 1/2 a minute to write a few lines about the call interface (in terms that are easy to understand if you don't know the function) when they have it fresh in memory, so everybody now and in the future can read it in 10 seconds and have all relevant details on the first try, instead of having to reverse-engineer the interface in 30+ 1/2 minutes with the additional risks of missing some crucial implicit note or assumption which will surface as a bug 6 months later, which takes an amount of time that is not really usefully  countable in 1/2 minutes.

I started systematically documenting every function/method I wrote since about 8 years ago, and I found it increased my productivity. It takes a lot less mental effort to read 4 lines explaining how to call some function I wrote 3 years ago than it takes to reverse engineer that function without messing up. It makes the difference between "just call that function and get on with the problem you're working on" versus "oh my god, what did I do here again? There was something special here, I need more coffee.". I can also handle larger code bases with less effort now.

Besides the .rst patch, I haven't done anything in the AGS project yet. (Trying to read the manual failed already :p ) I do like the application domain, but I already write compilers/execution engines as day job. AGS doesn't run natively at my linux system, which makes it very hard to do anything useful. If I decide to do more code-oriented things, documentation will be high on my list in this project. My standard tactic in such a case is to start throwing documentation patches at the project (I don't want to reverse engineer anything more than once). However, if such patches are refused or existing devs see no reason to stop adding undocumented code or don't update existing documentation, I'll stop fairly quickly as well. No offense, but there is no point in me doing such work if new work gets created as we speak, so to say.

QuoteIt's not correct that AGS currently has "one manual for all versions." Rather, it has a different version of the manual for each different version of AGS (distributed with the build), but only the latest version (at least in theory) is online.
Oh sorry, didn't know that. I normally never use builds, I tend to compile everything from source, as sooner or later I want to fix something annoying :)

Quoteby putting reStructuredText comments throughout the code, we're more tied to Sphinx; it would be a little bit harder to switch to a different HAT in the future.
Less than you're now tied to tex2rtf & friends. Unlike the current tex source, there is a free RST parser framework available in Python (docutils project iirc) that you can use if you want to. Writing a simple line-based text conversion script like I did, and pushing all the source code in a somewhat uniform format took a few days. As long as you stick to mostly plain text, it can be converted relatively easily.
#32
Glad to see new interest in my documentation patch :)

@Snarky:
It really depends what you want to achieve. Automagic merging of code documentation saves perhaps some typing. You also never miss any documentation.

On the other hand, controlling the order of content may be harder (alphabetical order is easy, keeping things topic-wise or release-wise together is more complicated). You also get the problem of versioning. Imagine a function f, that was added in 1.2, changed in 1.5, changed again in 2.4, and removed in 2.7. How would you handle this with code for say version 2.8? Python.org solves this by making a manual for each version separately, AGS currently has one manual for all versions.

If you keep all text together in some directory, it's relatively easy to find things. If you scatter documentation throughout the code, it becomes harder to find some piece of text, and a documentation change may cause conflicts in code changes and vice versa.

Last but not least there is also the matter of audience. Code documentation is usually not oriented at an end-user. It's brief, full of technical terms, just enough to know how to call the code from another method. An end-user typically needs a few pages explaining which functions exist, how function work together to achieve something in a game, and an example or two with explanation what it does.

@abstauber:
Thanks for trying. I don't have Windows, so I cannot build nor use the Windows help files.
#33
1st - selmiak
2nd - AprilSkies
3rd - aikex222
#34
Chapter 1, Goodbye Earth

"7"


"6"


A bright flash of light as the engines come to life, this is it, we're really going!!


"5"


"4"


The roar of the mighty engines is deafening now, thinking is impossible.
People around clamp their seats, everything is shaking....


"3"


"2"


"1"


"GO!"

The vibration of clamps releasing us can be felt through the ship. I am pushed
into my seat. Asif in slow motion, we slowly start moving, heading for space,
the only way out of this mess. Hopefully the disease didn't jump on board.
There are so many people here. A sign next to the door says "Crew: 5,
Passengers: 37". 60 seems a much better estimate. Everybody looks tired and
dirty. Men, women, even the children have fear on their face.

---------------

As the engines become monotonous background noise, people seem to be relaxing
a bit, most just lie there, with their eyes closed, starting to realize they
have left Earth. I feel tired too, finally a place where it's relatively safe
to close your eyes. Must rest now...

---------------

Later that evening, the captain displays Earth at the video screen, it looks
so small, in a dark void of nothing. It's night at 'our' side too, you can see
the shape of the continent by the lights from the streets and houses. I never
knew it would be so clear.

---------------

The next days, people settle within the limited space they have. Food and
water is rationed, but at least it's warm, the food is cooked, and the water
is fresh and clean. A daily routine is being established. People exchange
their life stories, and I tell them mine. Born in a little town, parents
divorced, university. Always been interested in space and beyond. When the
disease broke out, and it became clear it was totally out of control with the
military throwing nukes, I knew I had to get off earth. Preparing the car,
barricading the windows, and nothing happening while getting to the launcher.
The chaos with all the other people wanting to go too, the horror of people
getting run over. The mass hysteria when the security guards opened fire to
defend the launch site. And here I am.

---------------

I have a hard time sleeping, watching Earth getting smaller at the video. It's
also getting darker, most lights are out at night now. Probably Earth has been
run over entirely, or its surface is now deadly by itself due to the
radiation.


---------------


I don't know how long ago we have left Earth. It seems like weeks, but it can
easily be months. So far, the disease has not shown itself on the ship, so we
may have truly escaped from it. On the other hand, it's hard to live in such a
small area with so many people. No privacy at all. An attempt to steal my bags
has happened twice already, on one occasion I managed to prevent it, on the
other occasion, I lost one bag, but luckily it contained only some money and
cloths. I have hidden the photographs of my parents on my skin now, so I won't
loose them.

---------------

Apparently we are too far away from Earth to see it any more. We haven't heard
any radio message from Earth either since a long time. There is clearly no
hope to go back. Today, Mars, our destination, has told us we are not welcome,
landing will not be allowed. It caused lots of heated discussions around the
ship, some want to go there anyway, and just land. Others suggest to land
outside the NewMars city, and go there by foot, a clearly useless suggestion,
as there are no 86 space suits in the ship. We could also go to Jupiter, which
has a small settlement, and which needs new blood to make the colony
sustainable.

We await the captains decision.
#35
Engine Development / Re: AGS engine Linux port
Wed 05/11/2014 18:03:28
Quote from: BigMc on Tue 04/11/2014 23:13:04
This is the most stupid thing I've ever seen to encode these Ids like that...

They are for ALSA: 1095521089
and OSSD: 1330860868
The only stupid thing is to encode it as a decimal number. As a sequence of ASCII character bytes, it makes perfect sense:
Code: python
>>> hex(1330860868)
'0x4f535344'
>>> chr(0x4f) + chr(0x53) + chr(0x53) + chr(44)
'OSS,'
>>> hex( 1095521089)
'0x414c5341'
>>> chr(0x41) + chr(0x4c) + chr(0x53) + chr(0x41)
'ALSA'
#36
Thanks Aprilskies for hosting, and congratulations to both Cat and Tabata, it was great fun.
#37
my vote for the first place is TABATA, for the useful inventory item, second place for CAT, for the nice looking glove (I have to peek how to make it that nice).
#38
Unix shells have a long list of awkward characters. You may want to do proper escaping of them. (Not using a command-line for executing the operation would be the preferred solution, but I guess that's blocked by the belief that a language should be cross-platform portable?)

As for your other problem, "Process.Start" only seems to say things about starting the process. It does not say anything about finishing the operation before it returns from the call (http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start%28v=vs.110%29.aspx at least). Maybe it forks the command as asynchronous operation to be executed in parallel?
#39
You seem to build a single string of the arguments without doing shell escaping at all.

Wouldn't
Code: ags
destFileName = "bla q\"bla";
sourceFileName = "'stu\\uf";


fail horribly? At the very least you no longer have 2 filename arguments in text like
Code: ags
/c mklink /h bla q"bla 'stu\uf
(this has 3 space-separated arguments).
#40
Such fun! ;-D

My alien is quite lo-tech, no blipping computer-thingies found yet :~(
Maybe she'll run into other adventurers to swap things.

First item is a multi-purpose stake-out / observation / communication KIT with unobtrusive newspaper.
Second item is an alien-expose KIT in case she runs into human earthlings, so she is properly recognized as alien.

I would appreciate feedback on my items.
SMF spam blocked by CleanTalk