Game Engine Forum - Grit Open Source Streaming Game Engine
Site Header
It is currently Sat Jan 19, 2019 9:43 pm

All times are UTC




Post new topic Reply to topic  [ 91 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Tue Feb 24, 2015 7:50 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 769
Augusto Moura wrote:
So, then i will remove/abandon completely:
Spawn Point (useless)
Event Editor (better with code)
Cinematic editor (better with code)

Now i think that I understand your idea, basically there is 3 modes, 3 independent modes, so you can move from editor, to game or to debugging, and vice versa from any one, at any time, not resetting the camera position at any one
(currently from editor you can play, but if you press esc you return to the editor, on the editor camera position)


Yeah, although the difference between debug and game is probably only that you lack certain abilities when actually playing (like ghost mode and the debug tools). It's like a cheat mode basically.

Quote:
evolving the ideia a little more, and thinking a practical way to implement:
On all modes, exists a menu that you can open pressing a key, you can select the other two modes (a subtle menu, that can also be opened inside editor)


Yeah I think the existing "press tab to get your mouse cursor back" will not in itself exit debug mode into editor mode, but there should be some control from within there that will toggle between the two modes. Maybe an icon in the corner or something.

Quote:
On the editor you have a complete Content browser, and on debug mode you have another content browser, but more simple, just to set what to spawn when you use your debug weapon


You can probably keep the same class browser, but the difference is you won't be positioning it with the widget in debug mode, you'll instead be placing / firing it with the weapon, and they'll be options about how fast to fire it, etc.

The advantage of having the same class browser is UI consistency. We could also have a list of favourites or whatever (in both cases). There are many possibilities.

Quote:
The debug mode can have a little inventory, with key bindings to 1, 2, 3.., so you can drag a object to the inventory slot and spawn it when pressing the corresponding key


Sure, when we have this stuff, we won't need the existing key bindings in common/init.lua, so there are lots of options then.

Quote:
Grit without any loaded mode needs to be clean, without any HUD element or specific bindings, unless what is shared between all the modes, like the modes menu, debug layer and console (but can have the base of debug mode, like camera move or other simple things)


Yeah let's not worry about that for now, there are things like the minimap which may or may not be needed by a particular game, and games are bound to want to add stuff or maybe start from scratch. Maybe some editor support would help there, or maybe not. We could maybe provide some tooling to help build a set of map tile textures via baking an orthographic perspective. Let's wait until we have a couple of games to see what the scope is like.

Quote:
Each mode needs its own constructor/destructor functions, what to create when starting and what to destroy when exiting, including key bindings (I know how it works on player_ctrl.lua, but I don't know exactly how it can be implemented now with the editor)


player_ctrl is a pleasant hack, we can extend it or rewrite it or whatever. Don't worry about key bindings, the input filter system can disable whole sets of keybindings really easily. Check the grit book (i've been doing updates there).

http://www.gritengine.com/grit_book/inputfilter.html
I also updated http://www.gritengine.com/grit_book/resources.html

Quote:
how the in-game mode will be defined? (I mean, if you create a specific game, like racing, FPS, or TPS, or any completely different game, you will need to find where it is and modify the player_ctrl.lua file?)


Let me think about it. Don't let it block you. We should make a simple game like "collect all the coins" or some junk like that, just to show how a game will actually work.

Quote:
Let me know if I understand right and if these are not dumb ideas :)


All sounds good to me. Thanks for your enthusiasm and thanks for being open to more ideas :)


Top
 Profile  
 
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Tue Feb 24, 2015 9:11 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 769
Brian: It's trivial to create a physics-less white box class where each object gives its own width/height/depth. Adding physics requires support for scaling physics bodies.

Working with vertexes starts to need a whole modelling interface though and that's not going to happen any time soon.


Top
 Profile  
 
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Tue Feb 24, 2015 9:32 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 769
Here's a concrete proposal:

The game is to collect coins, which are large spinning gold coins that you pick up if you walk over them.

The map is the playground map, probably with some modifications. We will import it into the map format so it can be modified via the editor for placement of coins etc.

There is a map in the top right showing where the coins are (or maybe we just give an arrow to the nearest coin on the compass).

Some of the coins are in hard to get places, requiring you to get high up, maybe fly / use a plane.

The game starts with you controlling a player in a certain location. It ends when you collect the last coin, and your score is based on how fast you did it. There is no load / save functionality.


There are a few things missing that this would need but I could probably do it in a weekend or two and would be a very useful exercise.


Top
 Profile  
 
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Thu Feb 26, 2015 4:39 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Mar 26, 2010 10:06 am
Posts: 440
In terms of the cube idea for editor;

Yea, no need for physics at all either - just a way to place a cube, and then make it work with the scale tool (independent and global axis, to change it to rectangle etc) - just for, say, if I make a baseland of grass and roads, then anyone can build up some white boxes as concepts and maybe inspire the populating real estate (or use those white boxes to paint over concepts, that then go to the populating step).


In terms of a little game;

I was thinking more along the lines of "all of GTA III mechanics" (same features, even if they are implemented in your own ways).

But collecting a coin is certainly still a step toward that!

A spinning Coin, and adding them to something keeping track that we have collected those coins, is the beginning of picking up weapons and armor and stuff like that.

Having this little coin pickup game unlocks the bulk of interactivity for players in GTA for example, which, reiterating here, of course, if we can do gta, we can do anything else that is open world and on land and sea and air. GTA is really just, at its core, vehicles, players, and pickups. Triggers? Just a custom pickup, at the end of the day/lowest common denominator. Weapons are just like that coin. Hell, until the end of the PS2 era of GTA's, they all (weapons, triggers) even spun like coins or wiggled up and down (enter/exit markers in san andreas did the wiggle) :P

So, great idea. And good thinking to use mostly things already existing in the trunk to get a head start. Perfect solution to get some gameplay starting, however small, and smaller the better right now anyway.

I will make a coin when there is a functional placeholder that needs a new mesh. It will only have a blank texture and a normal map. I'll need someone else to do the PBR gold and gloss/spec maps for it. I think the face and theme of the coin will be the current Grit Logo and grit engine. Date will be 2007 etc.

I might use spark's face on that avatar he has, and put the grit logo on the back. haha.


Top
 Profile  
 
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Thu Feb 26, 2015 5:22 am 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 769
Brian wrote:
I will make a coin when there is a functional placeholder that needs a new mesh. It will only have a blank texture and a normal map. I'll need someone else to do the PBR gold and gloss/spec maps for it. I think the face and theme of the coin will be the current Grit Logo and grit engine. Date will be 2007 etc.


A clean coin only needs normal map, let's not make it gold though, as that has special specular rules and is a pain to implement. Silver coins ought to be OK. You can probably sculpt the coin in mudbox or something.

Quote:
I might use spark's face on that avatar he has, and put the grit logo on the back. haha.


no :)

Quote:
It may be worth looking to GTA III for the player controller, too.


Any system that has the full corpus of animations supported can be used by people to make meshes (without changing the skinning), they just need to open the blend/max file and edit away. So I don't think it's that big a deal to use GTA specifically.


Top
 Profile  
 
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Thu Feb 26, 2015 6:22 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Mar 26, 2010 10:06 am
Posts: 440
Okay, retracted that part so no one wastes time reading it. I think I was wrong about how they did it anyway.

I'm coming on IRC. I'm going to give you a coin, a ball, a plane. They will be primitives, but you'll have what I am basing my coin and ball out of and I'll update them for a couple hours and see what we get.

You can take the ball and make it roll, and make it pick up and count coins on colliding with them, and give it an "all coins collected" state while I make a type of level for it, or maybe level pieces. Make the ball roll with WASD and make it relative to camera position, so W is always "away" and "s" is always "toward screen" so you can steer with A and S, or use the camera for steering, or use them in combination for better views when rolling around.

After that, you can add a puff particle or something when picking them up etc, start giving it some technical character while I work on a basic level.

It'll be like Marble Madness with collectibles and a free cam, and we'll get a bunch of functionality from a simple little project that can be used again later on something more complex.

edit: I'm having a bunch of cool ideas about this just thinking of these basic fundamentals being done. I'll put a couple of holes in the test plane/ground so you can test more ideas, and make one side of it hilly, and the other side have some ramps and such. On one angle, it'll break you when you fall, on another angle, it'll keep rolling, but fast, and on another angle, you'll keep rolling normal speed or something - getting ahead of myself, but you get my point, it'll be basic, be done in a minute.


Top
 Profile  
 
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Thu Feb 26, 2015 8:17 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Mar 26, 2010 10:06 am
Posts: 440
Loop has that extra overlayed checker in front of it. That makes the ball go fast.

curved wall after it.

The two holes; one is 10 meters deep, instant death if you fall on it. The other is 5 meters deep, which only hurts a little.

The lone ramp is 2.5 and 5 meters tall at either of its platforms. Player can only jump 2.55 meters, just barely able to get on it, but can.

The three ramps on the right are 1, 3, and 5 meters high. Ball should be able to jump from lowest to highest, but not up onto middle, nor highest of course.

Low ramp slows ball down. An incline greater than that (don't know the angle yet, didn't check, just dropping the ideas here. Anything from that incline up to the highest ramp's incline slows the ball down. First ramp slows it a little.

Middle ramp slows it more.

Highest ramp can only go down, but not up it. Anything in between the middle and high should slow it down more and more, until it reaches the 45 degree angle (final ramp), which stops it.

I'll make a coin and you guys can make the ball roll and pick them up?

Image


Top
 Profile  
 
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Thu Feb 26, 2015 6:49 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 769
LGTM

Triggers can be either special surfaces (physical materials) which I can test for in code, or 3d shapes (gcols) that you intersect with. If shapes, make sure to use solid shapes like box / hull / sphere and not triangle meshes, as in that case the triangles are infinitely thin and the objects are hollow.


Top
 Profile  
 
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Sat Feb 28, 2015 8:48 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 769
Ok I'm now going to work on reworking gfx.lua physics.lua system/init.lua and player_ctrl.lua into a cohesive game framework


Top
 Profile  
 
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Sat Feb 28, 2015 8:55 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 769
Just realised something important -- if there is no physics in the editor then there is no skeletal animation. If there is no skeletal animation then it is much easier to resolve mouse clicks to graphics bodies.


Top
 Profile  
 
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Sun Mar 01, 2015 2:11 am 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 769
Here are some things that could be controlled in debug mode:

Ghosting:
* warp on/off (walking through walls)
* teleport to a given place (x, y, z)

Placement gun
* specify class to place (browser)
* additional offset from ground (good when placing on a slope)
* button to clear last placed object
* button to clear all placed objects

Object firing gun
* class to fire
* velocity (m/s)
* spin (need to figure out how to input quaternions intuitively)
* button to clear last fired object
* button to clear all fired objects

Delete gun
* will remove placed / fired objects

Particle gun
* what particle to create
* initial attributes (not sure how to do this as they're general purpose, maybe a table)
* clear particles button

(It's also possible to place a particle emitter object which is similar but different)

Prod gun (prodding means when you push something with your finger)
* direction x, y, z or a checkbox to override that and just push away from camera
* force to push at, or a checkbox to just specify acceleration instead (i.e. automatically multiple up by the object's mass)

We can also have a grab gun to allow picking things up and dropping them, functionality that used to exist but i disabled because i intended to reimplement it this way.

In addition to all of that, we'd have all the regular weapons in debug mode, that are just fired from the camera.


Top
 Profile  
 
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Sun Mar 01, 2015 4:08 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 769
More useful debug mode stuff (just throwing ideas out there):

Physics control: pause / unpause, slow down physics, run one frame at a time, various wireframe modes

Graphics debug: various falseColour stuff, disable post effects, disable shadows, disable particles, ...

Audio debug: use some floating hud elements to show where the audio bodies are


Top
 Profile  
 
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Sun Mar 01, 2015 7:10 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 769
More musing:

In the game, the game logic completely controls camera control and movement of the objects (the player, car, whatever).

In the editor, the editor completely controls camera control and gameplay is paused. The only movement of objects is the static positioning of them in the map.

In debug mode, there is a fusion of the two things. You'll be able to enter any object and control it, in which case its movement and the camera position will be controlled by the game logic. However, when you're in ghost mode (not controlling an object), camera control will be done by the debug mode itself, i.e. no matter what game logic is being used, you'll still be able to ghost around in debug mode.

This should mean that you can debug the game logic for controlling the game, while still being in a more superior position in terms of seeing what is going on.


Top
 Profile  
 
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Wed Mar 04, 2015 8:57 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Mar 26, 2010 10:06 am
Posts: 440
Like the sound of a lot of that. Will export some objects soon.


Top
 Profile  
 
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Wed Mar 04, 2015 9:45 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 769
This refactoring / integration grew in scope pretty fast, hopefully I can finish it next weekend.


Top
 Profile  
 
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Thu Mar 05, 2015 11:58 pm 
Offline
Newbie

Joined: Sun Dec 14, 2014 8:08 am
Posts: 18
Suggestions if not yet implemented: The option to switch from local and global (as in moving along the global x, y, and z axis, or moving along the selected objects x, y, z axis), also a script editor with auto complete (This should be quite easy, I have done this for another game engine).

Just a couple hints:
Global - Just use the 0, 0, 0 rotation on the move handles.
Local - Just use the objects rotation on the move handles.

(Getting the objects to actually move in the direction is not my expertise lol, just trying to help. Though I think all you have to do is match the object position with the center of the move handles position and it should work with both Global and Local)


Top
 Profile  
 
 Post subject: Re: W.I.P. Grit Level Editor
PostPosted: Mon Mar 09, 2015 3:20 am 
Offline
Newbie
User avatar

Joined: Fri Mar 21, 2014 12:25 am
Posts: 116
Location: Rio Grande do Sul
Quote:
So like, lay down some roads and land and make the baseland and import to engine, then anyone can make arbitrary cube-blockings of skylines or other buildings and stuff like that and gives people something to paint over or just to model based around, informs on what to do next. Cubes are a cool tool.

Something like this?

This is a open source engine with a lot of cool stuff, maybe we can bring some of these ideas to Grit
Also a project using this engine will keep me away for awhile from Grit, sorry

I'm really enjoying the ideas discussed here, can't wait to help implement them :)


Top
 Profile  
 
 Post subject: Re: Grit Level Editor
PostPosted: Wed Mar 18, 2015 4:39 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Mar 26, 2010 10:06 am
Posts: 440
Yea, even simpler actually. Like, a scalable cube, doesn't even need to be collidable. Just something to sort of "block in" building-like shapes that can help "visualize" what will really be modeled there.

Like this: http://media.gtanet.com/images/3347_gta ... kyline.jpg

On the left side of that image, just for example purposes, it "appears" those are just gray boxes on the buildings. A person, with cubes only, could build out skylines or little blocks/neighborhoods like that, and then an artist can paint over it and show what the "real models" should be like.


Top
 Profile  
 
 Post subject: Re: Grit Level Editor
PostPosted: Fri Mar 20, 2015 10:12 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Mar 26, 2010 10:06 am
Posts: 440
Upgraded PC, i5-4590, gtx960. Sadly, I also had to upgrade chipset, which also means I ended up with a mobo that doesn't support IDE. Doh. I had went back to a 500gb IDE drive "temporarily" since my sata drives had died one by one over the last year or so, and now I gotta order an enclosure to gather my data off of there.

But for this task I should have exported before I even rebuilt my PC, I can just model a new layout in blender and give that to the SVN (don't know how to use the blender scripts, kinda hoping and praying we can have them simplified or just a simplified version that will feel more like Grit exporter in Max). I just think for static map objects I should be able to export the mesh and its coords and paste it in myself. I don't understand the linking and all that, I just want to be able to model world shell and export it piece by piece or in a batch, and export the coords. The current one confuses me before i even try it. Maybe I just need someone to show me.


Top
 Profile  
 
 Post subject: Re: Grit Level Editor
PostPosted: Tue Apr 21, 2015 3:47 am 
Offline
Newbie

Joined: Fri Jul 26, 2013 5:30 am
Posts: 141
ok


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 91 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Localized by Maël Soucaze © 2010 phpBB.fr