Author Topic: Help setting up a project on CodeBlocks  (Read 1258 times)

Danny

  • Newbie
  • *
  • Posts: 28
    • View Profile
Help setting up a project on CodeBlocks
« on: October 13, 2016, 01:40:08 pm »
Hi!
I have been programming with the Jo-Engine using Notepad++, since I'm used to program in C using Netbeans with the C/C++ plugin I tried to set up a project there without much success. I was wondering if it is easier to setup a project with Code::Blocks? The thing I miss most from netbeans is the ability to hold ctrl + left mouse click on the includes and the functions to jump to their location/definition.
If someone has done this before I would really appreciate some help :P.

mindslight

  • Administrator
  • Jr. Member
  • *****
  • Posts: 81
    • View Profile
    • Jo Engine
Re: Help setting up a project on CodeBlocks
« Reply #1 on: October 14, 2016, 01:58:45 pm »
You have (almost) the same feature in Code::blocks (see attachement) :

Maybe I will add a netbeans project on the repository because it's one one the best IDE

Danny

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Help setting up a project on CodeBlocks
« Reply #2 on: October 14, 2016, 09:25:11 pm »
That would be great ;D Thank you!
What I tried to do before was to add the JO-Engine header files to the Include Directories and Include Headers under the Project Properties - Build - C Compiler options but it didn't work. Maybe it will only work if I'm actually using a library file on the Linker options. I couldn't figure out how to make the compiler bundled with Jo-Engine work on netbeans either.

Danny

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Help setting up a project on CodeBlocks
« Reply #3 on: October 14, 2016, 10:29:45 pm »
Well I found a not so elegant way around it  :P.
What I did was to copy all files to the same directory, although they are all in the same place I can now ctrl + left mouse click to jump to the definitions, it also doesn't show warnings all over the place.
I added an attachement of the Netbeans 8.1 Project I used to test it, I think there is a way to have it more organized instead of having the files all jumbled up together :o.

By the way I'm trying to make a First Person Shooter in the style of Exhumed, I'm using the "demo - 3D" as a starting point to learn the basics, so far I figured out how to make basic the first person movement, I have it in this attachment if anyone wants to check it out.
« Last Edit: October 14, 2016, 10:37:05 pm by danny_duarte »

mindslight

  • Administrator
  • Jr. Member
  • *****
  • Posts: 81
    • View Profile
    • Jo Engine
Re: Help setting up a project on CodeBlocks
« Reply #4 on: October 15, 2016, 10:45:00 am »
It would be so great to have an FPS game !  ;D

Don't hesitate to ask features  ;)

Exhumed is one of my favorite game (even now).

PS: Don't use SGL function directly because the library will be removed in future version  :)
« Last Edit: October 15, 2016, 10:48:19 am by mindslight »

mindslight

  • Administrator
  • Jr. Member
  • *****
  • Posts: 81
    • View Profile
    • Jo Engine
Re: Help setting up a project on CodeBlocks
« Reply #5 on: October 15, 2016, 12:28:34 pm »
Hi !

I added NetBeans support on Jo Engine :)

You just have to update :)

Danny

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Help setting up a project on CodeBlocks
« Reply #6 on: October 15, 2016, 04:56:15 pm »
Hi friend!
Thank you very much!
I also love Exhumed, its one of my favorite FPS games ever, Lobotomy Software made an excellent job on their Saturn games  ::).

Oh yes, I tested the "slZdspLevel()" SGL function because the polygons close to the camera were being clipped and was not understanding why.
It turns out I need to plan carefully where I draw them and their size/scale, if I draw the polygons too big they get clipped because I'm using to much space on the matrix.
For instance, with the default configurations, my observations led me to conclude that the drawing range is between around 400 to 7500 distance points from the camera.
For example if I draw a floor with square tiles with a width size of 1000 points I can only draw a distance of around 6 visible tiles, the closest tile would get distorted or disappear and the farthest visible one would have to be drawn within the 7500 points or it would also disappear.
The slZdspLevel() allowed me to still see the polygons closest to the camera but I eventually figured out this was not the solution although it might be helpful in some cases.
Also if I draw the polygons too small I would have trouble using the sine and cosine functions to move because there is just not enough detail to calculate the new camera positions correctly. For example I would rotate the matrix 60 degrees but if I wanted to move just 1 or 2 points I wouldn't actually go in that direction :o, I would need to move 20 or 30 points to get enough precision but then it would appear to be moving too fast because everything was "small" in comparison.
I also noticed the jo_3d_get_polygon_count() function is returning more polygons than I'm actually drawing on screen which is weird because you are getting that information from a SGL global variable right? The jo_3d_get_displayed_polygon_count() is also returning a number of polygons in some places even if they are not being displayed on screen, its like there are ghost polygons somewhere?
Maybe I am doing something wrong on my draw functions?

This post is getting really huge  :-\ maybe i should put all this information in another section?

I downloaded the latest update and tried to compile but Netbeans complains its necessary to "Resolve Missing Native Build Tools".
Maybe we need to manually setup these options on our host machines?
« Last Edit: October 15, 2016, 08:36:48 pm by danny_duarte »

mindslight

  • Administrator
  • Jr. Member
  • *****
  • Posts: 81
    • View Profile
    • Jo Engine
Re: Help setting up a project on CodeBlocks
« Reply #7 on: October 16, 2016, 04:27:51 pm »
Thank you very much!

You're welcome :)

I also love Exhumed, its one of my favorite FPS games ever, Lobotomy Software made an excellent job on their Saturn games  ::).

I agree.

Oh yes, I tested the "slZdspLevel()" SGL function because the polygons close to the camera were being clipped and was not understanding why.
It turns out I need to plan carefully where I draw them and their size/scale, if I draw the polygons too big they get clipped because I'm using to much space on the matrix.
For instance, with the default configurations, my observations led me to conclude that the drawing range is between around 400 to 7500 distance points from the camera.
For example if I draw a floor with square tiles with a width size of 1000 points I can only draw a distance of around 6 visible tiles, the closest tile would get distorted or disappear and the farthest visible one would have to be drawn within the 7500 points or it would also disappear.
The slZdspLevel() allowed me to still see the polygons closest to the camera but I eventually figured out this was not the solution although it might be helpful in some cases.
Also if I draw the polygons too small I would have trouble using the sine and cosine functions to move because there is just not enough detail to calculate the new camera positions correctly. For example I would rotate the matrix 60 degrees but if I wanted to move just 1 or 2 points I wouldn't actually go in that direction :o, I would need to move 20 or 30 points to get enough precision but then it would appear to be moving too fast because everything was "small" in comparison.

Do you need an slZdspLevel() wrapper in JoEngine ?

I also noticed the jo_3d_get_polygon_count() function is returning more polygons than I'm actually drawing on screen which is weird because you are getting that information from a SGL global variable right? The jo_3d_get_displayed_polygon_count() is also returning a number of polygons in some places even if they are not being displayed on screen, its like there are ghost polygons somewhere?
Maybe I am doing something wrong on my draw functions?

I don't know.
I will check your code :)

This post is getting really huge  :-\ maybe i should put all this information in another section?

Don't worry  ;)

I downloaded the latest update and tried to compile but Netbeans complains its necessary to "Resolve Missing Native Build Tools".
Maybe we need to manually setup these options on our host machines?

Yes you have to select one build environment but you can select any tools or any program even paint (see attachement).
Indeed, I override every option on the configuration


Danny

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Help setting up a project on CodeBlocks
« Reply #8 on: October 18, 2016, 10:47:13 am »
Hi dear friend,
I think these SGL functions would be helpful:
-slZdispLevel: For changing the Front Boundary Surface (draw distance close to the camera).
-slWindow: Mainly the part that changes de Rear Boundary Surface (draw distance limit).
-slPrespective(): For correcting the perspective distortion on non standard resolutions, compensate for widescreen TVs or for artistic effect.
I know you are working on the high resolution mode, later on, an option to configure the resolution within the application would be nice  :P.

I will try to make a tutorial soon on what I found on making correct use of the space available for drawing the 3d environment, I tried to explain a little in the last post but its hard to explain it correctly without a diagram or visual aid of some sort.
I will also try to make a little video showing the ghost polygon count issue.

I did what you said about project and it worked, thank you once again  :).

Danny

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Help setting up a project on CodeBlocks
« Reply #9 on: October 18, 2016, 11:50:12 am »
I think i found the problem with the display polygon count.
I'm drawing 42 polygons, and it is showing 66.
If i do a conversion from decimal to hexadecimal of 66 the result is 42, which is the number i actually drew.
I think the value was already in decimal and suffered an unnecessary conversion.
« Last Edit: October 18, 2016, 11:52:18 am by Danny »

mindslight

  • Administrator
  • Jr. Member
  • *****
  • Posts: 81
    • View Profile
    • Jo Engine
Re: Help setting up a project on CodeBlocks
« Reply #10 on: October 18, 2016, 09:26:39 pm »
I think i found the problem with the display polygon count.
I'm drawing 42 polygons, and it is showing 66.
If i do a conversion from decimal to hexadecimal of 66 the result is 42, which is the number i actually drew.
I think the value was already in decimal and suffered an unnecessary conversion.

You're right, I found a bug. I will fix it tonight :)

mindslight

  • Administrator
  • Jr. Member
  • *****
  • Posts: 81
    • View Profile
    • Jo Engine
Re: Help setting up a project on CodeBlocks
« Reply #11 on: October 18, 2016, 09:31:47 pm »
Hi dear friend,
I think these SGL functions would be helpful:
-slZdispLevel: For changing the Front Boundary Surface (draw distance close to the camera).
-slWindow: Mainly the part that changes de Rear Boundary Surface (draw distance limit).
-slPrespective(): For correcting the perspective distortion on non standard resolutions, compensate for widescreen TVs or for artistic effect.
I know you are working on the high resolution mode, later on, an option to configure the resolution within the application would be nice  :P.

I will try to make a tutorial soon on what I found on making correct use of the space available for drawing the 3d environment, I tried to explain a little in the last post but its hard to explain it correctly without a diagram or visual aid of some sort.
I will also try to make a little video showing the ghost polygon count issue.

I did what you said about project and it worked, thank you once again  :).

I will add wrappers for these functions asap.

The 3D part of Jo Engine is not as complete as the 2D implementation today, but I think I can improve it with your help :)

mindslight

  • Administrator
  • Jr. Member
  • *****
  • Posts: 81
    • View Profile
    • Jo Engine
Re: Help setting up a project on CodeBlocks
« Reply #12 on: October 18, 2016, 10:00:02 pm »
If you update from the SVN (I will create a release this weekend), you will find 3 new functions:

jo_3d_window()
jo_3d_perspective_angle()
jo_3d_display_level()

And I also fixed jo_3d_get_polygon_count() and similar functions

Danny

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Help setting up a project on CodeBlocks
« Reply #13 on: October 19, 2016, 12:34:27 am »
That will be great  ;D
I will do my best to help in what i can :P

 

Sitemap 1 2 3 4 5 6 7 8 9 
SMF spam blocked by CleanTalk