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 - Calin Leafshade

#401
Quote from: tzachs on Thu 27/06/2013 08:50:56
What? Care to explain that?

foreach loops create extra work for the garbage collector because they create extra references. This can be especially problematic in game programming because it can potentially create several thousand new references every second (a particle system perhaps). Also the .NET GC is non-deterministic so you can never be sure exactly when the GC will do its work which can create random usage spikes which can severely fuck with your frame rate, especially in embedded systems like the Xbox360 or a phone.
#402
EDIT: Redundant.
#403
Quote from: Ryan Timothy on Wed 26/06/2013 22:56:56
Nope. I meant exactly what I said. Accessing "Objects" by a strict ID is a terribly, terribly poor coding practice ("Objects" being GUIs, Characters, Objects, Hotspots, Regions, WalkableAreas, etc). They should be accessible via an ArrayList (which of course is the same thing, but you shouldn't have Character.ID to find what index it is in the ArrayList).

Says who?

There's nothing intrinsically wrong with using integer IDs as part of an array. Providing the characters are also available as global, named symbols it doesn't matter.

Also, beware foreach loops. They have sneaky caveats, especially in game programming.

#404
It should actually be very simple since the tech already exists in ags to do it for speech portraits.

Just make it change the character frame instead of the speech portrait frame and you're golden.
#405
The most common error I see in horror is the following:

"Scary things are scary, I will show the viewer the scary thing and it will be scary"

See the first Dead Space as an example.
#406
"To be conrinued" is about the funniest thing I've ever read on the internet ever.
#407
Reality-on-the-Norm / Re: Donation for RotN
Wed 19/06/2013 08:06:02
You have a sexy slave in an imaginary world?

That's not weird at all.
#408
Le Sigh..

We have been through this a couple of times but I will respond again since you are implying that I am saying things that I am not.

Quote
Just because Lua can be shown to do things that AGScript can't (currently) do, I don't think it outweighs the validity of AGScript. Abandoning AGScript altogether in favor of an (or any) existing full-featured language not only disenfranchises every existing project, but it essentially goes to state that CJ made the wrong decision in creating AGScript in the first place because he didn't know what he was doing.

A couple of things here:

Firstly, and this may be highly controversial, CJ is not God. He *has* made mistakes in creating AGScript (imho) and I *do* think that maintaining an incomplete, unoptimized language when better alternatives, with larger user bases and better support upstream, are available *is* the wrong thing to do.
However, I am not suggesting that CJ didn't know what he was doing. AGS is a very complicated piece of software and the editor is especially well designed.

I am only speculating but i reckon that CJ might actually agree with me on this fact since, as far as I can tell, there is no good reason to design a C-like language with no novel features when others exist. My guess is that CJ simply wanted the challenge of making a language and compiler from scratch which he did rather well considering his limited time/resources. AGScript is a triumph for a one man team. He also may have been a little reticent to use an interpreted language when processor power was so limited in those days. Also, I would guess that the number of off-the-peg languages available in 1997 was pretty limited so that was probably a defining factor.

To close, and for the billionth time, I would note that I never suggested *everyone* should abandon AGScript. AGScript is very good for a classic SCUMM-like adventure game because it has all those features built in and one can make an adventure game with it in quite literally a few minutes. All I was suggesting that those with a background in programming or those who wish to learn programming or those who wish to do something a bit different with their game should seriously consider Lua.

Can we stop with the "wahh, Calin says CJ was stupid" horseshit now? It is becoming tiresome.
#409
Compared to AGSScript, it's definitely faster to make stuff using Lua. I somewhat make this case in the devlog but basically Lua removes all the leg work from AGS (once you have your basic system). Lua allows you to very quickly hash out systems because you dont have to worry about declaring structs or worry about AGS's lack of forward declarations or lack of pointers to custom data structures or any other inconveniences.

I am not guessing when I say this, either. I have built things in Lua, using AGS, in half a day that would've taken 5 times as long in raw AGS. AGS is very poor at allowing generalised systems because you can't pass data structures or call functions from a reference. See Snarky's post on the trouble he had making an RPG engine in AGSScript for exactly these reasons. I made one using Lua in a few days and encountered no such resistance.

As I have said many times before, I do not champion Lua *in general* because I don't like its class system (or lack thereof). I merely think its better, faster to implement, faster to execute and less inconvenient that AGS Script as it currently is and I believe that to be demonstrable.
#410
From what I can tell this is all he wrote on the matter:

Quote
I would rebuild SCUMM.  Not SCUMM as in the exact same language, but what SCUMM brought to those games. It was a language built around making adventure games and rapid iteration.  It did things Lua could never dream of.  When Lua was in High School, SCUMM beat it up for lunch money.  True story.  SCUMM lived and breathed adventure games.  I'd build an engine and a language where funny ideas can be laughed about at lunch and be in the game that afternoon.  SCUMM did that. It's something that is getting lost today.

His main problem seems to be about the speed of lua implementation compared to SCUMM which seems an unfair comparison given that SCUMM games were very small 2D affairs whereas the first Lua-based game was a very early 3D game for which decent dev tools simply didnt exist.
#411
You misrepresent me, sir.

I accept Lua's forthcomings quite happily although most responses have been more along the lines of "i don't like the syntax" which is also fine.

As to your points, as written:

QuoteAnd so I asked "Did you ask him?"

It's not really reasonable to expect Ben to ask some guy on the internet to qualify his statements on a programming language several months after the fact. But, what gilbert said was essentially "SCUMM was better than Lua" with little qualification given. Also, GrimE may have sucked but if it did it was unlikely to be the scripting language used to program the interactions and more likely to be the fact that the technology and engine were new.

I also suspect, and I'm speculating here, that Gilbert may be a little bitter about the demise of SCUMM because it was the beginning of his decline from the A List but thats unrelated to the virtues and vices of Lua.

QuoteBottom line, the fact you have to paint me in a negative light, and anyone else, to avoid any possible questioning of your precious Lua is not only petty and dismissive, but means you're defensive and therefore consider my points valid.

That's just a non-sequitur sandwich, my good friend. Indeed, I don't think you *made* any points unless one could consider "Well Ron Gilbert said he doesn't like it" a 'point'.

Also, for what it's worth, I said you were crazy because you used very agressive and violent language in what was, until then, a polite conversation, not because you said you didn't like a programming language.

QuoteYou're a fucking dick.

Nobody's perfect.
#412
Wow, you are an exceptionally angry young man.

Ben304 gave you a very good set of reasons why Lua might be a decent option and your response was "Did you ask him? No? Oh. Didn't care about the expertise about someone who has been programming for decades? Okay."
I imagine Ben's internal response was something like "err.. wat?" while he backed away slowly from the crazy person.

Who cares what one guy says, no matter how much experience he has? That is, by definition, an appeal to authority.

Bottom line: You are crazy.
#413
I think the events system requires an overhaul anyway. The winforms paradigm seems good to me:

Code: javascript

    button.Click += function() end
    button.OnClick() // runs the Click event manually.
#414
Try doing a rebuild all files and be sure to send him the files from the Compiled folder.

If you run the game again in debug I think it invalidates the stuff in the compiled folder because the lua plugin writes a new version of the lscripts.dat.
#415
There are ways to negate those problems to some degree.

But name a scripting language for which that is not the case?
Javascript, angelscript, Lua, Python, php are all like that. Strong typing and variable declaration are just not necessary for projects with small teams (often just 1 programmer).

Quote from: Secret Fawful on Thu 13/06/2013 10:23:44
Did you ask him? No? Oh. Didn't care about the expertise about someone who has been programming for decades? Okay.

Appeal to Authority is the proper name for the fallacy you just used. (Fallacy means you're talking bollocks)
#416
We should maybe consider a View.Preload function of some kind since I have seen this issue a few times with high res games.
#417
Quote from: Eric on Wed 12/06/2013 22:40:33
Well, that's the benefit of seeing Jesus as a philosopher and not a religious figure whom I have to follow to the letter.

That would be fine except that Jesus was a fairly bad philosopher. Most of the "good" ideas Jesus spoke of were outlined hundreds, if not thousands, of years before he was born.

Hardly the revealed wisdom of the divine.
#418
Here is my GUI system. It's VERY WIP and needs to be wired up to AGS's event system.

The gui system: http://pastebin.com/iB06ufJ4

The GUI manager: http://pastebin.com/rvs2DHke

I might have missed off some utility functions or something. Let me know if you need any guidance. I doubt it will be of any use and its very poorly made but it might be educational.

And a picture with some controls:



Usage example:

Code: lua

--test gui

gui = require('gui')

testgui = gui:new({text= "Test GUI", x = 100, y = 50,width = 150, height = 80})

testgui.layout = gui.layout:new({x = 0, y = 10}, testgui)
testgui.textbox1 = gui.textbox:new({label = "Name", x=0, y=0, width = 100, height = 12, text = "Calin"}, testgui.layout)
testgui.textbox2 = gui.textbox:new({label = "Age", x=0, y=0, width = 100, height = 12, text = "lol not telling."}, testgui.layout)
testgui.button1 = gui.button:new({x = 0, y = 0, width = 33, height = 12, text = "hello!"}, testgui.layout)

function testgui.button1:onClick()
	ags.Display("Lol you clicked me")
end

return testgui
#419
Yes, agreed.

That annoys the shit out of me.
#420
Where is ProgZ when you need him to be outraged about something?

I bet he practically ejaculated as he shouted "I told you so! WAKE UP SHEEPLE!"
SMF spam blocked by CleanTalk