Sidescroller help?
Displaying 1-7 of 7 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Almostpeaceful74

would anybody happen to know how one might use v3 to make side-scrolling levels in maped? has it been done?

Posted on 2010-11-03 20:16:16

mcgrue

It's been done. In verge 3, Mademoiselle comes to mind http://ziniz.music.googlepages.com/mademoiselle.zip (it won the Dec 2008 competition).

In verge 2 (with even less resources) Zaratustra made Zeux's World.

Posted on 2010-11-04 12:28:06

Almostpeaceful74

Awesome, thanks-
there's just one problem: je ne parle pas de lua

Should i just bit the bullet and learn? Or is there a way to do something similar in vc?

Posted on 2010-11-05 16:43:40

mcgrue

I've been biting said bullet lately myself. you can find help in #verge on irc.lunarnet.org if you drop by.

Posted on 2010-11-06 17:08:45

Overkill

Lua's honestly the way to go nowadays. Although you'll have some headaches getting around how the language does stuff at first, it gets nicer. I wrote a sidescroller engine in Lua, but its release is awaiting the completion of a certain game I'm writing.

If you insist on using VC, and want some ideas for a VC-based sidescroller though, check out this thread from a few years back: http://verge-rpg.com/boards/display_thread.php?id=130052

Posted on 2010-11-07 11:21:22

Almostpeaceful74

Thanks a ton, I think I'll stick with vc for this project, but also devote some time to learning lua, it does seem pretty versatile.

Posted on 2010-11-22 16:05:23

Gayo

I did an (unreleased) sidescroller in VC in V2, which was actually less powerful, so it's definitely doable. However, it was really sprawling and ugly, so I doubt the code would be helpful to show you.

The big snag here is that you probably have to override the entity movement code. Rather than setting an entity to be the player and allowing VERGE to funnel directional keypresses to them, what you'll want to do is skip setPlayer, keep track of who the "player" is yourself, and write your own movement code where you manually shift the entities around using VC. You can still use obstructions, but you need to check manually whether the entity is overlapping with them. If at all possible I would recommend using tile-based obstructions, and handling weird shit like slopes as a special case, because it's way faster.

Anyhow, once you're doing your own processing of this kind, you can't rely entirely on VERGE's own system loop, and you'll need to make your own logic loop that repeatedly executes the game physics at regular intervals. There are a few ways to go about this, but what I did was something like this:

tick_length = 10; // or whatever
while (1) {
   last_time = systemtime
  ShowPage();
   while (last_time < systemtime - tick_length} {
      Execute_Game_Logic();
      last_time += tick_length; // advance forward one tick
   }
  Render();
}


The way this works is you'd store velocity data for each entity, and then use that to update their positions in Execute_Game_Logic. That function would also check the controls to see what buttons you're pressing, and change the player character's behaviour accordingly. You can't rely on movestrings, but you can just give each entity a function to call when it's time for it to move, and have that do any elaborate logic needed.

This is probably not the ideal way to do this, but it worked for me, and it's more or less what Zeux's World does.

Edit: If you're going this far, you don't really even need to use entities, but I find it convenient, since they already have some of the parameters you need, and the engine has various functions built-in that are still useful to you.

Posted on 2010-11-29 04:44:14 (last edited on 2010-11-29 04:46:21)


Displaying 1-7 of 7 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.