LuaTroid (is only a clone in terms of mechanics)

Show off your games, demos and other (playable) creations.
MaskedRetreiver
Prole
Posts: 22
Joined: Sat Sep 25, 2010 4:13 pm

LuaTroid (is only a clone in terms of mechanics)

Post by MaskedRetreiver »

LuaTroid is definitely still at the Technical Demo stage, but I thought I'd throw it up and see if anyone's got flags to throw or wisdom to impart given what's there so far:

http://github.com/MaskedRetriever/LuaTroid

Navigate with w, a, and d keys, tilde key to bring up the tile selector, mouse and drag to draw tiles, and 1 enters debug mode. All the graphics are CC'd so feel free to snag them if my lame blendArt somehow catches your fancy.

*edit: oh and obviously a lot of mechanics such as any kind of collision detection and a screen more than one screen wide are conspicuously absent...
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: LuaTroid (is only a clone in terms of mechanics)

Post by Jasoco »

The player moves extremely slow. Are you using Delta Time? (dt)
MaskedRetreiver
Prole
Posts: 22
Joined: Sat Sep 25, 2010 4:13 pm

Re: LuaTroid (is only a clone in terms of mechanics)

Post by MaskedRetreiver »

Um, yes? dt is probably on the list of things I Don't Know Any Better on. It seems alright on my system but I know I'm not optimizing a lot of things properly yet...
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: LuaTroid (is only a clone in terms of mechanics)

Post by Robin »

It seems the player moves .2 pixels per frame...
Help us help you: attach a .love.
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: LuaTroid (is only a clone in terms of mechanics)

Post by Jasoco »

DT is easy. You just multiply the number of pixels per second * delta time. If you want your player to move 256 pixels in a second do 256 * dt. If you want to do a timer to count down to something else, you do number of seconds * delta time. It's that simple.

What kind of super machine do you have that you don't get any slowdown at all?
MaskedRetreiver
Prole
Posts: 22
Joined: Sat Sep 25, 2010 4:13 pm

Re: LuaTroid (is only a clone in terms of mechanics)

Post by MaskedRetreiver »

I think there must be something else wrong as I don't have /that/ great a machine. (It is a quad-core modern machine but it's by no means a gaming rig.) Either I didn't fix the code so it's not regenerating the map every step or there's a version incompatibility I'm missing. I'll run more tests on that soon--

...it sure LOOKS like I have the right code for pasting the whole map to a single image... :ehem:

I am using dt as the controller for how fast the player moves, so that's not the problem...
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: LuaTroid (is only a clone in terms of mechanics)

Post by Robin »

MaskedRetreiver wrote:I am using dt as the controller for how fast the player moves, so that's not the problem...
Not on GitHub you don't.
Help us help you: attach a .love.
MaskedRetreiver
Prole
Posts: 22
Joined: Sat Sep 25, 2010 4:13 pm

Re: LuaTroid (is only a clone in terms of mechanics)

Post by MaskedRetreiver »

Okay, first, wow thanks for digging that deep, and second yeah I totally misunderstood how that function works. Definitely on my list for another night's experiments. (Tonight I got to successfully identifying if the player is over a specific tile, paving the way to actually landing on platforms.)

Any other advice on graphics optimization? I've already worked out that I'm going to need to switch to Quads at some point for better render speed on the backdrop, and that I pretty much can never go back to drawing one tile at a time, but beyond that I'm kind of flailing around.

EDIT: Okay that was easier to fix than I thought. Updated version now available on GitHub.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

Re: LuaTroid (is only a clone in terms of mechanics)

Post by TechnoCat »

Heh, it doesn't take more than a minute to walk across the room anymore. :crazy:
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LuaTroid (is only a clone in terms of mechanics)

Post by bartbes »

MaskedRetreiver wrote: Any other advice on graphics optimization? I've already worked out that I'm going to need to switch to Quads at some point for better render speed on the backdrop, and that I pretty much can never go back to drawing one tile at a time, but beyond that I'm kind of flailing around.
You might want to take a look at SpriteBatches, or Framebuffers (0.7.0).
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests