Hello, I try in old blender and also in UPBGE Game Engine make a little game with StarGate. Its only a walking sim with able open door. So only basic. But I wonder how can make my gate inner ring dial to certain symbol , You sure know how Stargate dial address. for any help thanks I search for this similar topic here and nothing found so i create a new one . I hope its ok.
you are in luck, as i have done this very thing. full dialing, chevron locking, dhd madness.
super old game3_core (no longer public project) demo featuring stargate, skip ahead to 1.50 for dialing. much improvements since
a more recent revision featuring a puddle jumper dialer
ill see about getting a demo pulled together. although, ill say the milkyway gate no longer spins and dials, but locks with each press of the dhd as canon. dialing computer and spinny/manual locks are wip. (need a remote event handler)
nice to see a fellow stargate fan!
sorry for the double post, but to clarify, i know you asked for a traditional ring locking, but i actually havent gotten around to adding that.
the idea is
- to create a list of symbols in the order around the ring
- the dialer looks up the correct symbol and gets the angle (based on order)
- get the angle of the chevron
- decide which way to spin the ring and start rotation
- once the angles are within less then a rotation angle, stop, trigger lock
- next symbol.
its not too complex, its just all the time needed to sort all the symbols. now i have a reason to do it, so ill see about getting that working.
Almost perfect! you just missing the splash when the connection is established
lol no shit. ive been trying to figure a good way to make that for literally years. vfx is just really not my strong suite.
Thank you guys
Im glad there is still Stargate Fans
This is mine models and scene so stargate dialing is made by python? or it can be done by logic bricks?
i dont see how you could do logic bricks, python will be much more efficient regardless. the code i have is pretty complex and ive spent a while on it. unfortunately, it might not be much use to you if you dont want anything to do with game3 (my game code core). maybe i can get it to stand alone.
the logic for dhd will be much simpler than the sgc dialing computer, since it lights/locks the moment each button is pressed.
the way i do it is have each symbol/button mapped to a number/letter key (1A, 2B, etc) where 1 is the outer ring of dhd and 2 is inner ring. when the button is pressed, the key gets added to a list and the stargate reads the list, lighting up with the number of keys in the list. once the “enter” button is pressed, the list gets joined into an address (“1A:1B:1C:1D:1E:1F:1P” or
":".join(self.data["ADDRESS"])) then looks that string up in a address book of sorts, with keys being address codes and values being blend file names. if the lookup finds a match, and the blend isnt the current one, Kawoosh!! the event horizon is a collision sensor with a bit of code that opens the new map when hit, player velocity and orientation are saved for spawning on the other side.
when the new blend opens, save data from the stargate sees an active address on the data, so the event horizon is added if the level matches. the player has a flag in its save data telling the player spawner to not add the player, as the stargate event horizon will spawn it instead, applying orientation and velocity relative to the gate. then the shutdown happens, and it resets to a dial ready state.
loving the back of your gate btw
Okay, I see what you mean, but I am not good in Python. so I understand what must be done in the script but don’t know how exactly to write it into functional script… Thanks, I’m glad you like my model of the gate.
scene is ready already but get python ready will be worse.
this upbge 0.3 (eevee)? i mainly ask bc i only work in upbge 0.2.0 (2.78). i dont even know if 0.3 has blend switch or libloading yet, both quite important.
Yes , but how to create that list? I need a help with that. I know that:
- 1. click the button on panel. **
- 2. that button send information to ring with symbols and rotate that specific symbol under chevron 7
3. then Animation of chevron 7 and light on on both chevrons 1 and 7. only chevron 7 light off
Its all clear but how to write it in python? to make it work.
How make that list? Why its soo difficult… I searched on google for similar problem . but no luck.
dont feel bad, and be patient. im quite skilled at coding and ive been improving on my gates for years, its not a simple thing, especially for beginners. heck, i still havent got the sgc dailing sequence figured out. what you saw in the video was a pre-animated dial that didnt correspond to the address typed.
im starting to work out the code after making some adaptations to my blend files. you will be the first to have the working version when i get it.
the stargate has 39 symbols i think (on the ring, the dhd has 38 irc) so we take 360 divided by 39 to get the angle between each symbol. then we get the position of the symbol in a list (hand typed to match a sheet) and multiply by the index to get the angle the symbol is at. there are 9 chevrons so we multiply the current chevron by 40 to get the angle of the chevron. now all we need is the angle difference, which is some fancy vector math.
theres a few different ways to handle the spinning, either alternating fixed rotation values, or rotating around the longest way, or around the shortest way.
making all the objects labeled is tedious, and no real ways around it.
heres a quick rip-out of the code im using with a little demo, works in upbge 0.2.0, but it might also in 0.2.5
open either “World_A” or “World_B” and run in standalone player (P in viewport doesnt work).
just a warning, the code is setup to work in a much much larger project, given time it can be greatly simplified.
i would not do it this way with all the math and stuff, i would make an animation an simply check for when the correct frame in the animation correspond to where the symbol is located, it is basically a lookup table .
ah ha, yes, this is a good way. we like to call that me having an “asgard” moment lol.
but in my defense, i was planning on having the ability to “manually” dial, moving the ring by hand and lock symbols that way. having an animation as a middleman seemed more out of the way then directly interacting with local orientation
the dhd could have game properties on each button referring to an animation frame number (multiple of 39, eg 390) to have less fiddling with arbitrary codes.
use both, i am sure there is lots of ways to do this stuff.
OK, so I tried do that in Logic bricks and its wayy to complex. But still its only one animation . Its not real dialing the circle. I use that in my model of outworld gate with DHD , so I achieved that. I gave to all buttons on panel property +1 when push them and to “Stargate symbol circle” command to play all 7 animations of dialing only then when count is equal to 7. in the end its like : symbol 1 ,2 ,3 ,4 ,5 ,6 and when I press seventh symbol which is Earth , gate start dialing. when is gate finished I push center crystal and Gate is open. I have a lot of problems with timing of animation , cause one time circle turn to 1 symbol then 5 sec pause for chevron, and next time its really quick which I dont understand…
here is a image of that mess which make circle turn
and here is video
What I dont get is , why is dialing sometimes soo quick and why my player sliding… this is Blender 2.79 Game Engine and why my FPS goes sooo low when I only look on buttons on DHD? 15 FPS sometimes. Weird.
To be clear . I work in two blender versions. Blender 2.79 where I make all models and try old GE and then 2.9 UPBGE. for other things like animations and etc I use Blender 2.8. yes I have 3 versions of Blender
2.7, 2.8/9 are not compatible and will corrupt blend files if you attempt to move between them.
all the buttons likely use the very inefficient mouse over sensor. a raycast should be faster.
ill see about getting a simple animation based demo working.
oh so thats why my FPS gets low? because of Mouse over?
Same happened when I walk on ramp front of SGC StarGate in UPBGE 3.0 Blender 2.9.
BTW I never move GE 2.79 to UPBGE . as I said I only make models in that 2.79 for UPBGE and tried old GE with that Gate and DHD. I also have it in UPBGE but whole set up in new, so no problem with that.
I have a list of issues in that UPBGE version.
- what really upset me. is maybe collision bug which means: I walk in SGC corridors and when I want activate card reader for door and I am close to wall. my player starts floating up… same at stargate model and also FPS drops.
- FPS goes low when I start animation of dialing by itself(Daniel send “THANKS SEND MORE” Tissue box)
- When walk on Gate-ramp sometimes FPS goes under 20 even 14.
- When hit button for Alarm and activate light beacons FPS drop from 55 to 30 down…
Is it really true that Blender can handle only 10 lights?
Many times happend to me , a one simple action quit whole UPBGE… Only to delete on scene. and BOOM Blender UPBGE fell… and if you dont have save your progresss… eeeehh.
here is couple of images from UPGE . I removed almost all lights cause i tried if its make better performance… not at all…
before activate animation of dialing"Daniel’s Message"
Children of Gods refference
FPS drop when I walk on ramp. Maybe its on stairs to the ramp.
After activation of gate FPS drop to 20
lights… yeah… rip. we only get 10 ish for ideal. thanks to forward rendering. deferred rendering is used by modern games to get many, many more lights.
i cant speak to collision bugs without being able to see the file and whats going on, but there is an option to visualize physics, that might help.
what physics model are you using for your character?