Author Topic: Glib : a 3D graphics axe library  (Read 79819 times)

0 Members and 2 Guests are viewing this topic.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #180 on: September 12, 2013, 02:36:57 pm »
Just a thing though : the text actually slows down the program. :P Try removing it and test it again in wabbit. ;)

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #181 on: September 12, 2013, 02:40:51 pm »
yeah text command slow down the program a lot. But in comparaison of th texture routine, it's almost nothing  ;D
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: GLIB a graphics axe 3d librairy
« Reply #182 on: September 26, 2013, 02:28:58 am »
By the way I just saw the screenshot at http://tiplanet.org/forum/archives_voir.php?id=20611 and it looks really great O.O
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: GLIB a graphics axe 3d librairy
« Reply #183 on: September 26, 2013, 10:33:49 am »
that's looking awesome O.O

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #184 on: September 26, 2013, 11:27:34 am »
this is the exact screen that as been posted by nikitouzz a few post ago, but I am glad that you like it  :D

EDIT : by the way, I forgot to tell you that a little update is coming =)
« Last Edit: September 26, 2013, 11:28:01 am by TheMachine02 »
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: GLIB a graphics axe 3d librairy
« Reply #185 on: September 26, 2013, 01:48:50 pm »
New update? Will it support shaders? : ;D

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #186 on: September 27, 2013, 01:05:48 pm »
What do you exactly want as shader ?  ;D
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #187 on: September 27, 2013, 03:04:17 pm »
* Streetwalker pokes TheMachine to add OpenGL support
* Streetwalker runs

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #188 on: September 28, 2013, 08:59:27 am »
lol  :P I am getting close, you know ?
*TheMachine02 run too

Ok, I work a little on shaders, and I have add a vertex shader and a pixel shader  :)

EDIT : I also got idea on adding skybox
« Last Edit: September 28, 2013, 08:59:49 am by TheMachine02 »
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #189 on: October 01, 2013, 03:49:29 am »
Just a little question to all of you :

What do you want me to add to the library?  (new feature .... )  :P

AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: GLIB a graphics axe 3d librairy
« Reply #190 on: October 01, 2013, 03:06:40 pm »
Just a little question to all of you :

What do you want me to add to the library?  (new feature .... )  :P


The following shaders/effects: Fog, Water, real-time shadow casting, DOF, God rays, motion blur, bloom

Now serious:
Better documentation and more examples: The current documentation is a bit hard to use, and (not meant offensive), it kinda feels incomplete and like it was written in a hurry. And the examples do demonstrate what the engine can do, but it would be very usefull to programmers if you'd add comments (maybe in a .txt file so it can be read on a computer) for everything that uses a part of the library to describe in detail why it's there and what it does. A simple tutorial to get started might be nice too.

Finally, a real feature: It would be nice to have some basic collision detection. It would be okay for me if it could only handle rectangular shapes, even if they are alligned to the x and y axes. This is easy to program and doesn't require a lot of calculations so it is not slow.
If you're unsure of how to implement collision detection, I wouldn't mind to help.

BTW: About the documentation: It can be hard to write clear documentation because even when it's incomplete, it will be clear to you because you know how it works. Therefore, it helps if you let someone read it who hasn't used the library yet, and if he(/she) understands it, then you can be almost sure that most other people will understand it too.
« Last Edit: October 01, 2013, 03:12:14 pm by ben_g »
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: GLIB a graphics axe 3d librairy
« Reply #191 on: October 01, 2013, 04:27:10 pm »
^ That. Although I tried, I've never been able to do anything with the lib. Too complex and bad documented, that is. The doc seems like notes you left for yourself.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: GLIB a graphics axe 3d librairy
« Reply #192 on: October 02, 2013, 12:26:01 am »
What do you exactly want as shader ?  ;D
I think he wants you to make Crysis for calcs.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: GLIB a graphics axe 3d librairy
« Reply #193 on: October 02, 2013, 11:51:17 am »
Readme thing : Yeah I realized this a few week ago, and I started to write news one  :P .... but after 2-3 tries I afraid that I really suck at making a readme ><
The lib is complex in itself to gain speed. It's very low-level in some part, and as I write it, I don't really succed to explain these difficulties.

Tuto thing : In fact I  never though to make a tuto : it's a reallty good idea, and I see what I can do.

3d thing : Well I totally forgot the collision system  ;D  the point is I have no idea how to do it. Help is appreciated  :)

The following shaders/effects: Fog, Water, real-time shadow casting, DOF, God rays, motion blur, bloom

Well  I guess Fog, DOF, God rays, motion blur, bloom is not really calc level.
But I work on some real-time shadows casting, and now I can have a sun with shadows ! (pretty limited for the moment though : shadows only on the ground (no
user-defined plane) , and the light source is multi directionnal and must be the most higher point in the decor)
« Last Edit: October 02, 2013, 11:51:49 am by TheMachine02 »
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: GLIB a graphics axe 3d librairy
« Reply #194 on: October 02, 2013, 03:21:12 pm »
Well  I guess Fog, DOF, God rays, motion blur, bloom is not really calc level.
But I work on some real-time shadows casting, and now I can have a sun with shadows ! (pretty limited for the moment though : shadows only on the ground (no
user-defined plane) , and the light source is multi directionnal and must be the most higher point in the decor)
You really have shadows? That's actually pretty awesome for a calc engine. The suggestion of those effects was just a joke.

For collision: if a simple system like the one I used in my racing game, it's not hard at all:
This is how the collision with the ground is done:
The player should have a variable that represents the speed at which it falls. At the beginning of the update loop, increase that variable with a value that represents the gravity, and make sure it doesn't go above a certain value (let's call that value the terminal velocity) to make sure that if the player falls a long way, it still won't go so fast that the collision checking may miss it. Play around with that value to see what looks realistic (depends on the size of your units and the framerate). At the end, substract the falling speed variable from the Y-coordinate of the player(Y is the up axis, right? Otherwise, use the axis that points up). You can repeat this for other objects that need collision checking, but every one of those needs it's own falling speed variable.
For a simple collision with an infinite and flat ground (the simplest and fastest kind), you basically do this:
If(Y <= [Ground level]){
    FallSpeed = 0;
    Y = [Ground level]
}
In words: if the player/object is at or below the grown level, set the fallspeed to 0, and set the Y position of the player (or object) to the ground level (so that if the player hass fallen slightely further than ground level, the player will still end up on the ground). This method is quite fail-safe because it's impossible for the player to fall trough this floor, even when the player fals at a high velocity.

You can also add position parameters to the above method. This can be used in the combination with the previous method to create a raised area in the otherwise flat world:
if(X >= Floor.Xstart && X <= Floor.Xend && Z >= Floor.Zstart && Z <= Floor.Zend && Y <= Floor.height){
    FallSpeed = 0;
    Y = Floor.height
}
With this kind of platform, it is also impossible to fall trough it, but it needs additional collision checking for the sides, because otherwise, a player walking into the edge of the platform will be teleported to the top of the platform. It's also possible to do this with platforms that aren't rectangular or aren't alligned with the X/Z axes, and for that, you replace the if above with one that checks if the player is inside the 'shape' of the platform. This does need a lot more processing power, though.

I'll explain some other things, like simple walls and 'floating' platforms (where you can walk underneath and stand on top of them) tomorrow.

BTW: The FallSpeed variable can also be used for an other application than falling: jumping. Set it to something negative, and the player will go up, decellerate, accelerate again towards the floor, and stop when it hits the floor. By setting this to a large negative value, the player will fly up really high.
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated