Welcome, Guest. Please login or register.

Pages: 1 2 [3]
Print
Author Topic: Code review/complaints/discussion  (Read 20720 times)
tZee
Community member

Posts: 190


View Profile Email
« Reply #30 on: August 18, 2009, 03:19:48 PM »

I don't see why they would restrict you to .dat files. I personally found it very irritating and annoying that I had to stick to .dat files and that the save files were not handled as .dat files automatically, when I tested the function. :X

Patch looks good to me, will apply it when I get home. (If no one else is faster. Smiley )

Edit: Patch applied. Thanks. Smiley
« Last Edit: August 18, 2009, 06:31:36 PM by tZee » Logged

superfluid
Community member

Posts: 90


Just another Python Hacker


View Profile Email
« Reply #31 on: August 22, 2009, 08:58:09 PM »

I broke one of my patches up into two to make it easier to cherry pick. They're all at http://2wycked.net/parpg-patches.

I also added another patch to bugfix the toggle renderer keypress handling.

Update: added a patch to fix broken help screen
Update 2: moved inventory code from World to Hud and Inventory
« Last Edit: August 23, 2009, 08:53:26 PM by superfluid » Logged

aka or1andov on IRC
saritor
Guest
« Reply #32 on: September 02, 2009, 09:36:49 PM »

In regards to ticket #66 (http://parpg-trac.cvsdude.com/parpg/ticket/66):

I have put together a patch to introduce a door object to the current game. Right now about the only thing it does is stick the door on the map and allow you to view the examine window (check the attached screenshot to view the location of the door, it should be rather obvious Smiley). Still trying to sort out the actual teleportation aspect of the design since the old stuff seems to somewhat be shrouded in mystery (meaning that MapDoor is called in engine.py but there is no definition for a MapDoor object anywhere and I am slightly confused how it should related with actions and the door object itself).

Anywho, I am not posting the patch to trac right away because I would prefer to just include the teleportation code in a final patch and submit it, but I wanted people to take a look at what I had written so for and made sure I was on the right path in regards to new object creation. Instead the patch should be here as an attachment as well for viewing pleasure.

Thanks,
Saritor

* map_object_creation.patch (4.47 KB - downloaded 325 times.)

* door.jpg (46.5 KB, 642x507 - viewed 573 times.)
Logged
saritor
Guest
« Reply #33 on: September 17, 2009, 09:28:35 PM »

This post is mostly for superfluid, but anyone else who is interested take a look.

I have implemented a door on the shanty that when performing the "Change Map" option on the door it will teleport you to a new location on the map. This is the beginnings of what doors will look like, though I am working on a method for automating the process so that travel between maps does not require you to pop up a context menu, instead you will be able to just walk across a tile or two and it should transport you to the next map.

Patch is diffed against a current svn snapshot.

EDIT: Also if you feel like playing with the place the PC gets teleported to, just crack open <PARPG>/maps/map.xml and search for the following lines

Code:
<!-- A sample door -->
<i x="-2.0" o="shanty-door" z="0.0" y="6.0" r="0" id="shanty-door01" object_type="ShantyDoor" is_open="False"
name="Shanty Door" text="Looks like the entrance to the building." target_map_name="my-map" target_map="maps/map.xml"
target_x="10.0" target_y="10.0"></i>

Then change the target_x and target_y values around some.

* simple_door_teleport.patch (20.21 KB - downloaded 305 times.)
« Last Edit: September 18, 2009, 02:54:26 AM by Saritor » Logged
amo-ej1
Community member

Posts: 80


elie@de-brauwer.be
View Profile
« Reply #34 on: October 03, 2009, 07:07:40 PM »

Saritor, i had a small look on the load/save which fails (http://parpg-trac.cvsdude.com/parpg/ticket/73 ), I commited a small patch which has some overlap with the patch you added here (I thought your teleport code was already checked in), I added basicly support for storing the map name in the gamestate and the map will only be loaded when it is not yet in the game cache.

Logged
saritor
Guest
« Reply #35 on: October 09, 2009, 04:53:16 PM »

Saritor, i had a small look on the load/save which fails (http://parpg-trac.cvsdude.com/parpg/ticket/73 ), I commited a small patch which has some overlap with the patch you added here (I thought your teleport code was already checked in), I added basicly support for storing the map name in the gamestate and the map will only be loaded when it is not yet in the game cache.



I posted a patch to get teleporters and door objects in there.

http://parpg-trac.cvsdude.com/parpg/attachment/ticket/66/teleport_player.patch
Logged
saritor
Guest
« Reply #36 on: October 10, 2009, 10:25:44 PM »

So after much discussion with Kaydeth and amo-ej1 we realized a couple things as of the teleport patch I submitted.

1) Teleporting between maps won't work because loading maps (after the first one has been loaded) is not working.
2) Loading maps is not working because of a couple reasons. One of them is that there are conflicts with object id's not being unique enough when changing maps. (ie, an object can not currently have the same id as another even if its on a different map due to the caching method) We decided to address that by making the Gamestate.objects hash a double hash of map id and object id. The other issue is more or less dealing with FIFE problems that haven't been 100% worked out yet as of this post.

Since they seem to be separate entities I went ahead and added the double hash to gamestate in this patch: http://parpg-trac.cvsdude.com/parpg/attachment/ticket/66/gamestate_double_hash.2.patch
« Last Edit: October 10, 2009, 11:00:33 PM by Saritor » Logged
amo-ej1
Community member

Posts: 80


elie@de-brauwer.be
View Profile
« Reply #37 on: October 11, 2009, 11:38:08 AM »

I merged the double hash patch, also modified map.xml  and map2.xml to make traveling back and forth possible. At this point the 'new' map gets loaded properly (and seems to work). At this point there still is some camera related issues when travelling from map to map2 to map. Which still needs to be taken a look at.
Logged
Kaydeth
Community member

Posts: 185



View Profile Email
« Reply #38 on: October 11, 2009, 03:12:42 PM »

I think we still need to do some work with moving the PC from map to map.

I would like to be able to remove the PC entry from all but the starting map. This will let us modify the PC sprite very easily. In order to do that we need to be able to automatically generate the FIFE instance required on each map.
Logged
maximinus
Community member

Posts: 694



View Profile Email
« Reply #39 on: January 22, 2010, 02:04:18 PM »

Old thread, I'm just reviving because there's a few things I like to fix.

First off the bat:

/scripts/common/utils.py should just be rolled in run.py

It's 4 lines of code that we'll almost certainly never touch again.
Logged

Science is open-source religion
Pages: 1 2 [3]
Print
Jump to: