My Own Lua Graphics Thing
Moderator: Coders of Rage
My Own Lua Graphics Thing
Hey there
I've just started (pretty much) integrating lua with c++, and as a test for myself I decided to see if I could create a c++ program that lets lua use graphics and stuff. Because I've never done something like this before I thought it would be a good challenge, and having started it I'm pleased with what's come out so far.
I was just wondering if this was an all right way to go about practising lua scripting, or if it would be better if I just stuck to making a game in c++ and using lua just for scripting that Kinda stuff.
I've just started (pretty much) integrating lua with c++, and as a test for myself I decided to see if I could create a c++ program that lets lua use graphics and stuff. Because I've never done something like this before I thought it would be a good challenge, and having started it I'm pleased with what's come out so far.
I was just wondering if this was an all right way to go about practising lua scripting, or if it would be better if I just stuck to making a game in c++ and using lua just for scripting that Kinda stuff.
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: My Own Lua Graphics Thing
I mean, it is a fine idea to get practice... That's what LuaPlayer is...
But if your goal is to create a powerful, extendable engine, having Lua perform core functionality like that is a sign of a piss poor engine. You're also going to suffer performance penalties for doing it that way.
So is your goal to make an Engine in C/++ that is extendable through Lua, or is your goal to create a series of wrapper-type C/++ functions that allow entire games to be made in Lua?
But if your goal is to create a powerful, extendable engine, having Lua perform core functionality like that is a sign of a piss poor engine. You're also going to suffer performance penalties for doing it that way.
So is your goal to make an Engine in C/++ that is extendable through Lua, or is your goal to create a series of wrapper-type C/++ functions that allow entire games to be made in Lua?
Re: My Own Lua Graphics Thing
Well, I wan't really trying to make an engine, this was just meant to be practice at my skills of combining the two. I think I'll carry it out till the performance drops, but just keep it at a practice level.
Also, why is lots of scripting a bad engine, Is it because it pushers too much work on the scripter or because it slows it down?
Also, why is lots of scripting a bad engine, Is it because it pushers too much work on the scripter or because it slows it down?
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: My Own Lua Graphics Thing
Yeah.
Because clearly your engine doesn't implement the functionality that it should when a gigantic amount of work is delegated to scripting. It is not the duty of scripting to perform basic tasks that should be handled by the engine.
Because clearly your engine doesn't implement the functionality that it should when a gigantic amount of work is delegated to scripting. It is not the duty of scripting to perform basic tasks that should be handled by the engine.
Re: My Own Lua Graphics Thing
I see your point there ... Thanks for the advice
- MadPumpkin
- Chaos Rift Maniac
- Posts: 484
- Joined: Fri Feb 13, 2009 4:48 pm
- Current Project: Octopia
- Favorite Gaming Platforms: PS1-3, Genesis, Dreamcast, SNES, PC
- Programming Language of Choice: C/++,Java,Py,LUA,XML
- Location: C:\\United States of America\Utah\West Valley City\Neighborhood\House\Computer Desk
Re: My Own Lua Graphics Thing
Here's something quite similar to what you're asking. Love 2D I just discovered it a few days ago. It's really quite interesting but as Falco has already stated having that much functionality and having lua handle all of it is really not a good idea because it will most definitely slow down your engine. Most games with Love 2D look like the lua is in the .exe file though. Not quite sure how it works, haven't bothered to download it.
Anyways, if you would like to read and get ideas from it have fun, if you just want to use it that's cool whatever. But I recommend if you're going to be implementing what you said, into an engine. DON'T use it in the final version, maybe for testing or seeing if you can and what have you.
Anyways, if you would like to read and get ideas from it have fun, if you just want to use it that's cool whatever. But I recommend if you're going to be implementing what you said, into an engine. DON'T use it in the final version, maybe for testing or seeing if you can and what have you.
While Jesus equipped with angels, the Devil's equipped with cops
For God so loved the world that he blessed the thugs with rock
For God so loved the world that he blessed the thugs with rock
-
- Chaos Rift Newbie
- Posts: 22
- Joined: Mon Mar 14, 2011 11:43 pm
- Programming Language of Choice: C++
Re: My Own Lua Graphics Thing
In windows you can embed the lua scripts into the exe by using a resource scipt (.rc)
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: My Own Lua Graphics Thing
It's not like that's any faster. It's just ensuring people can't tamper with them. (and not even completely doing that).
-
- Chaos Rift Newbie
- Posts: 22
- Joined: Mon Mar 14, 2011 11:43 pm
- Programming Language of Choice: C++
Re: My Own Lua Graphics Thing
From what I've read love2d doesn't store anything inside in the exe file. It stores everything inside a .love file like what flash does with .swf files.MadPumpkin wrote:Here's something quite similar to what you're asking. Love 2D I just discovered it a few days ago. It's really quite interesting but as Falco has already stated having that much functionality and having lua handle all of it is really not a good idea because it will most definitely slow down your engine. Most games with Love 2D look like the lua is in the .exe file though. Not quite sure how it works, haven't bothered to download it.
Anyways, if you would like to read and get ideas from it have fun, if you just want to use it that's cool whatever. But I recommend if you're going to be implementing what you said, into an engine. DON'T use it in the final version, maybe for testing or seeing if you can and what have you.
- MadPumpkin
- Chaos Rift Maniac
- Posts: 484
- Joined: Fri Feb 13, 2009 4:48 pm
- Current Project: Octopia
- Favorite Gaming Platforms: PS1-3, Genesis, Dreamcast, SNES, PC
- Programming Language of Choice: C/++,Java,Py,LUA,XML
- Location: C:\\United States of America\Utah\West Valley City\Neighborhood\House\Computer Desk
Re: My Own Lua Graphics Thing
Ahh, so I read this, but it appears that you can convert .love files into .exe's because the game I downloaded made in love2D was a .exe file
While Jesus equipped with angels, the Devil's equipped with cops
For God so loved the world that he blessed the thugs with rock
For God so loved the world that he blessed the thugs with rock
- TheBuzzSaw
- Chaos Rift Junior
- Posts: 310
- Joined: Wed Dec 02, 2009 3:55 pm
- Current Project: Paroxysm
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Contact:
Re: My Own Lua Graphics Thing
What's wrong with letting people tamper with them?
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: My Own Lua Graphics Thing
Seriously. I understand the need to prevent mass pirating in commercial games, but I don't seen anything wrong with leaving some things to be modified. I also don't like being told I'm not allowed to break apart software (or hardware) I legally purchased for personal use.TheBuzzSaw wrote:What's wrong with letting people tamper with them?
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: My Own Lua Graphics Thing
You guys have to beat ES first, then you can fuck with our Lua...dandymcgee wrote:Seriously. I understand the need to prevent mass pirating in commercial games, but I don't seen anything wrong with leaving some things to be modified. I also don't like being told I'm not allowed to break apart software (or hardware) I legally purchased for personal use.TheBuzzSaw wrote:What's wrong with letting people tamper with them?
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: My Own Lua Graphics Thing
I'm fine with that.GyroVorbis wrote:You guys have to beat ES first, then you can fuck with our Lua...dandymcgee wrote:Seriously. I understand the need to prevent mass pirating in commercial games, but I don't seen anything wrong with leaving some things to be modified. I also don't like being told I'm not allowed to break apart software (or hardware) I legally purchased for personal use.TheBuzzSaw wrote:What's wrong with letting people tamper with them?
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
- TheBuzzSaw
- Chaos Rift Junior
- Posts: 310
- Joined: Wed Dec 02, 2009 3:55 pm
- Current Project: Paroxysm
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Contact:
Re: My Own Lua Graphics Thing
Seriously, I respect "the original". I wouldn't cheat at all during a first playthrough. But seriously, don't lock down the Lua at all. No binary encryption nonsense.