## The Jump Framework (prerelease)

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

### The Jump Framework (prerelease)

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...
Help us help you: attach a .love.

bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

### Re: The Jump Framework (prerelease)

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

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

### Re: The Jump Framework (prerelease)

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.

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

### Re: The Jump Framework (prerelease)

Forgot to reply . 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
Help us help you: attach a .love.

Xcmd
Party member
Posts: 211
Joined: Fri Feb 13, 2009 10:45 pm

### Re: The Jump Framework (prerelease)

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)

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?

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

### Re: The Jump Framework (prerelease)

Great idea... I'll do it when I get a round tuit.
Help us help you: attach a .love.

osgeld
Party member
Posts: 303
Joined: Sun Nov 23, 2008 10:13 pm

### Re: The Jump Framework (prerelease)

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

### Re: The Jump Framework (prerelease)

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.

### Who is online

Users browsing this forum: No registered users and 23 guests