-
Posts
465 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Aily
-
-
Could you share some code ?
Like Entities loading and management for example ?
It's not to steal the code , but to see how to do ?
It may be possible, but not effective without full media - when you can compile and run project.
I just can explain the basics
First of all i have base type (class), call it "node".
Node on create write itself to nodes list.
Node have empty (virtual) functions on_init(),on_update(),on_destroy(), etc...
Each game object is extends from node, so other game object types are like
type node_enemy extends node
type node_bullet extends node
type node_dust extends node
etc...
So i don't need to thinking about how each game object type will be "live" in game world, i need only add funtion on_update() to it, and write there all game object need to do.
Plus with this all base node type (struct in C) have helper functions like
attach_node() - it attaching node object to entity as entity user data
set_pos(pos:tvec3) - set body position (but each extended type can override this function and make it own calculations)
Like so, i have node_later_func type, wherre on create i can write any function pointer and delay, after wich time run it.
BASE NODE IS ROCK!
So standart callbacks only getentityuserdata, that always "node", and run it function on_collide()
here is my base node code:
Type node Global nodes:TList=CreateList() Field name$ 'Field fullname$ Field on_off Field wants_to_die Field touch_sensor Field see_sensor Field body Field mesh Field is_near_player Field player_side Field magnetic Field solid Field end_level Field punch Field blue_key Field green_key Field red_key Field run_later_time# Field need_to_run_later Field current_pos:tvec3 Method hide_show_by_switch() on_off=Not on_off on_hide_show_by_switch() End Method Method on_hide_show_by_switch() 'override End Method Method attach_node(dest=0) If dest=0 dest=body setentityuserdata dest,Self For i=1 To countchildren(dest) child=getchild(dest,i) attach_node child Next End Method Method free() ListRemove nodes,Self End Method Method silent_free() End Method Method hit(pos:tvec3,force) on_hit pos,force End Method Method on_hit(pos:tvec3,force) End Method Method player_collide() on_player_collide() End Method Method on_player_collide() End Method Method read_mesh:node(mesh_name$) mesh=loadmesh("abstract::"+mesh_name+".gmf") Return Self End Method Method set_pos(pos:tvec3) positionentity body,pos,1 End Method Method kill() wants_to_die=True End Method Method check_death() If wants_to_die death End Method Method death() End Method Method build_tree_for_child(mesh_) tmp=createpivot() setentitymatrix tmp,getentitymatrix(mesh_) For i=1 To countsurfaces(mesh_) surf=getsurface(mesh_,i) createbodytree surf,tmp Next entityparent tmp,body For i=1 To countchildren(mesh_) child=getchild(mesh_,i) build_tree_for_child(child) Next End Method Method build_tree() body=createpivot() build_tree_for_child(mesh) End Method Method New() on_off=True ListAddFirst nodes,Self End Method Method init() on_init End Method Method on_init() End Method Method run_later() ' override End Method Method update() on_update is_near_player=False If need_to_run_later If run_later_time<0 run_later need_to_run_later=False Else run_later_time:-appspd() End If End If End Method Method on_update() End Method Method clear() End Method Function update_scene() For n:node=EachIn nodes n.update Next End Function End Type
here is bullet node
Type node_bullet Extends node Field life_time# Field max_life# Field power Global player_bullet Function init_bullets() player_bullet=loadmesh("abstract::player_bullet.gmf") 'player_bullet=createsphere() 'entitycolor player_bullet,vec4(.8,.5,0,1) rotatemesh player_bullet,vec3(90,90,0) hideentity player_bullet End Function Method on_init() body=createbodybox(1,.8,.5) 'entityparent mesh,body entitytype body,phy.type_player_bullet setbodygravitymode body,0 setbodymass body,.1 sweptcollision body,True setentitycallback body,bullet_to,ENTITYCALLBACK_COLLISION attach_node End Method Method shot(pos:tvec3,dir,force) positionentity body,pos If dir=1 rotateentity body,vec4(0,-90,0) Else rotateentity body,vec4(0,90,0) End If moveentity body,vec3(0,0,1.5) setbodyforce body,vec3(0,0,force),0 End Method Method free_bullet() freeentity mesh freeentity body free End Method Method on_update() life_time:+appspeed() setentitymatrix mesh,getentitymatrix(body) If life_time>max_life free_bullet End If End Method Method destroy_bullet() 'node_weapon_fire.respawn entityposition(body) node_explosion.gen2_at entityposition(body),0 part.coin_hit entityposition(body) 'node_dust.gen_hit_at entityposition(body) 'node_post_collect.gen entityposition(body) setentitycallback body,Null,ENTITYCALLBACK_COLLISION free_bullet End Method End Type
And zone on load parse all scene GMF file, select each child name, and make such:
Function process_zone(lst:TList) Local n:node For sm:sub_mesh=EachIn lst Select sm.name Case "enemy" n=New node_enemy n.init n.set_pos entityposition(sm.mesh,1) Case "coin" n=New node_coin n.init n.set_pos entityposition(sm.mesh,1) Case "blue_key" n=New node_key n.blue_key=True n.init n.set_pos entityposition(sm.mesh,1) Case "red_key" n=New node_key n.red_key=True n.init n.set_pos entityposition(sm.mesh,1) Case "green_key" n=New node_key n.green_key=True n.init n.set_pos entityposition(sm.mesh,1) Case "player" player.init player.set_pos entityposition(sm.mesh,1) Case "metal" n=New node_metal n.mesh=sm.mesh n.init Case "beton" n=New node_beton n.mesh=sm.mesh n.name=Replace(sm.fullname,"#","") n.init Case "enemy_limit" n=New node_enemy_limits n.mesh=sm.mesh n.init Case "solid" n=New node_beton n.mesh=sm.mesh n.name=Replace(sm.fullname,"#","") n.init Case "on/off" n=New node_switch n.name=sm.fullname n.mesh=sm.mesh n.init Case "on/off/blue" n=New node_switch n.name=sm.fullname n.mesh=sm.mesh n.blue_key=True n.init Case "on/off/green" n=New node_switch n.name=sm.fullname n.mesh=sm.mesh n.green_key=True n.init Case "on/off/red" n=New node_switch n.name=sm.fullname n.mesh=sm.mesh n.red_key=True n.init Case "state_off" node_state_off.add_off_nodes sm.fullname Case "opener" n=New node_opener n.name=Replace(sm.fullname,"#","") n.mesh=sm.mesh n.init Case "t_platform" n=New node_t_platform n.name=Replace(sm.fullname,"#","") n.mesh=sm.mesh n.init Case "inst" sub_child=findchild(mesh,sm.src_name) If sub_child nmesh=copyentity(sub_child) 'entityviewrange nmesh,VIEWRANGE_INFINITE setentitymatrix nmesh,getentitymatrix(sm.mesh) hideentity sm.mesh End If Case "refract" wrld.r nmesh=copyentity(sm.mesh) hideentity sm.mesh wrld.m Case "grass" If Not gra.grass hideentity sm.mesh End Select Next End Function
The best thing with Leadwerks is it simplify and quality, but(!!!) many people are forget that its good working with BlitzMax! BlitzMax is much simply, stable, lightweight than any C++, C#, Delphy, or else. METATRON, fortran and C and Delphy much faster than BlitzMax . I droped to writing my script system for game, because BlitzMax enough simple as scripting language, so when i need new game object (flying enemy for example), i need only to crete new node_flying_enemy, write it on_init() and on_update() functions, and put it to zone loading "select....end select" condition All other things are will be maked.
I'm using many timers in each object, and each timer extends from base node too. It's very handy at the end, when each game object is same.
I don't undarstanding, why Josh not maked such handy void node base class, that call on_update each time before update world.
P.S. Thanks to Arbuz for learning OOP basics
P.P.S. And ActionScript architecture with change function pointers on-the-fly
-
The world should be set. I can have emiiters in the base world right?
You can, but they sprites will be turned to directional light, not to camera such funny bug.
-
You can edit videos with 3DS MAX It's not so handy as Premiere, but possible.
-
setworld maybe?
-
Well done Alien! Looks as complete game.
But at my point of view postprocessing textures is very dark and dirty, without collor correction looks much better.
-
Impressive bots! My dream is to make level models for such project.
The first thing that i start make with Leadwerks is FPS shooter, and on bots it was over. It's one of hardest part of FPS i thinking. And you maked it! With levels now must be easier.
Good that you still continue working on it B)
-
To avoid tunneling, you might try doing a greater number of physics updates, in smaller incrementations. You don't have much physics going on, so it seems like you could do that with no bad effects.
Hm, this is good idea! I'll try it B)
-
Professionnal looking game ! All is great B)
Does it you se a shader to have the cartoon look of the textures ? or it is just textures made like that with some filter applied under
Photoshop or other ?
(I'll try it tonight)
I tiled textures from real photos and make Palette Knife filter in Photoshop. But it's looks very blured (you can enable low render quality to see how textures looks like in files). But in hi quality render i'm using sharpen postfilter. Such technique i stolen from Prince Of Persia Prodigy There some same render style.
-
We have no real issues with the game play or the controls, works well enough for us. The only issue we have seen, but have been unable to reproduce again, was one occasion where my son managed to get stuck inside one of the platform blocks and was unable to get out (a collision failure of some sort). Seeing hows he's played it every day since you released it I don't really think it's much of a problem though. We will definitely buy the finished game
B) it's some flatters to me.
Those bug with stacking in platform because charachter controller can't do swept collision. I will try to cast ray each time from current frame position to previous, to make my own swept collision. It can helps i thinking.
-
by the way, dont be long away, Soon ill need some personal info from ya B)
Ok, i will be here now often.
You should put this in the Asset Store Games section.
Yes, but first it must be finished
only three minor things I would change/add.
1) control options because controls kind of tricky to use for some people.
2) hints to a objective after a period of time of not reaching a objective .
3) move enemy bots away from player when they spawn
4) make sure the player dose not spawn off of a cliff.
I'll try to implement it. In final version 2 types of controls will be - such as now, and Ctrl+Space at same time, so player can use both of them.
The default controls were very awkward, Space or up arrow key should be jump. Control should be shoot. Enter should be push or whatever that third thing was.
Space is a big button, in such game you need to push in 1000 times, it can broke your keyboard Anyway i will add it as i said before.
But up arrow is impossible in such gameplay, when you attached to metal wall and pressing up - you should crouch up, not jump, i thiking
Never got past the loading screen. Not sure why. Win 7 32-bit. Unpacked it to my desktop. Installed the AL sound thing. Ran the exe and just used the default settings and it gets stuck on loading screen. I let it sit for about 3 mins.
I don't know what reason of it. All other people runs good it's demo. May be you can try to unpack it direct on c:\ or d:\ drive?
Some notes:
- More enemy types would be fun but I'd guess you're working on that.
- Loved the wall jump and wall climb features. Same goes for the switch puzzles.
- Levels may be a bit long. I like the exploration aspect but sometimes I got a bit impatient. Maybe include some shorter levels with larger energy balls that count as 5 instead of 1.
- I like the keys as most indie platformers have a similar setup and it's natural for me.
- Wall jump could still use a little tweaking but pretty smooth and natural for the most part.
- You already noted similar but sometimes the character hangs in the air (next to a ledge).
Some different enemy types will be
You very intolerant man, as me, i thinking that my levels is too short
Thanks for notes.
- The player was kicked down from the roboter and it always respawned next to the roboter and got kicked down again leading to an endless loop.
- The player count goes below zero
Will fix it, thanks
I think you can set the light quality setting higher, it seems like there is very little edge filtering on the shadows.
If i turn on soft shadows it acne all scene and does not matter when shadow map size is 2048 or higher, looks almost like raytrace.
There have not any filtering, only sharpen postfilter that affecting shadow enges because it high contrast.
I also felt the controller needed more friction with the ground. It slides quite a bit which can make some jumps tricky, like that really hard part in level 3.
He, so then the game will be very simple. It's platformer feature - gamer some nervice when cant pass throw some hard place Me myself long time learning to pass those place after creating it .
You have basically as many lights as you want, at no cost, so I would use them! A side scroller with awesome graphics is a niche, but it has little competition, so I would push the graphics to their full extent. I could definitely see this on Steam.
Can't wait to see what you do with this next.
I thinking it have cost. Because each light need to be culled before rendering, and many notebook CPU can't fast render many different "tentity", as i maked stress test: 1000-1500 tentity in scene is not slowdown FPS, 2000 - is many. So that is why i don't using many lights. But in level 2 each of energy sphere have light source.
Maybe in next dark level i will attenuate scene by meny spot lights.
It will be just fine, if it will be sold on STEAM or any other market.
Thanks all of you guys for replys!
Now i know that i need 6-8 levels more for 1 hour gameplay, i thinking it will be enough for such game.
- More enemy types would be fun but I'd guess you're working on that.
-
Hi to everyone. Long time not se you
I'm on a vacation, in willage, here noting to do, so i found my old (one of million) project and gather 4 levels for it.
Features:
1. almost finished gameplay
2. almost all bugs catched from charachter physics (but still have stacking in some places)
3. almost finished render and snene management
Story content and sound will be added later.
In two words: in far away future on earth leave a robots only. Your mission is to rebirth humanity, and for this you need to collect energy that droped in many different places.
Don't ask me about sphere that flying with charachter, it's small robot "The Satellit", it collecting energy and helps you to kick back angry bad robots.
If you past throu all 4 levels please leave here your game time, it's important to know how many minutes of gameplay i need to make next
Hope you will enjoy it
P.S. Scene illumination is still incorrect in forward rendering mode, working on it.
- 1
-
Good if it was possible to be - is to read version.txt before downloading engine
-
I was fighting with it myself. And cant handle controller by z=0. Maybe two physics planes can help you like back and front limits.
-
Does this work in the editor? Do I need to turn anything on? It just looks the same to me.
Yes, it working in editor Nothing needs to turn on. You try to decrace ambient light, and it's effect much vissible on rounded surfaces.
-
You can replace your mesh.frag with this, and all your scene will be highlited by "fresnel" effect.
In top of shader there have line
#define AILY_FRESNEL_HIGHLIGT 1.5
To control fresnel contrast.
-
-
Depth is too strong Possible to break eyes
#define COLOR texture1 #define DEPTH texture3 uniform sampler2D COLOR; uniform sampler2D DEPTH; uniform vec2 buffersize; uniform vec2 camerarange; uniform float camerazoom; include "depthtozposition.frag" void main( void ) { vec2 ps = 1.0 / buffersize; vec2 tc= gl_FragCoord.xy / buffersize.xy; float depth = texture2D( DEPTH, tc ).x; float lineardepth = DepthToZPosition( depth ); float shift=clamp(lineardepth,0,10)/2; /// divide color shift. vec4 color_l=texture2D(COLOR,vec2(tc.x-ps.x*shift,tc.y)); vec4 color_r=texture2D(COLOR,vec2(tc.x+ps.x*shift,tc.y)); vec4 left=color_l*vec4(0,1,1,1); vec4 right=color_r*vec4(1,0,0,1); gl_FragColor=left+right; }
-
TDS like Crimsonland, or 2.5D Mario like Aggror says.
-
-
Could you re-upload the latest version? I'm very interested in this.
Here is it
http://www.leadwerks.com/werkspace/files/file/234-lme-basic/
It's not tested by anyone, and me myself stoped to work with it, so there can be some bugs, but those video i was maked by exact this shaders.
-
File Name: LME basic
File Submitter: Aily
File Submitted: 17 Jul 2011
File Category: Shaders
Leadwerks Material Editor (LME) for Leadwerks 2.3 and 2.4 just in 3DS MAX viewport.
Many thanks to Omid for idea and beta-testing
Features:
You see same picture in MAX viewport and Leadwerks engine.
One click to export entire model with multiple materials.
Materials features:
base:
overlay
alphatest
twosided
cast shadows
maps:
diffuse map
bump map
cubemap reflection map
spec/gloss/reflection map
shader effects:
specular
gloss
bump strenght
fresnel reflections (fake carpaint)
mix two materials "on-the-fly" by vertex color "R" using 2 layer diffuse alpha channel as mask blended edges
Why it need to use:
Very fast and easy model texturing by grass, dirt, e.t.c.
LME divided to 3 parts:
1. "LME_TWO_LAYERS.fx" - 3DS MAX HLSL viewport shader
2. "LME_mesh.frag, LME_mesh.vert" - Leadwerks GLSL shaders with same features as "LME_TWO_LAYERS.fx"
3. Modified Arbuz's material exporter for exporting materials from MAX to Leadwerks
Install:
Turn off 3DS MAX and Leadwerks editor!
1. Copy "LME_TWO_LAYERS.fx" to "3DSMAX/maps/fx"
2. Copy "GMF_MaterialExporter.ms" to "3DSMAX/scripts/startup"
3. Copy "LME_mesh.frag, LME_mesh.vert" to "Leadwerks SDK/shaders/mesh" or your Leadwerks project shaders/mesh
Now you can see video how it works.
Performance:
On some machines meshes with vertex colors rendering some slower.
LME is calculating every material as if it with bump map, so some 1-2 FPS will be lost (not so crytical)
Cubemap reflection is a heavy effect, so not need to waiting from it space ship speed.
-
Oh, you can make those expensive glasses yourself, even turn regular LCD into 3DTV with the right kind of cellophane for like 10$... i've experimented with this stuff a lot.. and other "VR" methods, I even written my own webcam lights/eyes tracker.. if you're lucky enough to own a projector, you must try build yourself one of these:
I haven't looked at your shader yet, but there's some things that can be done to make red/cyan anaglyph more pleasing and minimize eye strain. The biggest offender is the red channel, so it's best to tone it down, usually they put in the red channel just the grayscale version of the image and in cyan only the green and blue, or use a specialized weighted grayscale for the red channel.. I can't find the website right now which had great articles about optimizing red/cyan colors.. another thing is the separation of the left and right images, if it's too big, it causes a LOT of strain on the eye and if it's too little the 3d effect diminishes leaving only dull colors.. From the looks of it you made this as a post filter only? Going from single rendered frame? ... i've never thought you can get as much out of it.. the way i've done it was with 2 seperate renders of my scene (with dynamic offset depending on where the view focus was), but it halved my frame rate this way ... will try your method out
Thanks for info about grayscale in red channel, will try it
And yeah, it's postfilter, very easy to implement. It's not real 3-D, but objects is far or near on screen, i thinking thats enough
-
You so funny Will be much better if Leadwerks was have it own startup dialog with adjustable graphics. Wy each developer need to make bycicle each time? Let it be packed in Leadwerks, and run any application showing this dialog.
-
And as promised, here's the download: http://www.leadwerks.com/werkspace/files/file/233-dat-cave-mine/
Just black squares. Hey man, if everyone say to you that your images is very dark, it's don't mean that everyone have wrong monitor tuning.
The Last Chapter
in Showcase
Posted
And the main program is: