t3D - WIP 3D Engine
-
@LinkCraft02 Good question - So the scene is setup as follows:
- Create a 3D cube, dimensions 500,1,500 - centered in the world, This cube will be the "core/foundation" to build more 3D objects on
- Run a function, we'll call this "DrawTrees", this runs before the primary game loop and once only.
- In the DrawTrees function, we have a for loop that does something like this:
for i = 1 to treecount loop placeObject(model.tree, random(1000)-500,0,random(1000)-500, scale.tree) repeat
To break this down:
- The for loop will repeat until the count of "treecount" specified earlier
has been met
- the placeObject function will draw the model.tree, defined earlier
- the random(1000)-500 is to set the target location, starting at 0, upto 1000 meters - As everything in 3D starts centre scene at 0, we then need to minus by half the total value to ensure that the distribution splits in both positive and negative axises equally - The random function setup this way will then create values to a maximum of negative 500 and positive 500 for the specified axis - Doing this creates an even distribution on our earlier created 500,1,500 size cube
- Y is set as 0 to ensure all the trees are placed at the same base height
- In 2D, we would otherwise do Random(gWidth()) and random(gHeight()) to create a spread of randomised location within the bounds of the screen size limits
One thing to note, there are some drawing limitations and odd effects when using 3D objects at this scale as each unit is equal to 1 meter so things like lights don't interact well above a certain intensity range due to what i imagine is some intentionally designed limits with draw distance? I'm re-doing this to cut the scale by 1/10 to allow light to spread better and allow for better manipulation without the side effects. Example, changing scale.tree vector from {1,1,1} to {0.1,0.1,0.1} and the cube from 500 to 50 should allow for more light variance of control and better spread across multiple objects in the scene
Hope that helps! I'm still learning so open to any corrections or feedbacks from the FuzeTeam with this!
-
@Tratax First off, this is super cool! Second off, I just realized your avatar pic is from OMF-- one of my favorite games of all time (I still play it!).
-
@Spacemario Thanks! I've always wanted to code some 3D stuff.. Hasn't been possible until Fuze as other languages require so much setup work that I just never bothered or gave up haha
Same, OMF is such a good game.. wanna work on a remake? :D
-
@Tratax Doing an OMF-style fighter in Fuze would be amazing! Problem is, I still need to finish my other Fuze project-- things just keep coming up and I don't have time to work on it! Maybe once I wrap up Shenmue III I can get back to more coding...
-
Sorry to go off topic here but I have to ask @Tratax How good / bad / great / ok is Shenmue III? I loved the first, never got to the second but am keen to see how they did with this one - It sounded like it was a really rough ride for the developers - it would be great if it turns out to be a classic..
-
@Jonboy I write little reviews of every game I play. I wrapped up Shenmue III yesterday, here was my take for whatever it's worth:
Graphics: Where the first two games had a hundred million yen's worth of custom development, Yu Suzuki had to go the pre-packaged route this time via Unreal Engine-- and what a choice it wound up being, with areas like the hotel interior and the various building exteriors looking downright photo-realistic! Screen space reflections grace almost every surface, and on top of that the character facial models simply have to be seen to be believed. In a nod to fans, the user interface's layout, fonts and prompts were adapted from the Dreamcast originals.
Sound: Video game music has been on death watch for probably fifteen years-- but here comes Shenmue III, like a kung-fu master revealing some lost art form, with its spine-tingling, atmosphere-generating combination of traditional oriental music and melodic bass-line leading Jazz-fusion works so familiar to those who enjoyed the first two titles. Corey Marshall returns as Ryo, and the rest of the voice acting cast perfectly strikes the series balance between quality and eccentricity.
Gameplay: Other than shifting character and camera movement to the analog sticks, Shenmue III plays exactly like the first two games: Ryo wakes up each morning, and it's up to the player to balance practicing martial arts, exploring, obtaining clues and journal entries via other characters, and earning money. The loss of the Sega license hurts the arcades, but the new mini-games are fun. While large, the game's two areas also feel very intimate, more like the first title than the second.
Overall: There is some gating of player combat progression behind toy capsule "farming" and gambling-- at least some degree of padding seems lamentably necessary in today's video game era. But in every other respect, Shenmue III has completely side-stepped the past eighteen years' worth of medium degradation, to the point where the title looks, sounds, and feels like it came out immediately after the second game, but with a cutting edge coat of paint-- it's an almost astonishingly faithful and wonderful follow-up. Hopefully the wait for part IV won't be as long!
Score: 4/5 Stars
-
@Spacemario off topic sorry but these reviews you do, are they online? I'd like to check them out as there's a few games I'm "on the fence" about and I don't trust most reviewers these days.
-
@SteveZX81 Are there specific games you're interested in? I can look to see if I've reviewed them!
I'd link straight to the review site, but that is a sub-site of my personal blog, and I like to keep my social commentary separate from my contributions here.
I've thought many times about breaking that site off, but I'm too lazy-- it would involve re-working my DynDNS stuff, having two DNS entries, etc. etc.
-
Yep, off the top of my head there is: (Bus Simulator, Truck Driver, Greedfall, Grid and Ghost Recon:Breakpoint on PS4) and (AC:Rebel Collection, Escapists 2, Bomber Crew, Pioneer Mars, Forager on Switch)
-
@SteveZX81 Oh man, this reminds me of just how vast this hobby is: I've reviewed 565 games, but none of the ones you listed!
I did review the previous "Ghost Recon" ("Wildlands"), but that's as close as I came. But you maybe just gave me some good ideas, since the fact that Fuze appeals to both of us probably indicates similar game taste! I may add some of your list to my "todo" list.
Here are my ten most recent reviews just to give you a flavor. If we have a way to "PM", I can just send you a link to the site so we can stop hijacking this thread!
- Shenmue III (Windows)
- Pokemon Shield (Switch)
- The Outer Worlds (UWP)
- Metro Exodus (Windows)
- Dragon Quest XI (Switch)
- STOS (Atari ST)
- Arkanoid (Atari ST)
- Fire Emblem: Three Houses (Switch)
- Kirby: Nightmare in Dream Land (Game Boy Advance)
- Dreams (PlayStation 4)
-
Sure, thanks!
-
@Jonboy, you have inspired me to build a level editor for the 3D Demo... realising i'd probably need this if I wanted to save any of the work put in!
Here is the progress..
-
Got stuck trying to work out using arrays vs structs, thanks to @pianofire for your help and answers!
-
Built an attempt at this in 3D, got stuck realising i'd need to think and plan out the logic before just writing the code
-
Re-wrote this in 2D, top down, realising I could then translate the X/Y concepts to X/Z - got it working with object creation and manipulation of position!
-
Re-wrote again in 3D .. Starting to feel it come to life!
My current challenge is toggling l/r should change the active model displayed before placed however currently only displays the last placed object.. Is anyone free to have a look at the code and share some suggestions?
-
-
-
This is amazing
-
So! I have learnt from this that to do a level editor with a preview you need two things:
- All the models loaded, all the objects associated to those models and then all models placed as objects
- Two instances of the placed objects, the preview object and then the placed array object
Seems the approach now is to change the preview object model as it increments through the model index... @Jonboy @Dave - Any suggested approachs on how to change an objects model ? I cant see an existing function like changeModel(current,next) so assuming i'll need some trickery?
-
I think you need to look at removeObject(handle) and then recreate with the next / previous object and using the same handle.
-
Awesome, thanks @Jonboy - I'll give that a try