Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement vehicles #434

Merged
merged 11 commits into from Mar 17, 2015
Merged

Implement vehicles #434

merged 11 commits into from Mar 17, 2015

Conversation

@Zegeri
Copy link
Member

@Zegeri Zegeri commented Mar 15, 2015

This won't compile properly until EasyRPG/liblcf#132 is pulled.

Things that work now:

  • Render vehicles
  • Board, drive and unboard vehicles
  • Ascend, fly and descend airships
  • Teleport vehicles
  • Move events with vehicles
  • Save/Load persistence, even when the vehicle is in a different map

Things that don't work:

  • Shadow under a flying airship (won't fix in this pull request)
  • Board a vehicle outside the borders of the map

Also fixed a bug where messages won't terminate if they're in a parallel interpreter, like in the opening of Ahriman's prophecy.

Closes #219.

@Ghabry

This comment has been minimized.

Copy link
Member

@Ghabry Ghabry commented on src/game_vehicle.cpp in 181d0d1 Mar 7, 2015

Should be "descension" for consistence

@Ghabry
Copy link
Member

@Ghabry Ghabry commented Mar 15, 2015

Jenkins: test this please <3

Zegeri added 3 commits Mar 15, 2015
On foot, ignore upper tiles that are passable above. In vehicles, if an
upper tile isn't passable above, it is unpassable. A vehicle can't go
through other vehicle.
Game_Vehicle* vehicle;
for (int i = 1; i <= 3; ++i) {
vehicle = Game_Map::GetVehicle((Game_Vehicle::Type) i);
if (vehicle->IsInCurrentMap())

This comment has been minimized.

@scurest

scurest Mar 15, 2015
Contributor

The vehicles will only be visible if they're on the map when the spriteset is created then. Since Game_Vehicle::GetVisible checks if they're in the current map, how about just removing this check and pushing them on unconditionally?

This comment has been minimized.

@Zegeri

Zegeri Mar 16, 2015
Author Member

That would be slightly slightly slower, because it would update those sprites each frame even if they're not visible. However, the performance difference would be minimal, but I don't see what harm is this check doing.

This comment has been minimized.

@scurest

scurest Mar 17, 2015
Contributor

If the vehicle is off map, and then an event puts it on map with Set Vehicle Location, the vehicle will be invisible (since it has no sprite). You can test it in eg. OFF at a pedalo recovery point: use --start-map-id 53 --start-position 15 9 (you'll be directly below the Elsen), kill him, and call a pedalo.

@Ghabry
Copy link
Member

@Ghabry Ghabry commented Mar 16, 2015

Scurest makes a valid point.
Entered the boat in Don's Adventure Game and it worked well. Good job.
Nothing to complain from my side functionality and code wise.

@scurest
Copy link
Contributor

@scurest scurest commented Mar 17, 2015

5ccb42b will slow the vehicle's "stepping" speed down. They go between their left-middle-right-middle frames at the same rate as an event at 1/8 move speed, even though they actually move much faster than that.

@Ghabry
Copy link
Member

@Ghabry Ghabry commented Mar 17, 2015

I think its easier when we just merge it and you submit your patches via another PR @scurest

@scurest
Copy link
Contributor

@scurest scurest commented Mar 17, 2015

Ah, ok.

Ghabry added a commit that referenced this pull request Mar 17, 2015
@Ghabry Ghabry merged commit 6158831 into EasyRPG:master Mar 17, 2015
1 check passed
1 check passed
@fdelapena
default Merged build finished.
Details
@scurest scurest mentioned this pull request Mar 18, 2015
@Zegeri Zegeri deleted the Zegeri:vehicles branch Apr 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants