Hello everyone.
I'm a CS student on my first year and my next class project is to code in C a steganography program to hide text in a pgm image. I decided I wanted to take it a little further and turn it on a fully functional program. The idea would be to write an graphic interface with Lua/LÖVE2D. The only thing I'm not sure is, is it possible or functional? Could I write a C program which calls a Lua script that uses löve?
Löve2D with C?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Löve2D with C?
It's possible I guess, though love is c++. That said, I very much doubt your assignment allows for this..
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Löve2D with C?
You could do the opposite: a love program that calls C functions. You would have to wrap the C functions into Lua-callable functions/objects. It would not be easy, I don't recommend it for an assignment - do it in your free time instead.
When I write def I mean function.
- Hexenhammer
- Party member
- Posts: 175
- Joined: Sun Feb 17, 2013 8:19 am
Re: Löve2D with C?
It should be the other way around if your GUI is in LÖVE. You simply write your text hiding program as a console app and then call it from the LÖVE GUI using os.execute().Abello966 wrote:Hello everyone.
I'm a CS student on my first year and my next class project is to code in C a steganography program to hide text in a pgm image. I decided I wanted to take it a little further and turn it on a fully functional program. The idea would be to write an graphic interface with Lua/LÖVE2D. The only thing I'm not sure is, is it possible or functional? Could I write a C program which calls a Lua script that uses löve?
Making sure that your C program works without the LÖVE GUI also makes sure that you don't get into trouble for not fulfilling the requirements of your assignment.
A more advanced solution would be to write a text hiding library in C and integrate it into LÖVE (you can link a C lib with a C++ app). That way you could build the whole thing as one coherent program. And you could still write a small console app in C using said library to fulfill the requirement of handing in a pure C program.
Re: Löve2D with C?
Thank you, guys.
Yes, the idea was never to hand the project with LÖVE to my teacher, just write the pure C program and turn it in, then later build a visual interface to integrate it, in my spare time
What I am going to do then is write all the functions I'll need in C and call them from a Lua/LÖVE2D program.
Yes, the idea was never to hand the project with LÖVE to my teacher, just write the pure C program and turn it in, then later build a visual interface to integrate it, in my spare time
What I am going to do then is write all the functions I'll need in C and call them from a Lua/LÖVE2D program.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests