playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - krmko

Pages: 1 2 [3] 4 5 ... 29
31
Playmaker Help / Re: Colliders problem
« on: November 06, 2017, 04:13:40 AM »
I do, it goes like this:

Player - Collider2D with non IsTrigger, Player Layer
     Gunpoint - Collider2D with IsTrigger, as attached in the image, Gunpoint Layer
          PulseGunLevel1 - Disabled Collider2D with IsTrigger, Pickup Layer

Actually the PulseGunLevel1 which is a child of Gunpoint object is the same object that Gunpoint should collide with (that means there are two instances on the scene). Since they both spawn on runtime, that is the reason that i have, for testing purposes, disabled the collider on the prefab, so it stays disabled on the instance childed under the Gunpoint object, and i enable it manually on the pickup instance. I made so many layers to make sure nothing collides unintentionaly since there's obviously a problem.

32
Playmaker Help / Re: Colliders problem
« on: November 06, 2017, 04:02:03 AM »
Sorry, i forgot to mention i activate it on runtime since same weapon objects are on the gunpoint and as a pickup, and i still didn't make the fsm to activate it or not whether it has a parent or not, so disregard that and consider it active.

33
Playmaker Help / Colliders problem
« on: November 06, 2017, 03:11:38 AM »
I'm having a banal problem, and i can't believe what's happening. I've got the Gunpoint Object that is attached as a child of the player, with these settings:




When it comes in contact with Pickup in the scene




an event should be triggered





I've set the Layer Collision Matrix, Z positions are aligned (2D game, everything uses 1 for Z transform value), i even tagged the Pickup Prefab, but still no collision is detected. I must be missing something banal, i tried all sorts of combinations of rigidbody types, istrigger checked or not, discrete/continuous collision detection and nothing works  >:( >:( >:(



34
Playmaker Help / Re: Help with reactoring FSM
« on: November 05, 2017, 10:06:25 AM »
I'm afraid i don't understand your advice, but i made it quite simple.

Tag represents a weapon type, when weapon is picked up, it compares tags of the pickup and active weapon. If they match, you go to upgrade state. If they don't match, you go to replace state.
 
