question

Raashid Mohammed avatar image
0 Likes"
Raashid Mohammed asked Phil BoBo edited

Is there a way to create a game in flexsim ?

Hi,

This is a generic question

I was wondering if we can create a game using flexsim

for example

I have a simple work station. and Operator

I want to control the operator walk to the location using keyboard

such as when I press forward button the operator goes forward, and backward button the operator moves backward, left, right and pick and drop

Can you guys share as simple example with source, processor, operator and sink. if possible

Thanks

Raashid

Choose One
operator
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

Have you seen the Zombie Attack game on the FlexSim website?

1 Like 1 ·
zombieattack.png (42.1 KiB)
Raashid Mohammed avatar image Raashid Mohammed Matthew Gillespie ♦♦ commented ·

Hi

I have seen the model

But how can I control the movement by pressing keyboard forward, back, left, right, Pick and Place movement on the operator object

is that possible ?

Thanks

Raashid

1 Like 1 ·

1 Answer

Phil BoBo avatar image
6 Likes"
Phil BoBo answered Phil BoBo edited

Yes. Attached is an example model of a game built in FlexSim where you "can control the movement by pressing keyboard forward, back, left, right, Pick and Place movement on the operator object."

It has a Custom GUI called Game View that is set as the Model Control GUI.

Within the Game View is a Perspective view with customized OnKeyDown, OnKeyUp, and OnPreDraw that has the game logic.

Arrow keys move the operator.

Pressing Spacebar loads and unloads items to the queues.

Press the Play button in the Game View in order to start the game.


· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Raashid Mohammed avatar image Raashid Mohammed commented ·

This is super awesome.

Is there a way I can view it in first person mode

I see first person option in view setting

I was think this will be a awesome tool for learning new system if we combine it with OCULUS RIFT first person mode where operators can interact with virtual environment

Thanks for help

Raashid

2 Likes 2 ·
Phil BoBo avatar image Phil BoBo ♦♦ Raashid Mohammed commented ·

Yes, that's all possible.

Attached is the model updated with a checkbox that changes between first person view or not.

I added WASD controls in addition to the arrow keys to make it easier to play in first person.

Note that these are just simple examples of how you could create a game with FlexSim using the GUI builder.

Using the Module SDK, you can make customize FlexSim to do anything you want.

1 Like 1 ·
Raashid Mohammed avatar image Raashid Mohammed Phil BoBo ♦♦ commented ·

Thank you

I don't really know how to work on GUI

Do you have some type of article or document explain on how you did it

This is very good. I see this help us in training/learning platform

Thanks again

Raashid

0 Likes 0 ·
Show more comments