GLBasic forum

Main forum => Off Topic => Topic started by: Wampus on 2013-Jan-19

Title: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: Wampus on 2013-Jan-19
I'm not sure how to describe this...I need some tool to create interesting paths for enemies to follow in a 3D game. For instance, something like the following video but in 3D:-



Can anyone think of such a tool? Or have an idea where I might be able to find one?

I need to create enemy wave patterns for a Space Harrier clone I'm working on. I only have a week to complete the game and I started today. Here is what I have so far:-



If you look at this remake of Space Harrier you'll see the kind of enemy wave movement patterns I'd like to be able to add to me game:-



I'm all ears! I need a solution soon. Not sure what to do.
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: mentalthink on 2013-Jan-19
HI Wampus, In my game it's 2D but in 3D it's the same only whit Z...

I explain how I did, I did a classe, and a machine State, in example the first movement it's a Senoidal, the second it's an Staright line, and so on... changing some values you can modifiy very easy this functions whit parameters, more or less complex... and you obtain derivates for each one.

Another way it's take an Editor 3D, comercial, I think the Special for Glbasic, Blender not, the other, I don't remenbe de name, and draw Splines, export this data into an array , and whit a counter follow this vertex what makes the splines... the trouble I think if the lines have a lot of points, the memory can be affected... or if you know how do it... whit interpolation betwen vertices if the Spline.

Another way it's do a simple editor, put 2 cameras from a side and from top, and drawing points and some maths, you can do a simple trajectory Editor.

Really not it's too much complex.

Uhmm Space Harrier... I burned my Joystick in Amstrad CPC, playing to this game... and I thinked a lot of time make something similar whit GLBasic, and don't see too much complex...

Regards Wampus , and if you need an explanation more in depth, comment me, and I try to put some code example.

Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: Hemlos on 2013-Jan-19
I'm not sure how to get mental thinks idea from a spline to an array, but I think it's a good start.


I wrote a beziers library posted in the math section here.

The beziers builds an array like mentalthiink. Is talking about.
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: Hemlos on 2013-Jan-19
Beziers link:

http://www.glbasic.com/forum/index.php?topic=3839.0
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: mentalthink on 2013-Jan-19
Thanks Hemlos sometime Ago I try to searh your lib... In fact it's too much better use your lib, You don't have to put any info in array... Perhpaps a spline into an array don't it's too much for the memory, but you need a lot of points for not see rectangular forms... another way the interpolation, but i don't have any idea...

If can help, when I did my Editor, make 2 years ago for the Black Sun, I don't use, for make the patterns, I use a little trick, I draw in example a line from the x1, to x2 at this point if I need a curve, I put a Sin from x2, to another point, and making simple trigonometric functions you can have  a very complex patterns...

I try the better choice at this moment it's the Hemlos lib, and accomodate to your needs.
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: Wampus on 2013-Jan-20
Thanks guys! That's so helpful. I have a good chance of making an editor in time for Monday now. I'm going to try to combine Helmos's beziers library with additional sine/cosine movements to make some enemies *swim* through the air. Mentalthink I thought about doing your thing with the two camera, one from side and one from top. However, this is what I just coded and it should work. I convert X,Y and Z co-ords into a kind of isometric projection:-

(http://i904.photobucket.com/albums/ac242/wheeethefibble/webpics/waveeditor_zpsc4a180cf.png)

Again, thanks! I have a shot at this now.
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: mentalthink on 2013-Jan-20
Well Wampus I commnet, form a side and top, only for this commes to my head... But if you work whit a perspective camera and you set the cos and the varibales for make the splines or paths, in only 2 axis, after you can make some boxes or something for moving the points and make the shape like you want...

If you want ideas, search something in google, for have a little idea about the editor... in example 3d Studio Max Splines, or modify Spline in Cinema 4D, LightWave, Maya... and you will have a little idea about the 3D modeler...

I think I have my BlackSun Editor, it's a version old, in the real version I don't use Editor, but perhaps you can extrac some code for the sin and cos... Really I don't remenber how I did it, and I don't know if this part of code can be very confusing, for how I wrote the Code...

If you want comment me and I put here, I think I have to be in my HD yet... and else if need help I can write some somple for you can see a bit the way I wanna say...

Regards Wampus, and rebenmber to show us this Editor, I love make this things in GLbasic, really it's a very fun thing...

Good end of week Sirs...
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: matchy on 2013-Jan-20
Space Harrier is a favorite and I really like your remake so far and I presume you'll add shadows next.

Will there be originally designed games in these monthly projects?
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: Wampus on 2013-Jan-20
Quote from: mentalthink on 2013-Jan-20
I think I have my BlackSun Editor, it's a version old, in the real version I don't use Editor, but perhaps you can extrac some code for the sin and cos... Really I don't remenber how I did it, and I don't know if this part of code can be very confusing, for how I wrote the Code...

It may be confusing but I'd still be interested. :)

Quote from: matchy on 2013-Jan-20
Space Harrier is a favorite and I really like your remake so far and I presume you'll add shadows next.

Will there be originally designed games in these monthly projects?

Shadows are coming. I have to see how fast they'll draw since there will be a great many of them. Kanonet's billboard sprite routine has come in handy. Maybe I can modify it to draw perspective-correct shadows too.

I don't know how much originally designed games *I'll* so. Plenty of strange and wonderful games others have done already this month. Next month I'm planning on doing something with the isometic look using similar code to what I wrote before (http://www.glbasic.com/forum/index.php?topic=8151.0). Also, I want it to run on Android since my Space Harrier tribute can't do that.

BTW the enemy wave path editor is almost finished. I have to add modifying existing control points for the bezier curves and saving/loading. Here is a screenshot:-

(http://i904.photobucket.com/albums/ac242/wheeethefibble/webpics/waveeditorprogress_zps8d304320.png)
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: mentalthink on 2013-Jan-20
Abotu shadows I think the best way it's using billboards, or make somthing whit 2D getting the 3D coordinates... usiign real shadows, sure you game drop down the FPS a lot... I try some times, if the model it's a bit more complex than a box, really it's  a problem, for PC I'm not sure , but in mobile devices the shadows kills the CPU.
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: Hemlos on 2013-Jan-21
Looks like the beziers came in handy.
Im glad someone is putting it to good use, it looks really cool!
:good:
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: Wampus on 2013-Jan-25
It looks OK in the game too, though much tweaking could be done. Here is a clip of where I am so far. I think I'll be finished in time for One Game a Month deadline.

Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: mentalthink on 2013-Jan-25
Wampus this it's the real game?¿, It's very very nice... I don't know if are the idea of the graphics but the effect it's very very impact...

Nice nice!!!, and very faster working in pattern and all the things...

Greetings!!!!
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: matchy on 2013-Jan-25
Okay that's looks spectacular and everything is all sweet, especially the dragon. The porcupine is a joke right? If not, WHY?
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: kanonet on 2013-Jan-25
Wow looks really nice, dont think i have seen a GLB 3D game that looks better. :good:
All the objects are billboards, right? But how did you do the shadows, im sure this are not GLB shadows (and billboards could not cast real shadows lol)?
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: Wampus on 2013-Jan-25
Aww thanks guys :)

Matchy the porcupine is deadly serious. He woke me from sleep over a week ago and got up real close to my face, staring at me with furious red eyes. In an intimidating squeaky voice he said, "You're going to make a game about someone like me flying through the air, popping balloons and shooting jellyfish. Do it and don't complain dude, or I'll come back and give you a dose of spikey medicine. You don't want that..." After that he waddled away, mumbling vague angry threats.

Kanonet all the objects are billboards. The shadows are simply 'flattened' versions of billboard sprites, so the y and z co-ordinates are exchanged. There was some problem with the shadows antialiasing badly regardless of correct z-order but I've fixed that now by giving them variable y values that are still imperceptible so they all look like they're on the same plane.
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: Hemlos on 2013-Jan-25
looks good wampus, are you using the glb fog, and/or mippmaping?
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: Wampus on 2013-Jan-25
glb fog. I was using the exponential setting at first. I changed to linear since it was too hard to see what was heading towards the player. Now its less like 'Silent Hill', more like 'Space Harrier'.

Haven't tried mipmapping yet. Will be curious to see what difference it makes in performance and visuals, or if it changes anything at all.
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: kanonet on 2013-Jan-26
Ah so this shadows only works, cause you have a flat ground and you dont cast shadows on other objects.
Title: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: Kitty Hello on 2013-Jan-26
That's GLBasic? Dude, I was unaware that you can make this hot stuff. Keep going.
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: Wampus on 2013-Feb-01
Thanks for your help everyone. Managed to submit the game in time. Was within an hour of February.

Here is a link to the Windows version (http://www.livingmidnight.com/porcupop/PorcupopAlpha.zip). I included a thanks note to those that helped. I used your forum names but I could change that to real names if you want.

I'm exhausted. That was kind of ambitious, given how little time I had to do it in.
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: Hemlos on 2013-Feb-13
thats awesome!

you can use my name "Neil Silver" if you wish next time you edit the game, or for future games.
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: Hemlos on 2013-Feb-13
i tried it on my pc, worked great with an older cpu and windows xp.

i tried it on an old laptop with windows 7 too...this is a screenshot showing some glitches.



[attachment deleted by admin]
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: mentalthink on 2013-Feb-13
HI Wampus thanks for put my name in your game, but guy not it's necessary  :good: :booze: :booze: :-* :-* , I think you have to do this for mobile devices...
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: bigsofty on 2013-Feb-13
How did I miss this, it looks stunning, looks like you could be on to a winner here Wampus! :good:
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: erico on 2013-Feb-14
Quote from: bigsofty on 2013-Feb-13
How did I miss this, it looks stunning, looks like you could be on to a winner here Wampus! :good:

Almost similar...I´m such a great fan of such kind of game!
I had no words :)

Game goes perfectly on my end.
Check "feedback" on msx2 for inspirations!

But the game reminds me sooo muuch of Penguin (Yume Tairuki)!
Oh my, really great stuff.

Critics on: I´m not sure about the shootings though, don´t quite feel intuitive, but that has always been a hard stuff with this visualization.
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: Wampus on 2013-Feb-14
Thanks for the encouragement. I should put a proper link and video on my website now, since I only have that link so far. :)

Next time I'll put real names in the 1GAM page before the game starts. I didn't this time because I was in such a rush. I submitted the game with less than 45 mins left of January!

Quote from: Hemlos on 2013-Feb-13
i tried it on an old laptop with windows 7 too...this is a screenshot showing some glitches.

Ahh, that is interesting. The game tries to detect the desktop size and resize the window to fit nicely. I bet I've forgot to change the VIEWPORT settings accordingly or something like that. I hope I can recreate this problem as it may occur with anything that uses my same code base.
Title: Re: Does anyone know of a path editor for 3D? To be used for enemies in games?
Post by: erico on 2013-Feb-15
Really great and smooth stuff Wampus!

I always loved the lotus,harrier,afterburner...etc style, I think it has a huge potential.
great deeds you did there! :)

ps: what about 2 players on the same machine? Dual analog joy support? :-[