Author Topic: Script support in future versions of QB64?  (Read 3229 times)

0 Members and 1 Guest are viewing this topic.

Offline Craz1000

  • Forum Regular
  • Posts: 111
  • I'm OK
    • View Profile
    • Craz1000.net
Script support in future versions of QB64?
« on: May 02, 2020, 09:05:46 pm »
I would really love to be able to have txt files with code than an exe can run without compiling it. For sprite based games with enemies that have specific behaviors, one could make a generic engine that can do anything really. Or mod existing games without having to give the source out.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Script support in future versions of QB64?
« Reply #1 on: May 02, 2020, 09:30:01 pm »
Sounds like you want an interpreter.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Script support in future versions of QB64?
« Reply #2 on: May 02, 2020, 10:27:46 pm »
If you use Windows... find a Windows 98 and use the built-in QBASIC interpreter.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline TerryRitchie

  • Seasoned Forum Regular
  • Posts: 495
  • Semper Fidelis
    • View Profile
Re: Script support in future versions of QB64?
« Reply #3 on: May 03, 2020, 12:28:28 am »
Sounds like you want an interpreter.

Yeah, that's what I was thinking.

@Craz1000 For situations like yours I've created what I call "behavior" files (basically config files). By changing values in the files it changes the look/feel of the game.
In order to understand recursion, one must first understand recursion.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Script support in future versions of QB64?
« Reply #4 on: May 03, 2020, 10:54:29 am »
You have me wondering if you could build a game interpreter (exe) that could run script files fast enough?

Is that what a game engine is?

FellippeHeitor

  • Guest
Re: Script support in future versions of QB64?
« Reply #5 on: May 03, 2020, 11:04:05 am »
I'd think so.

Offline Gets

  • Newbie
  • Posts: 28
    • View Profile
Re: Script support in future versions of QB64?
« Reply #6 on: May 05, 2020, 01:42:30 pm »
I use a script for my animation routines and parsing strings with INSTR$ for data a few thousand times per frame had no noticeable effect on actual performance, so that shouldn't be a big issue. The only thing getting in the way of using existing script languages would be the time to create an interpreter or port an existing library, I'm guessing.