Skip to main content
GameDev.net gamedev.net
🔒 Locked

My Scripting Language

Started by Dark Shadow Jan 3, 2001 at 12:20 PM 7 replies 250+ views
Original Post
Dark Shadow
Dark Shadow
I''m making a fast game programming language, it is like: LOAD MESH "house.x",1 SyntaxCommand)(Parameter1),(Parameter2) My problem is that I can''t read the second, third fourth... Parameter fast. So my language is very slow... I use the "callbyname" command in VB6 Could you help me???????????? tnx WWW.DARK-OFFICE.COM
strangebreed
strangebreed
You need to precompile your language, that''s the only way to program any kind of fast, scripted execution.

You compile your ASCII text into a binary file, then load that in before you execute. You use a number representation for you commands and parameters.

It''s really slow trying to decode text statements on the the fly ;-) What you end up doing is writing a compiler that runs in real-time!?


---Strange

---Strange
Fred Stumakas
Fred Stumakas
Hello Script-Writers!

I am a professional programmar and as such I have several experiences with scripting languages. Let me tell you, they are slow, but there is a simple elegant trick to speed them up. Essentially what you should do is write them all in assembly. It is even better if you can write your scripts in assembly. This in my experience provides the biggest jump in performance.

Glad I Could Help!,


---
Fred Stumakas,
Professional Programmar
---Fred Stumakas,Professional Programmar
trixter
trixter
Fred, are you trying to help someone or just having fun? If you write a script in assembly, then it is no longer a scripting language as it just became assembly language. Do you know what assembly and scripting languages are? Just checking

Scripts do not have to be fast, as they are typically used for stuff like initialization, loading, and other non-realtime code. The parts that are realtime can still be written with a script language, but should be compiled to a faster machine specific native code.

For the parameters, just something to consider, try decoding them from last to first. It''s not a speed issue directly, but it may open doors.

Carl "trixter"[email=carl@trixoft.com]carl@trixoft.com[/email]http://www.trixoft.com
morfe
morfe
Fred is a spammer. He is also an idiot who does not know what he is talking about (see previous post, as well as posts in the Isometric Forum, and probably others).

I suspect this is none other than DelphiProgrammer.

He is not a professional programmer, so ignore anything he has to say.



"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..."
"When you are willing to do that which others are ashamed to do, therein lies an advantage."
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick
strangebreed
strangebreed
I don''t know if Fred is a spammer or not ;-), but he does have point about assembly. Unfortunately, his method is pretty “old-school”. Today, with huge development costs and tight deadlines, the fastest running code is not the first priority.

I’m currently lead programmer working on a PC, PS2 and Xbox game, (we passed on GameCube ;-) We’re using a compiled AI language of our own design, not for execution speed, but simply to ease cross-platform programming. We can compile our scripts and because they’re binary compatible across all formats, no further conversion work is needed for our game content.

Assembly would be quicker, but difficult and time consuming across multiple formats... Case in point, Unreal and Quake. The Unreal engine has ported well to the PS2 because it doesn’t rely on format specific code. If the engine or scripting language was written in assembly it would’ve taken years to convert it over to the MIPs processor.

Assembly language also makes it impossible to extend your AI engine with user-scripts, (think of all those Quake and Unreal MOD’s and scripts made by people at home!).



---Strange

---Strange

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.