Upgrade state: All the weapons are WeaponNameWeaponLevel (Weapon1, Weapon2...to Weapon5). We already have the weapon tag which led us to upgrade state of the Active Weapon. We get the last right character of the Active weapon string, convert it to integer, add 1, and covert it back to string. Then we get the active weapon string lenght, subtract 1, and get left character in that length (that's weapon name without level). Build two strings into a new one and call it out if a hashtable.

Something similar is for replace, only you don't add 1 to converted string integer, you just delete the last character of the weapon pickup string and append the active weapon string last character.

All that's left to do is make a check if active weapon level is already at five to abort the upgrade since it's at maximum level.

Pretty neat and only in couple of states, in comparison to a monster fsm applied to every weapon object.

35
Playmaker Help / Re: Need Help for Timer
« on: November 05, 2017, 04:03:58 AM »
Why not try limiting fps?

36
Playmaker Help / Re: Using Easy Save to save Prefabs/Game Objects
« on: November 05, 2017, 03:43:58 AM »
Keep inventory in hashtable, and save it in another when you're saving, the load from that one to inventory hashtable when loading.

37
Playmaker Help / Re: Help with reactoring FSM
« on: November 05, 2017, 02:18:57 AM »
To make it more clear, this is how would it look



@Djaydino

Well that's ok, but what with name? Let's say i have PulseGun3 with tag PulseGun equipped and i pickup another PulseGun. We can name it whatever and put whatevet tag we want to identify it, but i don't think that makes it easier.

I'm trying to avoid any of the logic on the weapon pickup, though it seems easiest to do it that way.


38
Playmaker Help / Re: Help with reactoring FSM
« on: November 04, 2017, 03:10:22 PM »
Sorry, double post.

39
Playmaker Help / Help with reactoring FSM [SOLVED]
« on: November 04, 2017, 03:08:18 PM »
Hi guys,

I while ago i made a weapon pickup and upgrade FSM system which was quite complicated and needed to be in every weapon to be functionable. Recently i got an idea to make a centralized system for that, but i'm hitting some walls.

Here's the setup:

I've got a hash table of all player weapons objects with key being their names (PulseGun1, PulseGun2 to PulseGun5...every level of weapon is considered a new weapon, but they share the same tag, PulseGun).

On the player, where the pickup system will be located, i have active and inactive weapon. So, when i hover over the pickup weapon, i compare the active weapon tag (let's say it's PulseGun, but we don't know of what level since levels 1-5 share the same tag) with pickup weapon which is also tagged PulseGun.

In that case, if we have PulseGun3 as active weapon, it should be upgraded to PulseGun4 since we picked up the weapon of the same type/tag.

Now, since we have no idea which tags matched on runtime, we need to to another tag check. Is Active Weapon X tag? No. Is Active Weapon Y tag? No. That would take maximum 30 iterations (total weapon number) until we get to is Active Weapon PulseGun Tag? Yes! Now all we need to do is run another check, this time by name. Is Active weapon name PulseGun1? No. Is active weapon name PulseGun2? No. Is Active Weapon Name PulseGun3? Yes! Despawn Active Weapon and Spawn PulseGun4 as active weapon.

Now this doesn't take much (35+ iterations top for each weapon), but it's a hell of a lot of states. I could make multitag and multistring comparison actions to shorten everything to two states (one for checking weapon tag PulseTag and one for checking weapon String, PulseGun1, PulseGun2...) But it still requires a lot of typing and is poorly scalable, especially if i pickup a weapon that's differently tagged than Active Weapon. In that case i'd need to check tag and name of Active Weapon to get to the information of which level is the Active Weapon and the replace it with the same level of Pickup Weapon, which is horrible.

Any advice on this one?

40
Playmaker Help / Re: Need advice on data driven design
« on: November 04, 2017, 11:11:22 AM »
As far as i have read, they're basically the same as getting an array item by index number, so that's cool. I'm storing variables and references, simple data types mostly split into several hashtables, so it should be fast as hell since it takes a lot more complicated FSM's to avoid working with globals.

Great idea, i'll play a bit.

41
Playmaker Help / Re: Datamaker not working
« on: November 04, 2017, 03:58:59 AM »
I tried it in a fresh project and it's ok, but installing xml/json datamaker package with existing arraymaker causes problem with two actions, i'll let you know which.

Edit: Hashtablegettype.cs, arraylistgettype.cs don't work if you have arraymaker imported and then import datamaker xml/json.

42
Playmaker Help / Re: Need advice on data driven design
« on: November 03, 2017, 01:39:31 PM »
Luckily, globals can be opened in nice readable spreadsheet format, easily converted to xml, and be used to populate hash tables. Also, xml can be easily edited by ms xml editor. Regarding that, easy save 3 is in beta and is not supporting xml and json until full release comes out (unfortunately, it won't be backwards compatible with es3) and frankly, by watching djaydino's tutorials, i don't think i feel quite comfortable yet with xquery nor i have that amount of data to find that complicated setup useful in the long term.

So, my question is, are hash tables fast and good enough way of storing data? They're quite convient for me and can be easily manually populated.

43
General Discussion / Re: Playmaker version of Inheritance?
« on: November 03, 2017, 11:48:24 AM »
I tried it out, good stuff!

44
Playmaker Help / Re: Particle System Renderer: Animate Length Scale
« on: November 03, 2017, 05:38:05 AM »
You're the man  8) 8) 8)

45
Playmaker Help / Need advice on data driven design
« on: November 03, 2017, 04:40:45 AM »
Hi guys,

A while ago i had a suggestion for the option to export/import global variables into a spreadsheet for easier editing. Jean and Djaydino were appaled by the number of global variables i use at the moment (more than 800). For me, it was the most logical way to store data since i could access it from anywhere in the project. I was a beginner and i felt that using local variables is too limiting, especially when time comes to tweak things like attack or health points of certain enemies for example. Downside to that approach (besides security and naming), as i noted further down the road, is the impossibility to manipulate it in a more meaningful way than variable by variable in a closed Playmaker environment. Besides that, local variables that don't draw data from a data source are easy to mess up and hard to debug sometimes.

In terms of programming, i'm currently in the phase of knowing more each day, but aware that i actually have more and more to learn. As a method of learning, i decompiled a lot of stuff made in Unity by opening .dll files with Resharper. I noticed that majority of games use JSON for data storing (with XML as the second most used format). I also bought Easy Save as a very praised solution which uses neither XML nor JSON, but claims to be faster than both (tho i don't care about the fast part, easy got my attentiom) but i don't know how easy is to edit those files since they are in their own enclosed binary format. They have their own editor, but that seems as handy as editing 800 globals in Playmaker (not handy at all ;D).

Why am i asking this now? I'm starting to bump into limitations. The way i work has 0 reusability and making things interesting and with variety is starting to take too much time copying and pasting the same things over and over to get a sense of controlled randomness.

The game i'm working on is an endless shmup and i want to be able to store everything and just call it as needed.

I want to create an enemy that will draw an image, flying pattern, shooting pattern, hp, attack points, armor type, bezier path points and everything else from a data structure in the format that is easy to store, read and edit. Furthermore, i want to be able to easily make subsets and combinations of data. As far as i have seen, for something like that i need multidimensional arrays (probably) and JSON seems the best suited for something like that.

One last thing i need is the advice on most painless way to refactor the existing FSM's and stored global and local variables (exporting and rearranging to empty data structures).

Any advice is more than welcome. I attached a dummy basic data structure of how enemy objects i imagine to work like, it's basically like deriving classes and adding methods.










Pages: 1 2 [3] 4 5 ... 29