Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

Pages: 1 ... 16 17 [18] 19 20

Author Topic: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)  (Read 76869 times)

nemyax

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #255 on: July 13, 2015, 06:35:50 am »

Is this a game engine?
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 901
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #256 on: July 13, 2015, 08:00:13 am »

Simple answer, Yes!

I assume you are not aware of the original cre8or.
It was an application that utilized the kjx engine and anim8or to make games. But since it's unfortunate end I have decided to restart the project using my own engine and programing everything from scratch.
I kinda hijacked these forums as it still is anim8or related-ish (as it does utilize anim8or)and I do not have anywhere else to post at the moment (am getting a site, but having troubles setting up forum stuff).

And as you can tell by the last few post I am currently working on GLSL support and trying to work out some bugs with that (things like max uniform arrays, gah those stupid max uniform limits are really getting to me ):< ).
Logged

nemyax

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #257 on: July 13, 2015, 08:49:25 am »

How does it use Anim8or? By importing .an8 files, or are there bindings of some kind?
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 901
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #258 on: July 13, 2015, 09:51:29 am »

The Original cre8or loaded the an8 format and used model and figure data which had scripts tied to them. It also used scene data to place said objects and figures in the initial scene for the engine.

How I plan on implementing the an8 file format is similar. I wont be directly tying scripts to the models (as it makes for reuse of models a real big pain). The scripts however will be able to call the engine to render any model loaded up from the an8 file. So a single script could render multiple models. Or you could have a script not render any model or object. This is a big contrast to what it was back in the old cre8or which you had to have a model or object in the scene for that particular script for that model to work.
Also I will possibly use anim8or scenes for something similar to a level editor In which it generates code based on the scene. EG you place a terrain model and a house model at different locations. Cre8or would then interpret this and insert code for those locations and when to draw them.
Although how I implement scenes will be heavily dependent on how the rest of the engine structure turns out.

I do plan on having functions that go around the other way instead of the engine reading stuff from anim8or, the engine will be able to output anim8or files that could then be read back into anim8or.
The original cre8or had something like this in which you could record the physics of your game and it would that segment as an anim8or scene (animating the things that were affected by the physics in game).
One thing I do plan on doing is having skeletal animation and physics that could be recorded and sent back to anim8or (like ragdolls).
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 901
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #259 on: July 19, 2015, 09:12:38 am »

Added some more features to the scripts, and currently trying to figure out how to implement blocks and scope blocks into them.

Now this wouldn't be such a big issue if this were code that was going to be compiled. Because then I could design a compiler that would organize the code in such a way that would it would work just like normal machine code (removing blocks, replacing them with jumps, not using symbolic names for variables etc). But I have to do all this with stacks and ASCII identifiers for functions and parse it all in real time.
 :-\

However I am implementing a preparer optimizer that will try to optimize the scripts to make it faster to read for the real time parser I could then at that point fix a lot of the difficult stuff but it wouldn't solve everything.
I'll post more once I refine what I have written down on scrap paper.

Hopefully this won't take too long to get done.
Logged

nemyax

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #260 on: July 21, 2015, 09:20:05 am »

Added some more features to the scripts, and currently trying to figure out how to implement blocks and scope blocks into them.
What kind of scripting language is this? And why do you have to parse it continuously instead of once?
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 901
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #261 on: July 21, 2015, 10:06:15 am »

It's the scripting language I am making from the ground up based on c style syntax that utilizes the engine
(currently it doesn't have a name so I just refer it to as scripts).
This is the way I am making it so people can develop things with the engine without having the complexity of a compiler.
The reason why I need to continuously read from these is because the main loop will be handled through these; as well as other loops that a person could add if they so desired (eg A for loop).

Basically the engine has a parser which just reads the scripts top down, and certain control structures can influence and tell the parser how to read from these scripts like for example loops and if statements.

Also you can have multiple scripts and call the engine through one script to read from another.
So if you load another script through the main script....
Code: [Select]
New Script testscript = load_script(filelocation);
 
Then call it to run....
Code: [Select]
runs_script(testscript);
 
The parser will read from testscript top down until it reaches the end of said script.
From there it will continue reading from the previous script at the next line.

Please note that the syntax of these functions aren't 100% official yet, even after the initial public release it may change (a lot of things will when I get feedback, but they will change for the better (I hope ;p )).

P.S. Are you familiar with programming at all?
Logged

nemyax

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #262 on: July 21, 2015, 10:51:35 am »

I see, thanks. Have you considered embedding something like Lua and decided against it?

Are you familiar with programming at all?
I've done some Python for Blender and Erlang for Wings.
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 901
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #263 on: July 21, 2015, 06:12:36 pm »

I have considered using lua and even pearl but I wanted more control over the implementation on these as well as the syntax. Also by making my own scripting language and I make the C++ coding structure much similar to the rest of the engine, which in the long run is a much nicer thing.

And wow I haven't heard of anyone using Erlang for a long while :P
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 901
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #264 on: September 06, 2015, 07:52:21 am »

Been focusing heavily on the sound part of the engine the past week and I finally got a high quality sample rate conversion working on the fly.
I'm having it set up by default to re-sample any sounds loaded into the engine to be the same with what the system is playing back audio on.

Because if you run audio that was recorded at 96000 samples per second and you try playing it back at the more standard 44100 it will sound very deep and low tone; and when you do the opposite, playing audio from a low sample rate (like 22050) to a higher sample rate it would sound high pitched and be played back very fast (like the chipmunks).

So this is where re-sampling comes in handy. If you are running your audio device at a higher or lower sample-rate the engine would re-sample the audio to match the correct sample-rate to make sure things sound correct. This pretty much involves going through every single audio sample there is and finding where the new sample would lie (time wise) one the original and interpolating between the original samples to get the new one. Right now I just have a linear interpolation implemented for this job but I will hopefully add support for other forms of interpolation (for even more high quality).

I posted a screenshot with some debug info on it to help illustrate how efficient this is for on the fly conversion.
Heldon's song, Perspective II is about a 3 min song but has 48000 samples per-second with a total of 9387520 samples.
Converting all that to 44100 to about 0.639272 seconds. Considering this really only needs to happen once per audio file and there wouldn't be that many long audio files being loaded up at once I am extremely happy with the result; and if you look at the result for chime3, a much smaller audio file (about 10 seconds long at 96000 samples a second), you can see how feasible this would be for many small files.


Right now I have it setup like this, Sound = LoadSound (filename); PlaySound (Sound); And the engine takes care of the rest.
In the end I'm going to aim for having the user just load a sound and play it and it would work by default and then giving them the option to do all this manually for more advanced uses.
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 901
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #265 on: September 16, 2015, 07:04:57 pm »

[/youtube]

Ps, I haven't gone to sleep yet.
« Last Edit: September 16, 2015, 07:11:15 pm by cooldude234 »
Logged

UnknoWable

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #266 on: September 17, 2015, 03:34:42 pm »

Awesome, Cre8oristhe/Cre8orExpert here, are you using Forward rendering for the lighting? Happy to see this much of progress, i'm also working on my engine, from zero once again, this time without fixed pipeline (only GLSL).
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 901
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #267 on: September 17, 2015, 08:09:21 pm »

Right now forward rendering all done in an uber-shader. I plan on implementing various forms of lighting for different use cases.
Logged

davdud101

  • Sr. Member
  • ****
  • Posts: 950
  • Couldn't ever use Blender or Maya. Anim8or's good.
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #268 on: September 18, 2015, 07:35:23 am »

I love watching this project grow, Cre8or! Funny when I go back and see I was the first reply to the topic 4 years ago, and not only are you still hard at work but the progress is evident. I'm staying in this loop for sure!
Logged
?

cooldude234

  • Sr. Member
  • ****
  • Posts: 901
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #269 on: December 27, 2015, 09:38:09 am »

Well I am in the progress of making a video explaining the current progress of the engine and I am hoping to get that out this week sometime before the new year.
In the mean time however I have decided to make a smallish post somewhat directed at Raxx here (hint hint);p

So while I was on holiday time I took another look at random point generation on pollygons (once again specifically a 3D triangle) this time being successful. At first I was trying to generate a value for one side of the triangle and get a horizontal line for this by getting the same distance from vertex A at the adjacent line and then generating a random value between those points. I realized this was wrong for it favoured vertex A and gave a higher probability to generate more points near it (because vertex A had less space near it between the two edges it was connected to).



I also named the two lines I was generating values for U and V which is wrong in the Barycentric sense (since Barycentric coordinates is all about balanced raitos of mass). At this point (and after many different rough sketches) I decided to take another look at the barycentric system and found the formula for the barycentric collision detection. I took a look at it and decided to do it in reverse (instead of trying to find U and V in the formula I substituted for U and V with a random value).

This is the formula (Where A B C is the vertices of the triangle, and U and V is the coordinates)
A + U * (C - A) + V * (B - A)

So I substituted for U and V with a random value between 0 and 1 (as a floating point). But doing so results in a square of random points. This is because when the sum of U and V are greater than one, the point the formula makes will be outside of the triangle (if the numbers are below zero they will be as well but in the opposite direction). Once again I set out to solve this and it took me a while, with some attempts favouring A B or C (or all but the center) before I realized the simplest solution.
I simply have an if statement to check whether the sum of U and V is greater than one. If it is then I just flip the values from one by taking a value of 1 and subtracting both the UV coordinates (individually) moving the points outside of the triangle back onto it and evenly without any favouring.

In pseudo code it looks like this

U = random_value_between (0,1)
V = random_value_between (0,1)
   if (U+V > 1.0)
   {
      U = 1 - U
      V = 1 - V
   }   

GeneratedPoint = A + U * (C - A) + V * (B - A)


So if you want to use this for your phur scripts raxx go head its ridiculous fast.
I can generate 1,000,000 points along a single triangle in about 0.249605 seconds
and 1,000 in 0.000247805 seconds on a i7-4770k processor.






EDIT: Image uploading works again, thank-you Steve!
« Last Edit: February 14, 2016, 08:32:54 pm by cooldude234 »
Logged
Pages: 1 ... 16 17 [18] 19 20