what is meant by Gameplay?

Started by
34 comments, last by Norman Barrows 7 years, 11 months ago
I would really like this answered as I've been wondering for a while..... Lots of different forums and such people say that scripting languages (lua c# java etc) are okay for gameplay while c++ should be used with performance critical code....... Anywaythe questions is what exactly do they mean by gameplay??? I feel like gameplay isn't a very specific thing, to a regular gamer gameplay could refer to the "feel" of the game. Does gameplay refer AI or what the player directly controls(e.g combat, movement, camera ...)?? Am I rightin the assumption that by gameplay they mostly mean NPC behaviour like scripting a boss battle.
Advertisement

They are probably talking about stuff like powerups and interactions.

So your different health, ammo, whatever containers are done as a script as performance is not an issue and a scripting language allows you to iterate faster.

Never say Never, Because Never comes too soon. - ryan20fun

Disclaimer: Each post of mine is intended as an attempt of helping and/or bringing some meaningfull insight to the topic at hand. Due to my nature, my good intentions will not always be plainly visible. I apologise in advance and assure you I mean no harm and do not intend to insult anyone.

There is a lot of systems-level work. Usually these are part of the game engine, whatever engine you are using.

When you are working with game objects and their behavior, typically this is considered "gameplay programming", separate from "engine programming".

If you are using an engine like Unreal or Unity, the code you write is gameplay code.

If you are writing your own systems anything that can be reused among all games, such as math code or animation code or physics code or file loading code, those are all engine related. Code relating to your own objects that is specific to that one game is gameplay code.

They are probably talking about stuff like powerups and interactions.

So your different health, ammo, whatever containers are done as a script as performance is not an issue and a scripting language allows you to iterate faster.


Thank you, that helps clarify that. A little bit better

There is a lot of systems-level work. Usually these are part of the game engine, whatever engine you are using.

When you are working with game objects and their behavior, typically this is considered "gameplay programming", separate from "engine programming".

If you are using an engine like Unreal or Unity, the code you write is gameplay code.

If you are writing your own systems anything that can be reused among all games, such as math code or animation code or physics code or file loading code, those are all engine related. Code relating to your own objects that is specific to that one game is gameplay code.


Okay so gameplay code == any code revolving around game objects and such
Engine code == usually reusable stuff like physics, calculations and animation stuff
I dont know if either of you care but I'm using the unreal engine 4
I'm using ue4 with skookumscript plugin. Skookumscript is a compiled scripting language made for video games. It has much better perfomance than other scripting languages and in some special cases it can rival or outperform c++.
Here are a few links
Skookumscript.com

And here is a link to forum thread about it's performance
Forum.skookumscript.com/t/skookumscript-performance/

For what its worth, usually when scripting languages -- even compiled ones -- make claims of being as-fast or faster than C or C++ or whatever language they might typically be embedded into its usually dubious. They compare features that the scripting language has meticulously optimized for against naive implementations in the language they're comparing against, or they're comparing library functions that might be used in similar situations in either language but that do wildly-different amounts or kinds of work underneath. As a rule, scripting languages don't surpass "real" programming languages when doing the same work and with both languages free to elect their own optimized solutions; its uncommon even for a scripting language to match a "real" language in performance under these conditions. That goes doubly so when the language they're comparing to is a "bare-metal" language like C, C++, Rust, or others.

I'm not correcting this misconception as an academic argument. I'm correcting it because its common to fall for the siren-song of performance when selecting a scripting language. While it may be sometimes convenient that you gain the flexibility of choosing to implement a particular bit of performance-intensive code in your scripting language (either because it saves dropping into a harder-to-use language, or because it avoids crossing run-time/marshaling boundaries), it is most often a better idea to implement that functionality in the language of your engine and expose it to scripts as a service. Thus, if you overvalue this ability in a scripting solution, you might be compelled to give up ground in features that are far more important in a scripting language, such as productivity, ease-of-integration, how widely used it is, or whether its programming model supports the kinds of interactions you need to model in your game-play without creating a lot of that infrastructure yourself.

TL;DR; Performance is rarely a noteworthy consideration for things you should consider scripting to begin with. If you've chosen a scripting language with performance as your primary concern, you've probably traded away more worthwhile features to get it.

throw table_exception("(? ???)? ? ???");

I would really like this answered as I've been wondering for a while..... Lots of different forums and such people say that scripting languages (lua c# java etc) are okay for gameplay while c++ should be used with performance critical code....... Anywaythe questions is what exactly do they mean by gameplay??? I feel like gameplay isn't a very specific thing, to a regular gamer gameplay could refer to the "feel" of the game. Does gameplay refer AI or what the player directly controls(e.g combat, movement, camera ...)?? Am I rightin the assumption that by gameplay they mostly mean NPC behaviour like scripting a boss battle.

"Gameplay" usually refers to the code and scripts that are specific to the game and is not normally a part of the "engine" code. This is more of a relevant distinction when you have multiple projects using the same engine.

As far as the separation between scripting languages and c++ for game code, I actually think that in many cases where something like LUA is being used you'd be better off using c++ (assuming that's your native code language) for your gameplay code. You really need to think about why you're choosing a scripting language over native code, and not just decide to use it because you think that's what you should do.

For what its worth, usually when scripting languages -- even compiled ones -- make claims of being as-fast or faster than C or C++ or whatever language they might typically be embedded into its usually dubious. They compare features that the scripting language has meticulously optimized for against naive implementations in the language they're comparing against, or they're comparing library functions that might be used in similar situations in either language but that do wildly-different amounts or kinds of work underneath. As a rule, scripting languages don't surpass "real" programming languages when doing the same work and with both languages free to elect their own optimized solutions; its uncommon even for a scripting language to match a "real" language in performance under these conditions. That goes doubly so when the language they're comparing to is a "bare-metal" language like C, C++, Rust, or others.

I'm not correcting this misconception as an academic argument. I'm correcting it because its common to fall for the siren-song of performance when selecting a scripting language. While it may be sometimes convenient that you gain the flexibility of choosing to implement a particular bit of performance-intensive code in your scripting language (either because it saves dropping into a harder-to-use language, or because it avoids crossing run-time/marshaling boundaries), it is most often a better idea to implement that functionality in the language of your engine and expose it to scripts as a service. Thus, if you overvalue this ability in a scripting solution, you might be compelled to give up ground in features that are far more important in a scripting language, such as productivity, ease-of-integration, how widely used it is, or whether its programming model supports the kinds of interactions you need to model in your game-play without creating a lot of that infrastructure yourself.

TL;DR; Performance is rarely a noteworthy consideration for things you should consider scripting to begin with. If you've chosen a scripting language with performance as your primary concern, you've probably traded away more worthwhile features to get it.

i always hear people saying scripting languages are leaps and bounds easier to use so thats actually one of the reasons i want to know what is meant by gameplay because im a fairly new programmer (started about 6 months ago learning c++), i am much more comfortable in c++ but i have no issues in learning a new language e.g skookumscript if it will help in the long run. i guess i will look beyond performance and see what features that different scripting languages bring to the table and see where they could fit into my workflow

This topic is closed to new replies.

Advertisement