VR1 - Spell Casting Simulator


#1

In our free time my brother and I have been prototyping a spell casting/throwing simulator for the vive.

In the few free hours that I’ve spent prototyping, most of my time has been devoted to getting good throwing mechanics and a solid base spell actor. Now that I have those, I’m starting to build out different spell types.

Everything is placeholder right now, with a wand asset pulled from the Infinity Blade pack to get a feel for things.

I’m really happy with the prototyping workflow in :sk:, I feel like I’m flying through ideas as quickly as we can think of them. At this point I’m doing essentially everything in :sk: except for some of the easier overlap/hit detection events.


#2

That looks way cool! :smiley:


#3

Wow totally awesome! Topsy Turvy Bomb comes to mind :grin:


#4

That’s the first time I’ve seen that, what a hilarious mechanic! I can see the similarity.


#5

Sorry for the late post. I was wondering if Skookum Script can be used with VR, more specifically the HTC Vive. Thanks


#6

SkookumScript is being used for a number of VR projects - both games and non-games. The example above by @error454 is using the HTC Vive.

SkookumScript can be used for any Virtual Reality headset or Augmented Reality setup. It currently supports anything that Unreal Engine 4 supports.

Here are some interesting links on :ue4: VR:

https://forums.unrealengine.com/showthread.php?33504-Getting-Started-with-VR

Using VR to edit in UE4:


https://forums.unrealengine.com/showthread.php?99776-Unreal-Editor-in-VR-Official-megathread


#7

I finally had some time to work on this again. Today I’ve been experimenting with using :sk: to create procedural eye movement. I’m happy with the results so far.

The coroutine to do this is pretty straight forward

()
[  
  loop
  [
    // Get a random eye location based on the ranges that we've configured
    !yaw : MathLib.random_float_in_range(-@eye_yaw_max, @eye_yaw_max)
    !pitch : MathLib.random_float_in_range(-@eye_pitch_max, @eye_pitch_max)
    !roll : MathLib.random_float_in_range(-@eye_roll_max, @eye_roll_max)
    !new_r : RotationAngles!yaw_pitch_roll(yaw, pitch, roll)

    // interp the eye to the new location and loop until we've reach the new location
    loop
    [
      @eye_rotation_test := MathLib.rinterp_to_constant(@eye_rotation_test, new_r, GameLib.world_delta_seconds, @eye_movement_speed)
      if MathLib.nearly_equal_float_float(new_r.@yaw, @eye_rotation_test.@yaw, 0.1) [exit]
      _wait
    ]

    // Give the eye some rest before moving again
    _wait(@@random.uniform_range(0.1, 0.8))
  ]
]

#8

Ha! That is both awesome and cute! :smiley:

 

…also creepy…! :fearful:


#9

Mission accomplished on all 3 fronts :slight_smile:


#10

Very cool! :madsci:


Just so you know, SkookumScript has a native Random class and a @@random class data member.

So this:
@@random.uniform_range(-@eye_yaw_max @eye_yaw_max)

Is essentially the same as this:
MathLib.random_float_in_range(-@eye_yaw_max, @eye_yaw_max)

Random has more distributions and we have some cool plans for making randomness a more fundamental aspect of the SkookumScript language - though obviously using the random routines in the UE4 MathLib works too.

EDIT: Oh - just noticed that you use @@random.uniform_range() in the last _wait() too.


#11

Yeah I’m just all over the place, I think this was originally 2 functions that I merged. I don’t have all the function names memorized so sometimes I just search for what I know on the :ue4: side.

I’m glad you mentioned the Random class, it made me take a closer look and now I finally understand that all objects have a @@random member. You have some cool stuff in there!

I don’t know what’s more impressive, the distribution graph drawings or the functions themselves :wink: Wondering if you moonlighted as an ASCII artist back in the BBS days.

|         |
|   /|    |
| /   \   |
|/      -_|

|       |
| --    |
|/  \   |
||    -_|

#12

Thanks. :madsci: I have done much ASCII art over the years. I’d like to extend the SkookumScript comments to be a bit more like this forum and be able to embed images, etc.with something like Markdown syntax. I have a plan for it though it is on the way way back burner.

Since you are playing with some random number stuff here again is some more random functionality coming to SkookumScript in the near future: