• Advertisement

Search the Community

Showing results for tags 'Scripting'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Audio
    • Music and Sound FX
  • Business
    • Business and Law
    • Career Development
    • Production and Management
  • Game Design
    • Game Design and Theory
    • Writing for Games
    • UX for Games
  • Industry
    • Interviews
    • Event Coverage
  • Programming
    • Artificial Intelligence
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Engines and Middleware
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
  • Archive

Categories

  • News

Categories

  • Audio
  • Visual Arts
  • Programming
  • Writing

Categories

  • GameDev Unboxed

Categories

  • Game Dev Loadout

Categories

  • Game Developers Conference
    • GDC 2017

Forums

  • Audio
    • Music and Sound FX
  • Business
    • Games Career Development
    • Production and Management
    • Games Business and Law
  • Game Design
    • Game Design and Theory
    • Writing for Games
  • Programming
    • Artificial Intelligence
    • Engines and Middleware
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
    • 2D and 3D Art
    • Critique and Feedback
  • Topical
    • Virtual and Augmented Reality
    • News
  • Community
    • GameDev Challenges
    • For Beginners
    • GDNet+ Member Forum
    • GDNet Lounge
    • GDNet Comments, Suggestions, and Ideas
    • Coding Horrors
    • Your Announcements
    • Hobby Project Classifieds
    • Indie Showcase
    • Article Writing
  • Affiliates
    • NeHe Productions
    • AngelCode
  • Workshops
    • C# Workshop
    • CPP Workshop
    • Freehand Drawing Workshop
    • Hands-On Interactive Game Development
    • SICP Workshop
    • XNA 4.0 Workshop
  • Archive
    • Topical
    • Affiliates
    • Contests
    • Technical

Calendars

  • Community Calendar
  • Games Industry Events
  • Game Jams

Blogs

There are no results to display.

There are no results to display.

Marker Groups

  • Members

Developers

Developers


Group


About Me


Website


Industry Role


Twitter


Github


Twitch


Steam

Found 23 results

  1. Hi All, Im running through some video tutorials in C# as im newbie. One thing im doing is adding lots of comments to the code so I can go back and revisit the code later and know exacly what is going on. What id also like to do is store the code snippets in an easy to find place so I can reuse/analyse them later. I kind of just want a long scrolling page with all my code and commented snippets on that I can use as reference later which also maintains the snippet format and is of course searchable. There seems to be a few apps as well as Git Hub etc to store code snippets but im just wondering which one from a newbie perspective works best for you and why? Kind Regards, John
  2. Game Programming Resources

    Game Programming Resources Rodrigo Monteiro, who has been making games for twenty years now, started a thread on Twitter for sharing his favorite game programming resources. I then collected those and a few responses and indexed them into a Twitter moment here: Here’s what was in the thread: Game Networking: https://gafferongames.com/categories/game-networking/ Development and Deployment of Multiplayer Online Games by IT Hare / No Bugs’ Hare is a multiplayer game programming resource split into nine volumes; the first of which is available here on Amazon. Linear Algebra: Geometry – Separating Axis Theorem (for collision detection): http://www.metanetsoftware.com/technique/tutorialA.html How to implement 2D platformer games: http://higherorderfun.com/blog/2012/05/20/the-guide-to-implementing-2d-platformers/ Pathfinding: https://www.redblobgames.com/pathfinding/a-star/introduction.html OpenGL Tutorial: https://learnopengl.com/ Audio Programming: https://jackschaedler.github.io/circles-sines-signals/index.html OpenAL Effects Extension Guide (for game audio): http://kcat.strangesoft.net/misc-downloads/Effects%20Extension%20Guide.pdf Entity Component Systems provide an alternative to object-oriented programming. Entity Systems are the future of MMOG development: http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/ What is an entity system framework for game development? http://www.richardlord.net/blog/ecs/what-is-an-entity-framework.html Understanding Component-Entity-Systems: https://www.gamedev.net/articles/programming/general-and-gameplay-programming/understanding-component-entity-systems-r3013/ Alan Zucconi blogs about shaders and game math for developers on his site: https://www.alanzucconi.com/tutorials/ AI Steering Behaviours: http://www.red3d.com/cwr/boids/ Bartosz Olszewski blogs about game programming here: gamesarchitecture.com How to write a shader to scale pixel art: https://colececil.io/blog/2017/scaling-pixel-art-without-destroying-it/ Here’s podcast on C++ programming: http://cppcast.com/archives/ http://gameprogrammingpatterns.com/ Note: This post was originally published on my blog as game programming resources.
  3. I am having a problem with making duplicates of my AI. When one is within range, it performs normally. If two are in range, then they both freeze up. The AI are direct duplicates of each other. I don't know what causes this. Code below: Any help is seriously appreciated. Thank you. Code Below: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.AI; public class NavMeshAI : MonoBehaviour { public Transform player; public Transform head; public Animator anim; public bool pursuing = false; public NavMeshAgent navComponent; public Transform enemy; // Use this for initialization void Start () { anim = GetComponent<Animator> (); navComponent = this.gameObject.GetComponent<NavMeshAgent>(); } // Update is called once per frame void Update () { Vector3 direction = player.position - this.transform.position; direction.y = 0; float angle = Vector3.Angle (direction, head.up); if (Vector3.Distance (player.position, this.transform.position) < 10 && (angle < 360 || pursuing)) { pursuing = true; this.transform.rotation = Quaternion.Slerp (this.transform.rotation, Quaternion.LookRotation (direction), 0.1f); anim.SetBool ("isIdle", false); if (direction.magnitude > 2) { this.transform.Translate (0, 0, 0.05f); anim.SetBool ("isWalking", true); anim.SetBool ("isAttacking", false); if (pursuing == true) { navComponent.SetDestination (player.position); } } else { anim.SetBool ("isAttacking", true); anim.SetBool ("isWalking", false); } } else { anim.SetBool ("isIdle", true); anim.SetBool ("isWalking", false); anim.SetBool ("isAttacking", false); pursuing = false; navComponent.SetDestination (enemy.position); } }
  4. According to this article So I wonder if using Lua in Lumberyard can gain the same performance benefit as C++. I'd like to discuss when using Lua and when using C++ in Lumberyard (or can see as Pros and Cons of Lua and C++ in Lumberyard)
  5. Hello there, I am a former player in the small, but dedicated community for the long dead MMO game Wind Slayer.I have been looking to play the game for 7 years, and just assumed that someone else would come along and create a private server. Since I've been waiting about 4 years since the last time I heard any discussion about a private server, I figured I'd have to do this myself.I have all of the game's files, I am looking for a team who would be willing to develop a private server. Already checked on the status of the game's IP and the developer (Hamelin) is a dead company, also; none of the former publishers (Outspark, and Ignited) exist either. So copyright concerns won't be an issue since the game isn't owned by any companies as of today.Link to the game's files for anyone who's interested: http://download.cnet.com/Windslayer/3000-7540_4-10857324.html (@Mods, I accidentally posted this before in the wrong section. Which is the reason for the double post. My apologies)
  6. 'lo again all. I mentioned in my previous entry that I've been porting our 2009 release, Static: Investigator Training which is a C++/Direct3D/lua fmv horror adventure; to html5/js (canvas) using the base code from 96Mill and Revel Immortal as a starting point. The process has been going well, however there have been some sticky spots. extracting the original data from binary files atlasing approximately 300mb of png compressed graphics mimicking synchronous co-routine functions lua provided in JS differences between the original engine and the new engine re-re-remembering that everything takes way longer than you think it will I attacked what I thought would be the hardest problem first, which was extracting the original binary data. There were two forms of binary file classes.bin and game.bin; where classes.bin represented the data classes or 'templates' that described static, shared (by flyweight pattern) attributes for all three object types; game, rooms and actors. ...and where game.bin was in the exact form of a save-game, that represented a new-game initial state. That is representing the actual objects, their relationships (game has rooms, room has actors), starting attributes (position, animation, alpha, etc.) I used NodeJS to parse both of these files and export json equivalents of each file for easy access of data; I also took this opportunity to have computer assistance for renaming/transforming members to better match what the new engine would expect. Next I began to import the existing resources, which involved preparing them for a lot of atlasing Audio was simple, save for the shear amount of it; when starting a new HTML5 project; you always take size and amount of resources into consideration; it's like climbing Everest (not that I ever have) but everything you include needs to be downloaded by the user who is expecting a snappy game on their probably outdated tablet ...so you're careful. I didn't have any such luxury in the port, the final sound effect atlas came to 10 minutes; which should be fine. ...thankfully voice files are not atlased, as there is over 500 of them. In addition to atlasing, all of this data must be trans-coded as well, from source formats such as .wav, to deployment formats of .ogg and .mp3 ...why both? because depending on which device/browser/version you encounter some are only capable of running one or the other ...and some which are capable of playing both, are better at playing one than another ...and some devices outright lie. But this has gotten better over the years.
  7. Help please !!!

    Hi there I'm new to unity and C# and i want to make my first Android game and I'm having a problem when my player collides with the cratepipe in the game the spawning crate wont stop i need help with this i want to stop the spawning when the gameobject "player" hits the crates and stop. my player move by tilting I'm going to leave all the scripts I'm using so far please help me what should i do....? The Countdown Script using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class CountdownText : MonoBehaviour { public delegate void CountdownFinished(); public static event CountdownFinished OnCountdownFinished; Text countdown; void OnEnable() { countdown = GetComponent<Text>(); countdown.text = "3"; StartCoroutine("Countdown"); } IEnumerator Countdown() { int count = 3; for (int i = 0; i < count; i++) { countdown.text = (count - i).ToString(); yield return new WaitForSeconds(1); } OnCountdownFinished(); } } Crate Script sing UnityEngine; public class Crate : MonoBehaviour { public bool hit = false; void OnTriggerEntre2D(Collider2D collider) { if (collider.tag =="Player") { hit = true; } } } CrateSpawn Script using System.Collections; using System.Collections.Generic; using UnityEngine; public class CrateSpawn : MonoBehaviour { List<Cratework> cratePool; int index = -1; public GameObject cratePrefab; public float spawnTime = 4f; public float speed = 35; public int poolSize = 5; public bool isRunning = true; [HideInInspector] public bool hit = false; void Start() { cratePool = new List<Cratework>(); for (int i = 0; i < poolSize; i++) { var crate = (GameObject)Instantiate(cratePrefab, new Vector3(0, 8, 0), Quaternion.identity); cratePool.Add(crate.GetComponent<Cratework>()); } StartCoroutine(SpawnCrate()); } void Update() { for (int i = 0; i <= poolSize; i++) { var crate = cratePool[i]; crate.transform.position += new Vector3(0, speed * Time.deltaTime, 0); if (crate.hit) { hit = true; StopAllCoroutines(SpawnCrate()); } } } IEnumerator SpawnCrate() { while (isRunning) { index++; index %= poolSize; var crate = cratePool[index]; float x = Random.Range(-2, 2); crate.transform.position = new Vector3(x, -6, 0); yield return new WaitForSeconds(spawnTime); } } } CrateWork Script using UnityEngine; public class Cratework : MonoBehaviour { public Crate left; public Crate right; public bool hit = false; void Update () { if (left.hit || right.hit) { hit = true; } } } GameController Script using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameController : MonoBehaviour { public CrateSpawn crateSpawn; void ChangeSpeed(float speed) { crateSpawn.speed = speed; } void Update() { if (crateSpawn.hit) { ChangeSpeed(0); } } } GameManager Script using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class GameManager : MonoBehaviour { public delegate void GameDelegate(); public static event GameDelegate OnGameStarted; public static event GameDelegate OnGameOverConfirmed; public static GameManager Instance; public GameObject startPage; public GameObject gameOverPage; public GameObject countdownPage; public Text scoreText; enum PageState { None, Start, GameOver, Countdown } int score = 0; bool gameover = true; public bool GameOver { get { return gameover; } } void Awake() { Instance = this; } void OnEnable() { CountdownText.OnCountdownFinished += OnCountdownFinished; MoveController.OnPlayerDied += OnPlayerDied; MoveController.OnPlayerScored += OnPlayerScored; } void OnDisable() { CountdownText.OnCountdownFinished -= OnCountdownFinished; MoveController.OnPlayerDied -= OnPlayerDied; MoveController.OnPlayerScored -= OnPlayerScored; } void OnCountdownFinished() { SetPageState(PageState.None); OnGameStarted(); score = 0; gameover = false; } void OnPlayerDied() { gameover = true; int savedScore = PlayerPrefs.GetInt("HighScore"); if (score > savedScore) { PlayerPrefs.SetInt("HighScore", score); } SetPageState(PageState.GameOver); } void OnPlayerScored() { score++; scoreText.text = score.ToString(); } void SetPageState(PageState state) { switch (state) { case PageState.None: startPage.SetActive(false); gameOverPage.SetActive(false); countdownPage.SetActive(false); break; case PageState.Start: startPage.SetActive(true); gameOverPage.SetActive(false); countdownPage.SetActive(false); break; case PageState.GameOver: startPage.SetActive(false); gameOverPage.SetActive(true); countdownPage.SetActive(false); break; case PageState.Countdown: startPage.SetActive(false); gameOverPage.SetActive(false); countdownPage.SetActive(true); break; } } public void ConfirmGameOver() { OnGameOverConfirmed();//event scoreText.text = "0"; SetPageState(PageState.Start); } public void StartGame() { SetPageState(PageState.Countdown); } } HighScore Script using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class HighscoreText : MonoBehaviour { Text highscore; void OnEnable() { highscore = GetComponent<Text>(); highscore.text = ": " + PlayerPrefs.GetInt("HighScore").ToString(); } } MoveController Script using System.Collections; using System.Collections.Generic; using UnityEngine; public class MoveController : MonoBehaviour { public delegate void PlayerDelegate(); public static event PlayerDelegate OnPlayerDied; public static event PlayerDelegate OnPlayerScored; public float speed = 0.25f; public Vector3 startPos; Rigidbody2D rigidbody; GameManager game; void Start() { rigidbody = GetComponent<Rigidbody2D>(); game = GameManager.Instance; } void OnEnable() { GameManager.OnGameStarted += OnGameStarted; GameManager.OnGameOverConfirmed += OnGameOverConfirmed; } void OnDisable() { GameManager.OnGameStarted -= OnGameStarted; GameManager.OnGameOverConfirmed -= OnGameOverConfirmed; } void OnGameStarted() { rigidbody.velocity = Vector3.zero; rigidbody.simulated = true; } void OnGameOverConfirmed() { transform.localPosition = startPos; } void Update() { transform.Translate(Input.acceleration.x * speed, 0, 0); } void OnTriggerEnter2D(Collider2D col) { if (col.gameObject.tag == "ScoreZone") { OnPlayerScored(); //play a sound //get a point } if (col.gameObject.tag == "DeadZone") { OnPlayerDied(); rigidbody.simulated = false; } } }
  8. Just a little progress video. As well as getting the scripting working a bit more, I've been placing villages and naming map areas. The area names are generated by putting together random chosen syllables. Morphing For variation with the natives they now use realtime bones like the player, and there is a morphing system so you can have fat / thin / muscular natives etc (I only have created fat and thin so far to test, but it works fine). UV Maps As well as the morphing variation, each native has a uv map so it can use different textures for different uv islands (parts of the body). This will allow e.g. wearing different clothing, different faces, jewellry etc. At the moment I've just just put some red green and blue and white over the different areas as placeholder until I create more textures. The conversations are all random from script just for a test .. choosing random animals and people to make random snippets of talk. I will probably make this more purposeful, giving each villager names and relations so they can further the plot. Next Next up I am putting in attachments so they can carry spears etc, and the player can carry sword. Also I may be able to have a canoe as an attachment off the root nodes so they can canoe on the lakes. I will also add female natives. I could do them as morphs, but I think it will be easier for texturing etc to have a different female model.
  9. Hey , I wanted to combine some ideas of the Actor model with an Entity Component model and wanted to see if anyone had any experience using the actor model for gameplay and if they could present the pros and cons of using such a method. I know that a pro is that it helps with concurrency , but I can see a major con being the allocation of messages for communication between. I've built a code generation tool that can automatically generate messages based on c++ function definitions, so creating a class per message would not be a problem. Thank you!
  10. Hi! I'm toying with different ideas about how to script game logic. I'm well aware of different scripting languages, and note that most games use these to define game logic. But what about using C/C++ in DLLs to script a game? For simplicities sake, lets assume I'm just writing quest logic. Why not just create a metafile that lists all quests. The main .exe loads this list (and creates a bunch of function pointers) and then programmatically queries a bunch of DLLs for the game logic. My idea is to create a bunch of DLLs (for example DLL1.dll, DLL2.dll, DLL3.dll etc.) and resolve the function pointers from last to first (DLL3.dll to DLL1.dll), which allows code in higher numbered DLLs to supersede existing code in lower numbered DLLs. New code would be entered into higher numbered empty/nearly empty DLLs until finalised, and then be moved into DLL1.dll. This allows for very short compilation times, with the advantage of fully compiled logic. This seems so simple I'm sure I must be overlooking something! Does anyone have any views on my approach, especially it's short fallings?
  11. Need help with makehuman

    Currently I using makehuman to make a 3d models but I am not satisfied with that model. If any use this please reply about the quality and details of models. 🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔
  12. Hi all! We are looking for a C# programmer for our 2D Action RPG titled Adavia, made in Unity. The game itself is akin to Legend of Zelda: Link to the Past, though we're also adding in traditional RPG elements such as Character Creation. This is more of a hobby than anything commercial, if it somehow does manage to go commercially, all revenue will be split equally among the team. If you're interested, we ask that you be comfortable with: Unity Coding A.I's for enemies and NPCs. Working with GUI's. Communicating regularly with the team via Skype (text only). If you have any questions or would like to apply, please contact me at nathan.jenkins1012@gmail.com
  13. I am developing a RTS game involving robber and cops. I have designed a simple rule based AI system for the robber. Goals of the robber AI: Escape from the cops (robber should not get caught) Conduct robbery Current implementation: The robber AI uses a rule based system to escape from the cops. I have written IF-THEN clauses to build the rule based AI system. The robber AI uses the knowledge of cops’ current positions. Future requirements: I am worried about the current architecture of this robber AI system. I read that rule based systems are inefficient and difficult to maintain. For the future, I want the robber AI to use some power-ups (to escape) The AI should consider the power-ups used by the cops before making decisions. For conducting the robbery, the robber has to move to a specific location escaping from the cops. Questions: Is the current rule based AI system will flexible enough (and easy to maintain) to meet the future requirements? What can be better alternatives for the existing rule based system? (Like decision trees or state machines etc.) I read people suggesting that the rule based systems are difficult to debug. Can anyone explain why? I would appreciate any thought/suggestions on this topic. Thank you.
  14. Java game from 1998

    I play this game called graal classic and recently i decided to look into the history of it. eventually i came across this link of way older versions of they game, problem is i dont know how to run any of them. does anyone here know how i can emulate them?
  15. Random Number Generator

    I'm running to some issues with a random number generator that I am trying to create to test what type of attack an enemy will use (weapon or magic) and whether or not they land a hit with the attack. What I want it to do is generate a random number number for the type of attack, then generate a separate random number for if the hit lands or not. What actually happens is it is generating a different number each iteration, but the same number for each item. So for instance, if the random number is a 6, both attack type and if it hit is a 6, if it's a 7 both are 7, etc. I'm almost certain the issue is within how I'm using time in conjunction with this, but everything else I've found hasn't been helpful. I've tried doing one function, but had the same issue and switched to two functions in the hopes that would help, but it didn't and now I'm not quite sure what to try next. Here is the code I have so far: // Example program #include <iostream> #include <string> #include <stdlib.h> #include <ctime> using namespace std; int getRandAttack(); int getRandHit(); int main() { int randomAttack; int randomHit; randomAttack = getRandAttack(); cout<<randomAttack<<endl; //used to ensure same number isn't given every time //decides what happens based on what number was given if (randomAttack <= 5) { cout<<"Enemy used a weapon!"<<endl; }else if (randomAttack > 5) { cout<<"Enemy used magic!"<<endl; } randomHit = getRandHit(); cout<<randomHit<<endl; //used to ensure same number isn't given every time //decides what happens based on what number was given if (randomHit <= 5) { cout<<"The attack missed!"; }else if (randomHit > 5) { cout<<"The attack hit!"; } } //gets random number to determine enemy attack type int getRandAttack () { int random; srand (time(NULL)); random = rand() % 10 + 1; return random; } //gets random number to determine if enemy attack lands a hit int getRandHit () { int random; srand (time(NULL)); random = rand() % 10 + 1; return random; } I know there is an easier way to do this that involves classes, but the online compiler I'm messing around with right now doesn't seem to support extra files, so I'm making functions work instead. Any help and lead in the right direction would be greatly appreciated.
  16. Hello, my name is Mark. I'm hobby programmer. So recently,I thought that it's good idea to find people to create a full 3D engine. I'm looking for people experienced in scripting 3D shaders and implementing physics into engine(game)(we are going to use the React physics engine). And,ye,no money =D I'm just looking for hobbyists that will be proud of their work. If engine(or game) will have financial succes,well,then maybe =D
  17. I was developing a 2D game engine in c++ and it went pretty well, until I got to the point of exporting the game. You see, I was using lua in a virtual machine (sandbox) for the scripting of the game; now I realized that my game engine is just a lua interpreter if I try to share the game I'll distribute the game files (sounds, images, etc..), my scripts and my "interpreter" .exe this means that if I share my game with someone they'll have access to the game logic instead of a stand-alone .exe. How do other engines compile scripts into a stand-alone executable i'm really confused on this mater.
  18. Hello everyone I have made a tutorial on creating a hitman style game in unity. If you think that will be of any interest to you. Please check the link.
  19. Hello! I'm not sure if this is the right place since i'm new to the forums. I'm creating a simple "City creator" right now, and, obviously, i need to create a Road tool for it. I was planning on doing raytracing to make the road snap to the terrain geometry, but it would clip through the terrain in places with mountains or different heights. I don't want to make a simple 2D decal because it would not look good without shape(The sidewalk is of course going to be taller and have a different geometry than the road itself) and i want to make it "bendable". I'm not the best at maths and geometry manipulation so i don't know where to start... I'm using Unity by the way, and sorry for my bad English!
  20. I have made a short video on creating a basketball game in Unity. Please, check that out and leave me with some feedback
  21. Looking for a team to work on game development. About Me: I currently work in Web Development, primarily PHP, JS, and SQL, with some front-end work. Previously was into Game Dev but no paid jobs, just projects such as Renegade Medieval, and some community assets in Dota2. Developer Dabbled in Unity (low to medium experience with C#, it's similar to Java which I've used more of) Basic coding in GameMaker, similar to JavaScript, but didn't get much further than HeartBeast tutorials Some level design in Unreal Engine (also managed to get a character rigged and in, but that was years ago) Artist 3D modelling, primarily characters, high poly sculpting to low poly retopology, unwrapping, and baking 2D pixel art, and textures (not much in terms of 2D concept art though) You can see some of the stuff I do here. Requirements: Looking for a team with an established concept and development already underway. I'd like to see some examples and game engine progress before dedicating time to assets / characters. Communicative team Ideally a team working on just the one project Flexible working hours, I won't be able to give a great deal of time And that's it really. If you could include information in the comments below, or PMs that would be great.
  22. Hi, I've been working on extending an existing scripting language which lacks some important features, especially classes and inheritance. To implement that feature, I have used a approach similar to how they did it with Lua tables. It turned out pretty good. But I wanted more, I want scripted classes to be able to inherit from real classes like a Lua table extending a C++ class. However, I realized that would be impossible or at least take a good amount of time to implement. I haven't made many games so I can't answer this question myself: Is the ability to inherit from real classes expected from a scripting language? If not, it would save me plenty of time. And I think, if someone really needs that feature, they are probably write too much in scripts instead of code. What's your idea on this? Thanks for your time. TL;DR: Is the ability of scripted classes to inherit from real classes necessary for a scripting language?
  23. I need some advice. After I changed my scripting language from in-memory C to Lua I've had numerous problems I've never encountered in other languages. Prototypes? Type signatures? Calling functions with any number of parameters? How do you deal with all the random bugs you can get that you have really no way of determining the cause of? If I call a function with one less parameter than it should have, I might just get a Lua error somewhere else in the script. At a later time. What do you do to make your code (which isn't bottlenecked at all, so there is tons of room to add checks and balances) more correct and more sane? If I scripted sanely in C I would rarely have these issues. For example any pointers passed between the engine and the script goes through a sanitizing stage where it actually checks if the pointer points to an actual valid existing entity. If it sounds like I am regretting the change, I don't know how to answer that. Lua can construct tables and pass them around, which is very nice, unlike C where I would have to malloc (and that is just not going to happen).
  • Advertisement