Posted: 24th Nov 2011 21:42
Hi, I have purchased AppGameKit and have had it since release, It's working great but I can't find the placement editor anywhere. I looked in the IDE/Utilities folder but it isn't there... I would realy like to try that thool
Posted: 24th Nov 2011 21:59
It's in my IDE/Utilities folder, do you have the latest version?
Posted: 24th Nov 2011 22:21
Yes I just upgraded to 1065, Atleast I think I did, do you have to completley unistall the previous version or is the "repair" feature enough?
Posted: 24th Nov 2011 22:27
I did a complete uninstall myself, didn't try the repair.
Posted: 24th Nov 2011 22:49
You need to uninstall.

Repair just repairs using the old source - as I found out when it complained that the (out of date by two versions) source files had been removed.

I'm hoping they'll start update patches soon as it takes an age to uninstall / reinstall on my system.

But it is Windslows
Posted: 25th Nov 2011 0:22
At least 1065 installs much faster than the previous versions I've tried. Haven't tried uninstalling it but I bet that's faster too. The file size of the installer is much smaller now.
Posted: 25th Nov 2011 10:35
Ok, I updated to 1065 and there it is, Thanks for the help guys!
Posted: 1st Jan 2012 2:09
I have a question. The placement editor seems very straight forward and I thank you for creating it.

When it comes to the assets, say I have wooden planks that are in my media folder and I drag them onto the level. I want to define them as physics objects and set collision so that they will fall down or get destroyed when hit.

Also, I have a media object to knock down the planks, like a hammer, how do I set that as a collision object (or whatever I have to set it as to make it know down the planks)?

How is this done with the viewer example?

Mike
Posted: 1st Jan 2012 11:38
As the code creates each object you can check the name of the image it uses and if you find the one you are looking for just edit the sprite's properties.

I'll be making a tutorial on using the placement editor in this way in the near future but I'll try to make a simple example for you when I get 10 mins to spare

EDIT:
In the placement editor code after this line-
+ Code Snippet
SetSpriteFlip ( id, val ( mirror$ ), val ( flip$ ) )


Check the image name:
+ Code Snippet
if image$ = "Fan1.png"
    `do stuff
    setSpritePhysicsOn(id,2)
    rem or whatever (id is the sprite ID)
endif
Posted: 1st Jan 2012 16:26
I've never managed to get the placment editor to work. I've tried putting image files into the media folder and it still tells me nothing is in there. That's why I'm having a go at making my own editor, but I would use the placement editor if someone can tell me where I'm going wrong.
Posted: 1st Jan 2012 16:29
First of all, is your media jpg or png files? I am using png files. Copy and paste them into the /media folder and then re-run the editor. If you see them on the left, then you can place them.

Mike
Posted: 1st Jan 2012 16:30
SetSpriteFlip ( id, val ( mirror$ ), val ( flip$ ) )

In the placement editor? Is there a place for us to enter our own code or is this to change the source of the placement editor?

Mike
Posted: 1st Jan 2012 16:32
So we are going with the spride ID - that is how we assign code to the sprite? So, for example, I can have the player control the hammer by pressing the space bar or touching it/swiping it on the tablet?

Can we control a swipe on touch devices?

Mike
Posted: 1st Jan 2012 16:36
First of all, is your media jpg or png files? I am using png files. Copy and paste them into the /media folder and then re-run the editor. If you see them on the left, then you can place them.


I'm using png files, I've tried small images and whole tilesheets, still no joy.
Posted: 1st Jan 2012 16:47
Where is your main executeable (the placement editor)?

Mine is under /program files (x86)/the game creators/agk/ide/utilities/placement editor/

Are you running 32 bit or 64 bit?

Mike
Posted: 1st Jan 2012 16:51
I'm a bit confused.

Where in:

SetSpriteFlip ( id, val ( mirror$ ), val ( flip$ ) )

Do we set the image$?

Or is this already done in the editor and viewer for you? I am guessing viewer reads in the text file and places these things in arrays or something.

Also, how does one create multiple levels - just rename the export text file to something else?

Mike
Posted: 1st Jan 2012 16:54
In the placement editor? Is there a place for us to enter our own code or is this to change the source of the placement editor?

There should be some sample code for loading the levels you make with the editor but not on my PC at the moment so I can't check where. I just copied the "placement_editor.agc" file in my project folder and include the code...

Edit:
This is obviously more confusing than I thought. Maybe I'll cover this in the next AppGameKit Bitesize tutorial?
Posted: 1st Jan 2012 16:56
ike


Mine is the same directory as the one you suggested. I'm running 32 bit (Windows XP).
Posted: 1st Jan 2012 17:25
Can you send me one of your graphics and i'll see if it will run on my computer.

Obviously, make sure your programs are 100% up to date.

I'll be out this afternoon, but i'll try it as soon as I get back.

My email addr is admin at mfelkerco dot com.

Mike
Posted: 1st Jan 2012 17:28
Here is the code for the viewer:

+ Code Snippet
// placement editor loading code
#include "placement_editor.agc"

// globals for the placement editor
global dim g_Entities [ 1000 ] as tEntity
global dim g_MediaList [ 1000 ] as tEntity
global     g_iEntityCount = 0
global     g_iMediaCount  = 1
global	   g_fJoystickSpeed#

// load a level using a virtual resolution
LoadFromPlacementEditor ( "export.txt", "virtual" )

// load a level using the percentage system
// LoadFromPlacementEditor ( "export.txt", "percentage" )

// to delete data call
// DeletePlacementEditorData ( )

// our main loop
do
	// scroll the screen
	joystickX# = GetVirtualJoystickX ( 1 ) * g_fJoystickSpeed#
    joystickY# = GetVirtualJoystickY ( 1 ) * g_fJoystickSpeed#

	SetViewOffset ( GetViewOffsetX ( ) + joystickX#, GetViewOffsetY ( ) + joystickY# )

	// update the screen
	sync ( )
loop



Is this the correct script or is it one of the other ones we need to edit?

[edit]I'm beginning to see that we need to create our functions between the do/loop in the main.agc file. The placement_editor.agc file reads in the data created by the actual placement editor application.

OK. Now that I read through all the scripts, I see EXACTLY how this works. Cool. I'll be able to take it from here.

Thanks for your help.

Mike