iDevGames Forums
Building a game building tool - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Programming Languages & Scripting (/forum-8.html)
+--- Thread: Building a game building tool (/thread-2683.html)



Building a game building tool - leRiCl - Apr 8, 2008 05:00 AM

Aim: Hide lower-level details (eg. compiler flags, finding array lengths [in C], etc) from non-programmers so they have an easier time learning how to program without resorting to learning [some-specified-language-frequently-prescribed-for-beginners-that-i-wont-tell-you-to-avoid-flames] as their first 'real' programming language simply because C is too low-level.

I am planning to make a game-building-tool (Could just as well be app-building-tool, but I'll start with game first).

It'll consist of a Lua interpreter, interpreting Lua code, linking to C functions. The C functions maybe, eg "draw_line(x1,y1,x2,y2)" , "load_image("image.png")".

The target audience will be non-programmers, though it can be used by more advanced programmers too. (I don't see why they need to... They'd just make the skeleton thing of this again (without any functions added, of course) in 5 minutes, like I have already done). Once these non-programmers get acquainted with programming in Lua, they have the opportunity to add their own C functions to access from Lua, and perhaps share them as well, and hopefully learn C in the process.

By using cross-platform libraries this should be cross-platform too. However, if including an IDE it'd probably have 3 versions. I'd like this to be a GPL project with people contributing, but not during the initial stages.

Note that C is not my "home-language" and I'd probably take months to get a 0.1 version up and running, if at all.

(This is somewhat similar to Processing and PlayKode).

Please comment: , eg "bad idea, Processing does this already", "it won't work", "XXX language is easier", "you can make this better through XXX", "you suck".. etc...


Building a game building tool - PatrickA - Apr 8, 2008 05:16 AM

lol, funny last part of post.

Are you talking about a game engine?


Building a game building tool - leRiCl - Apr 8, 2008 05:27 AM

PatrickA Wrote:lol, funny last part of post.

Are you talking about a game engine?

Its probably going to look like and be in the same class as Processing/BlitzMax/PlayKode/TNTBasic, though without having to make my own compiler or use a virtual machine. For now, it is a "game" engine because I haven't done any of the IDE part.


Building a game building tool - PatrickA - Apr 8, 2008 07:41 AM

How would it work?


Building a game building tool - stevejohnson - Apr 8, 2008 10:18 AM

How is this different from Processing or python+pyglet/pygame? I'm not trying to shut you down, I'm just curious.


Building a game building tool - SethWillits - Apr 8, 2008 10:25 AM

The first question I have is: Why?

Are you trying to make something that other people will use, or are you trying to make something so you can learn and say you made something?


Building a game building tool - Leisure Suit Lurie - Apr 8, 2008 03:01 PM

Make it as much like GameMaker as humanly possible...er...the pc GameMaker, that is.

No offense to Al meant.


Building a game building tool - leRiCl - Apr 8, 2008 03:27 PM

diordna Wrote:How is this different from Processing or python+pyglet/pygame? I'm not trying to shut you down, I'm just curious.
It's not too different. Wink Personally I think C + Lua is better than learning a stripped-down version of Java as a first language. I jumped through that hoop; once you reached the limits of processing it takes some effort to get beyond what you know. It is, however, still a very good way to get started in programming. I haven't used pygame or python apps much myself. (I should start.) My intuition says Lua is easier to learn and is faster than Python. It is also easier to embed into C programs.

The small difference: With this C+Lua thing, once the non-programmer is familiar with Lua, the non-programmer would have instant access to C and can add some C knowledge by adding his own C functions one at a time; instead of prowling google hoping to find some information how to make your own Java library because Processing isn't about Java libraries.

But mostly it is providing (in my opinion) a better alternative.
FreakSoftware Wrote:The first question I have is: Why?

Are you trying to make something that other people will use, or are you trying to make something so you can learn and say you made something?
Actually I was planning to make something I can use. Whilst doing that I'll be able to learn and say I am making something Wink. I thought about this and thought maybe if a little extra effort other people can use too.


Building a game building tool - stevejohnson - Apr 8, 2008 04:04 PM

leRiCl Wrote:It's not too different. Wink Personally I think C + Lua is better than learning a stripped-down version of Java as a first language. I jumped through that hoop; once you reached the limits of processing it takes some effort to get beyond what you know. It is, however, still a very good way to get started in programming. I haven't used pygame or python apps much myself. (I should start.) My intuition says Lua is easier to learn and is faster than Python. It is also easier to embed into C programs.
Your logic makes perfect sense and I encourage you to go ahead with your project. While I contest the notion that Lua is easer to learn than Python, they're still both very easy languages to learn, and your Lua+C system sounds easier to extend than Python, if only marginally. In other words, if you write it, I might use it. By the time you've got the core up and running, I might know enough OpenGL to give you a hand with graphics. (My progress is still very slow due to school. Ugh.)


Building a game building tool - leRiCl - Apr 12, 2008 12:16 AM

diordna Wrote:Your logic makes perfect sense and I encourage you to go ahead with your project. While I contest the notion that Lua is easer to learn than Python, they're still both very easy languages to learn, and your Lua+C system sounds easier to extend than Python, if only marginally. In other words, if you write it, I might use it. By the time you've got the core up and running, I might know enough OpenGL to give you a hand with graphics. (My progress is still very slow due to school. Ugh.)
I shall seek your help later on. Wink

Here is an example program with the interpreter:
Code:
dist = distance(0,0,3,4)

print("The distance is ", dist)

dist = distance(0,0,0,0,4,3)

print("The distance in 3D is ", dist)

do_file("do-me2.lua") --Points to another lua file (that file contains only usage of distance() function)

graphics_width=640
graphics_height=480


graphics_mode(graphics_width,graphics_height,'s') --beginning with 'f' = fullscreen
--anything else= not , so right now, window mode

i=0
while poll_event()==-1 do -- poll_event returns (-1) when no event.
i=i+1;
rect(0,i,50,50) --(x,y,width,height)
draw_frame() --calls SDL_GL_swapbuffers
empty_frame() --calls glClear()
end

graphics_delay(800) --pause for 0.8 seconds
Don't hold your breath just yet, I have just used every single C function I have implemented