The Jump Framework (prerelease)

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

The Jump Framework (prerelease)

Post by Robin »

Presenting: Jump, a framework for platform games.

As you might infer from the name, it is based on the code Jump Game, adding some abstraction. I will include the Cloud library, only less specific, and named Dynamic Backgrounds. I have not much code to show as of now, so I have no upload yet. (Uploaded file)

I have done one specific thing already: I use the module table as global table, so I don't have to write (for example):

Code: Select all

jump.types[jump.objects[name].type]
but can use just:

Code: Select all

types[objects[name].type]
Note I'm not polluting the global namespace, I just put all the library functions inside a function called LOAD_JMP(), and used:

Code: Select all

setfenv(LOAD_JMP, jump)
Edit: uploaded the beginnings of the framework.
Attachments
jump.lua
Not much yet...
(2.16 KiB) Downloaded 170 times
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: The Jump Framework (prerelease)

Post by bartbes »

You might want to check out the module function in the manual (don't forget to pass package.seeall)

EDIT: And, sure, I'll look at this next time I attempt to create a platformer
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: The Jump Framework (prerelease)

Post by Robin »

bartbes wrote:You might want to check out the module function in the manual (don't forget to pass package.seeall)
I vaguely remember such a function... I'll check it out tomorrow.
Help us help you: attach a .love.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: The Jump Framework (prerelease)

Post by Robin »

Forgot to reply :oops:. But anyhow: I checked it out, and there was some pretty heavy criticism on the module() function, so I decided against it.

Also: I improved it somewhat. For example: it no longer needs a function to contain the environment. I forgot what else I've done (it has been a while!).
Attachments
jump.lua
Now 2% less crap
(2.08 KiB) Downloaded 133 times
Help us help you: attach a .love.
User avatar
Xcmd
Party member
Posts: 211
Joined: Fri Feb 13, 2009 10:45 pm

Re: The Jump Framework (prerelease)

Post by Xcmd »

I highly recommend you rename this to Jümp. I'll pronounce it with a hard Svenska accent. "Joooomp" It already makes me chuckle.

Also, good on you. I hope this comes along for you.
We don't borrow, we don't read, we don't rent, we don't lease, we take the minds!
paclito
Prole
Posts: 35
Joined: Wed Apr 22, 2009 8:33 pm

Re: The Jump Framework (prerelease)

Post by paclito »

Why don't write a example of the framework? I think it's more easy to understand what you are trying to do... isn't?
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: The Jump Framework (prerelease)

Post by Robin »

Great idea... I'll do it when I get a round tuit. :P
Help us help you: attach a .love.
User avatar
osgeld
Party member
Posts: 303
Joined: Sun Nov 23, 2008 10:13 pm

Re: The Jump Framework (prerelease)

Post by osgeld »

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: The Jump Framework (prerelease)

Post by Robin »

Oh, and I have to study, so I guess it'll have to wait until... next week (dun dun dun...)
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 66 guests