Jump to content

MessageBox, what am I doing wrong?


Recommended Posts

I get the impression that Forli is mainly driving home the need to think things through and do appropriate testing, please correct me if I am wrong.

 

Let us consider Let vs Set with the following code and results...

 

 

 

Let...

scn actiTestAverageLetScript

int iAction
float fTest
float fSum

begin onActivate
	if isActionRef playerRef && iAction == 0
		let fSum := 0
		let iAction := 1
	endif
end

begin gameMode
	if iAction > 0
		if iAction < 11
			let iAction += 1
			call FnTestLetTime
			let fTest := getSecondsPassed
			let fSum += fTest
			printC "%0.5f", fTest
		else
			let iAction := 0
			let fTest := fSum * 0.1
			printC "Average Let: %0.5f", fTest
			message "Finished Let Test"
		endif
	endif
end
scn FnTestLetTime

int i

begin function {}
	let i := 0
	while i < 1000000
		let i += 1
	loop
end

Set...

scn actiTestAverageSetScript

int iAction
float fTest
float fSum

begin onActivate
	if isActionRef playerRef && iAction == 0
		set fSum to 0
		set iAction to 1
	endif
end

begin gameMode
	if iAction > 0
		if iAction < 11
			set iAction to iAction + 1
			call FnTestLetTime
			set fTest to getSecondsPassed
			set fSum to fSum + fTest
			printC "%0.5f", fTest
		else
			set iAction to 0
			set fTest to fSum * 0.1
			printC "Average Set: %0.5f", fTest
			message "Finished Set Test"
		endif
	endif
end
scn FnTestSetTime

int i

begin function {}
	set i to 0
	while i < 1000000
		set i to i + 1
	loop
end

Let vs Set...

1795940-1471600422.jpg

Set vs Let

1795940-1471600478.jpg

 

8 tests in all, 4 from load starting with Let, 4 from load starting with Set.

 

 

 

We can see a discrepancy on the first call, after activation, to GetSecondsPassed.
Iterations, averages and runs reveal Let and Set of equality in applied performance.
Along with the examples that Forli kindly provided I think it is a fairly good example of native vs interpreted code performance which is where I am heading...

We have come from addressing entry level CS to C++ optimization and I have to ask...
What of the novice coming here in search of answers, what knowledge do we 'Expect' of them?

What legacy in times to come?

There are some very obvious places in my mods where I have chosen solutions that are less than optimised due to priority...

  • Why would I sacrifice run-time stability and/or code management to save 1 seconds processing per hour of game play?
  • Why make a custom script for a one off call that may save 1 millisecond on a rig that's outdated even for this game?
  • Why cram everything into 1 script instead of a few functions for a hit or miss saving of nanoseconds?

...and so on but the answers are simply whichever is optimal and/or best in regard to it's location and/or dependencies.

 

Scoping and stability are, more often that not, on equal footing to optimization.

Do not misunderstand me.
The time and support as given here by people such as Contrathetix, Lubronbrons and Forli, to name a few, is of outstanding credence of their willingness to share their time and skills for our benefit.
I am simply indicating a need for contingencies such as "hands on" tutorials to complement their good work - something that I can try to give back as a thank you.

Entry level tutorials with...

  • Brief descriptions.
  • Short exercises with Known Steps for Known Outcomes.
  • Relevant, working examples.
  • Images cropped and sized for readability.
  • Videos if needed.

...I am not talking about replacing what exists but rather bridging the gap to fill whatever holes.

Starting with a MessageBox tutorial I have asked for feedback in several places but there has been no critical review at this stage.
The answer I most get for this sort of request is "when I get time" and most forget.
Over 90% of people who have told me "when I get time" have not found it for 3-18 months or more.
It is a little frustrating in cases where I have responded to their request within a day or so.

While I know my tutorial has already provided help it is simply not good enough.
I only included around 25% of the exercises I drafted due to...

  • Certain exercises would be better presented in other tutorials.
  • A need for precise, accurate and progressive impartation.
  • A need for feedback, to correct any of my misconceptions.

...imagine whatever number of such tutorials, optimized for learning based on a cross section of feedback, the novice through to the expert.
Imagine them translated to a number of spoken languages.

 

Again, I am not talking about hand holding or my skills as a teacher but helping to 'boot' whoever up through joint effort.

 

Currently the MessageBox tutorial should take an experienced CS programmer no more than 20-30 minutes to review and criticize.
I'm sure many, as well as myself, would be most grateful.

Link to comment
Share on other sites

Glow ... your explanation ... :O

and you mentioned my name ... Thank you

you touching me.

 

I am afraid this long explanation is like lecture to certain someone rather than constructive criticism

let's hope ... thread op take this as positive feedback

I've downloaded latest Luggage mod again to check out

it seems this mod either abandoned or pending

because the MessageBox script still not applied

Link to comment
Share on other sites

Put simply, I did not want to leave anything open to misinterpretation.

I meant what I said, Contrathetix, Forli and yourself put a lot of time into helping people here.

There are a number of people, like myself, who do not learn through conventional methods.
I am simply offering to help bridge that gap.

Forli, in personal messages, let alone here, has taken time to help me over several hurdles.
It is the least I can do to say thank you.

Maybe the best thing would be if I just get on with those tutorials and worry about feedback if and when it comes.

Personally, I'd love to do character animations but I have not found a tutorial I could get through.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...