Game
Great Ape
6 years ago

In-game Level Editor: Transforming and other stuff


Hi, it’s me, Oskar, the programmer of Great Ape. I’m back with another (hopefully) interesting devlog.
Last week I wrote about my custom made Inspector in my in-game level editor.
I have now made a simple Transform tool so you can actually, well, transform objects. I have also coded a few gameplay elements by request of other group members. These are things like modifying old code and adding logic triggers!

Transform Tool

Like mentioned above, I have since last time made a simple Transform tool which actually took quite a bit of time. Not because the tool is advanced, rather that I looked for complete solutions that I could easily implement. Those solutions did not work out because of camera trouble because of me using a RenderTexture in the level editor canvas that is using a camera further away that’s capturing the actual level.
So because of raycasts and whatnot this did not work out, which is sad since it was kinda cool. You can check out the source code for one of them on GitHub.

5d0a7d10860b2.gif

The tool I made was just using clicking on the object, which I already could, and checking the delta position of the mouse and then transforming the component selected. Switching between the modes is done using the standard W,E,R keyboard combo.
There’s really nothing special about the tool, it’s just there.

Gameplay elements

During the last week I also worked on some gameplay features. Great Ape is, as you probably know from other devlogs, a puzzle platformer so we needed some more “puzzle” objects.
I started by making a “TriggerObject” that uses the built-in UnityEvent. It’s easy to use since UnityEvent is already serialized in the Editor and it makes adding functions the same as with UI Buttons. The only bad thing with this is probably that UnityEvents has a fair bit more of overhead than normal C# delegates.

5d0a7d13a352f.gif

Now I just needed to make something to actually interact with in the game so I conjured up a lever and weight-activated button.
The lever was easy, just checking a trigger to see if an Ape entered and then allowing the user to press ‘E’ or whatever.
The button is made using three raycasts checking all objects colliding with it to see if it’s either an Ape or a physics object. The apes then have their own weight variable and the physics object uses the RigidBody2D mass.
The script also places all the objects in a list to check that we don’t add the same object twice.

5d0a7d165954a.gif

I also allowed the user to make small changes like having the button only be used once and stuff like that.
The TriggerObjects don’t send any special values by themselves, only what’s specified in the Inspector when adding an action the UnityEvent. This makes you have to design all methods in a “Toggle” sense where they themselves have to invert the action by using some kind of “on-state” or the like. For example this Door script:

		
			Vector3 goal = (open) ? orgPos : goalPos;
open = !open;
		
	

Not too much work, just a bit of a nuisance.
Otherwise the TriggerObjects work just fine.

5d0a7d1900077.gif

Ending

This was the progress made in the last week which included both editor and gameplay coding. I also helped my fellow devs with programming stuff during the week to make the game as great as possible.
Sadly, this school project only has another week of time left so I probably won’t see everything I want in the level editor.
So, next week I’m planning on writing about hopefully having the level editor useable for players. I will also write a short summary about what I wanted to but couldn’t implement in the project that simply took too much time…
So on that sad note, see you next time!



0 comments

Loading...

Next up

Heya! I wanted to show some gameplay progress i made so far. I hope you like it ^^

In the quest for accessibility, I'm adding Resurrection Shrines for players on the 'novice' end of the platforming spectrum.

In order to unlock the power of a Shrine, you must collect 3 'Souls' from your dead corpses! (the floating blue orbs)

Update 2.627

New challenges & new effects!

Horror WIP A track that will be featured in a future horror game soundtrack! Stay tuned!

Likes appreciated ✌️

#gamedev #composer #horrorgame #indiegame #IndieGameDev #soundtrack

Made my first ever animation.

Let me introduce you to the new Mech line: Gendai Spec. Those are Mech that specializes in surprise attacks, covered operations, and stealth. They are equipped with melee weapons but one of Gendai's frames supports sniper rifles.

I did this on my 3DS ^^ #Kirby

Colorful Fox

Happy Late Easter!

Development of my game Juno. This is the rune equipment system.

Usually update over on twitter: https://twitter.com/synrec_kaisyl

Among us_into Madness