What Are You Working On? V10 -- April 2012 Edition
313 replies, posted
[QUOTE=skullorz;35722434]And there goes onslaught, except in your's you aren't building bases.[/QUOTE]
Fuck it I give up on having an original idea.
[media]http://www.youtube.com/watch?v=XEl5byHdkZc[/media]
wHATs goin on guys
tHATs awesome
(pssst its all client side)
[QUOTE=Hentie;35726131]Fuck it I give up on having an original idea.[/QUOTE]
To be completely honest with you, I can't get my new Onslaught to work right. I set up a system for an item shop where you could buy items, but the item files aren't being included correctly.
And besides, in your gamemode you have constant assaults of enemies and supply drops, while Onslaught has on-and-off attacks where inbetween them you build bases with props.
[QUOTE=Hentie;35726131]Fuck it I give up on having an original idea.[/QUOTE]
How I feel about RagMod.
Roller coasters make you crash when you crash :v:
[thumb]http://i46.tinypic.com/2rfsygj.png[/thumb]
[QUOTE=samm5506;35739533]Roller coasters make you crash when you crash :v:
[thumb]http://i46.tinypic.com/2rfsygj.png[/thumb][/QUOTE]
my coaster was BETTER
oh god my skype in corner
[QUOTE=samm5506;35739533]Roller coasters make you crash when you crash :v:
[thumb]http://i46.tinypic.com/2rfsygj.png[/thumb][/QUOTE]
I'm going to crash this roller coaster into your faaaaaaaaaaaaiNO CARRIER
[editline]27th April 2012[/editline]
[QUOTE=GameDev;35739541]oh god my skype in corner[/QUOTE]
sup matt
Does anyone know why
[lua]local chars = {};
for i = 1, 6000 do
table.insert( char, "asd" );
end
local txt = table.concat( chars );[/lua]
is faster than
[lua]local txt = "";
for i = 1, 6000 do
txt = txt .. "asd"
end[/lua]
I don't know the "programmatical" reason but I do know table.concat is faster than .. (obviously)
[QUOTE=Hentie;35750680]Does anyone know why
[lua]local chars = {};
for i = 1, 6000 do
table.insert( char, "asd" );
end
local txt = table.concat( chars );[/lua]
is faster than
[lua]local txt = "";
for i = 1, 6000 do
txt = txt .. "asd"
end[/lua][/QUOTE]
[url]http://www.lua.org/pil/11.6.html[/url]
[QUOTE=Instant Mix;35712762][media]http://www.youtube.com/watch?v=QLlbtO6wB1E[/media]
Was quite some time ago so I've no idea if they still have the code , but it certainly looks like what you'd need.
This is a more advanced version of what I meant , but you can see what I mean.
[img_thumb]http://www.rollercoasterpro.com/basics/ids/b_and_m/b_and_m_dive.jpg[/img_thumb]
Two cylinders , one big ass-rectangle , and occasional rectangles connecting all 3.[/QUOTE]
Excellent i like the animations of certain generators, along with the wiring it creates for linking. very creative way to have a wire model sort of thing to link.
[QUOTE=xam678;35751080]Excellent i like the animations of certain generators, along with the wiring it creates for linking. very creative way to have a wire model sort of thing to link.[/QUOTE]
I'm digging how people don't realize that the youtube video is 2 years old.
[QUOTE=Hentie;35751282]I'm digging how people don't realize that the youtube video is 2 years old.[/QUOTE]
[QUOTE=Hentie;35751282]the youtube video is 2 years old[/QUOTE]
[QUOTE=Hentie;35751282]2 years old[/QUOTE]
o_q
[QUOTE=Hentie;35751282]I'm digging how people don't realize that the youtube video is 2 years old.[/QUOTE]
All the best things seem to never get finished...
[QUOTE=vexx21322;35751369]All the best things seem to never get finished...[/QUOTE]
> find an awesome show on Netflix/Hulu/TV/whatever
> ONLY THIRTEEN EPISODES
[QUOTE=dingusnin;35710430]Well, Here is what i am working on:
[lua]
local Sphere
local function Distance(p1,p2)
local offsets = p1:GetPos()-p2:GetPos()
return math.sqrt(offets.z^2 + math.sqrt(offsets.x^2 + offsets.y^2))
end
[/lua]
[/QUOTE]
There's already a function to get distance between two vectors.
[lua]
p1:GetPos():Distance(p2:GetPos())
[/lua]
[QUOTE=dingusnin;35710430]
[lua]
hook.Add("think","Uprop",UpdateProp)
[/lua]
[/QUOTE]
hook.Add is case sensitive.
[lua]hook.Add("Think","Uprop",UpdateProp)[/lua]
[QUOTE=dingusnin;35710430]
I am trying to get a spherical gravity thingy, But so far it is yeilding no positive results...
Anybody got some surgestions?[/QUOTE]
I'm 99% sure that you copied most of this math from somewhere, since it makes almost no sense.
If you want something to move towards another point you don't need any trigonometry.
[lua]
local diff = center_of_gravity - entity:GetPos();
local norm = diff:GetNormal();
entity:SetVelocity( entity:GetVelocity() + norm * 1000 * FrameTime() );
[/lua]
Where center_of_gravity is a vector.
If you want the entity to orbit the point then you must also apply a force perpendicular to the normal.
I noticed half of those bugs after i posted it. And I have the calculations on some papers if you wish to see them?
First off all locations are local, so there are a lot of substractions,
So to calculate the yaw, you look down at the sphere. Draw 2 dots: the Sphere center and the player position. Then you draw the triangle, which is rectangle on the x and y lines.
Then, to calculate the pitch, I had to calculate the hypotenuse of the yaw triangle, meaning pythagoras theorem, this will be the adjacent length, and the opposite length will be the z offset.
And only after did i notice the can model has offsets :(
Added basic arithmetic (register display is decimal).
[img_thumb]http://cloud.steampowered.com/ugc/541800134224074064/EA5D4B882CF756F41065D55E211D0215A79ABA62/[/img_thumb]
Source:
[code]
Set [0x8000], 0xf053 ; S
Set [0x8001], 0xf065 ; e
Set [0x8002], 0xf074 ; t
Set [0x8004], 0xf041 ; A
Set [0x8005], 0xf02c ; ,
Set [0x8007], 0xf037 ; 7
Set [0x8008], 0xf030 ; 0
Set [0x8020], 0xf041 ; A
Set [0x8021], 0xf064 ; d
Set [0x8022], 0xf064 ; d
Set [0x8024], 0xf041 ; A
Set [0x8025], 0xf02c ; ,
Set [0x8027], 0xf034 ; 4
Set [0x8028], 0xf030 ; 0
Set [0x8040], 0xf053 ; S
Set [0x8041], 0xf075 ; u
Set [0x8042], 0xf062 ; b
Set [0x8044], 0xf041 ; A
Set [0x8045], 0xf02c ; ,
Set [0x8047], 0xf035 ; 5
Set [0x8048], 0xf030 ; 0
Set A, 70
Add A, 40
Sub A, 50
:Infinity
Set PC, Infinity
[/code]
[QUOTE=SiPlus;35753377][code]
Set [0x8000], 0xf053 ; S
Set [0x8001], 0xf065 ; e
Set [0x8002], 0xf074 ; t
Set [0x8004], 0xf041 ; A
Set [0x8005], 0xf02c ; ,
Set [0x8007], 0xf037 ; 7
Set [0x8008], 0xf030 ; 0
Set [0x8020], 0xf041 ; A
Set [0x8021], 0xf064 ; d
Set [0x8022], 0xf064 ; d
Set [0x8024], 0xf041 ; A
Set [0x8025], 0xf02c ; ,
Set [0x8027], 0xf034 ; 4
Set [0x8028], 0xf030 ; 0
Set [0x8040], 0xf053 ; S
Set [0x8041], 0xf075 ; u
Set [0x8042], 0xf062 ; b
Set [0x8044], 0xf041 ; A
Set [0x8045], 0xf02c ; ,
Set [0x8047], 0xf035 ; 5
Set [0x8048], 0xf030 ; 0
Set A, 70
Add A, 40
Sub A, 50
:Infinity
Set PC, Infinity
[/code][/QUOTE]
What.
[QUOTE=dingusnin;35753325]I noticed half of those bugs after i posted it. And I have the calculations on some papers if you wish to see them?
First off all locations are local, so there are a lot of substractions,
So to calculate the yaw, you look down at the sphere. Draw 2 dots: the Sphere center and the player position. Then you draw the triangle, which is rectangle on the x and y lines.
Then, to calculate the pitch, I had to calculate the hypotenuse of the yaw triangle, meaning pythagoras theorem, this will be the adjacent length, and the opposite length will be the z offset.
And only after did i notice the can model has offsets :([/QUOTE]
you need to simulate the centripetal force (normal) and path of inertia (perpendicular of the normal):
[img]http://images.wikia.com/schools/images/a/a8/A4centfc.jpg[/img]
[QUOTE=DarkShadow6;35753425]What.[/QUOTE]
It's DCPU-16 assembly code used in the demonstration.
[QUOTE=SiPlus;35753687]It's DCPU-16 assembly code used in the demonstration.[/QUOTE]
DCPU... Everyone's all about that. I see it everywhere. What is it?
[QUOTE=DarkShadow6;35753808]DCPU... Everyone's all about that. I see it everywhere. What is it?[/QUOTE]
[url]http://www.0x10c.com/[/url]
[url]http://www.0x10c.com/doc/dcpu-16.txt[/url]
[QUOTE=_Undefined;35753922][url]http://www.0x10c.com/doc/dcpu-16.txt[/url][/QUOTE]
It's overoutdated, here are latest specs: [url]http://dcpu.com/highnerd/dcpu16_1_5.txt[/url]
[QUOTE=Hentie;35753552]you need to simulate the centripetal force (normal) and path of inertia (perpendicular of the normal):
[img]http://images.wikia.com/schools/images/a/a8/A4centfc.jpg[/img][/QUOTE]
Yes, But how would i set the angles to the prop i have parented the player to? Otherwise the rander angles wouldn't change.
[QUOTE=dingusnin;35754121]Yes, But how would i set the angles to the prop i have parented the player to? Otherwise the rander angles wouldn't change.[/QUOTE]
Then you're looking at applying torque.
Check out PhysObj.ApplyForceOffset( Vector force, Vector position )
As far as I know, you cannot use that on players. This hole idea was an orbital pvp. If players don't rotate around planets then I won't work.
[QUOTE=dingusnin;35754280]As far as I know, you cannot use that on players. This hole idea was an orbital pvp. If players don't rotate around planets then I won't work.[/QUOTE]
I thought you were trying to use it on a prop.
If you're trying to make players do that you'd have to edit how players set up their movement and all that, you just can't set their velocity and angle.
If you want the player to face the right way I guess you have to set their angle to ( player:GetPos() - center_of_gravity ):Angle():Up():Angle()
and then adjust the yaw.
Sorry, you need to Log In to post a reply to this thread.