Author Topic: Sonic Z-Treme  (Read 4404 times)

Danny

  • Newbie
  • *
  • Posts: 32
  • Karma: +2/-0
    • View Profile
Re: 3D Sonic demo
« Reply #15 on: April 25, 2017, 10:28:18 am »
It seems to me the problem is the polygon clipping when you get close because when you are far away everything seems to be shown fine  ???
You could try to use jo_3d_display_level() to adjust the near clipping but I'm not entirely sure if that will fix it, it might also be a problem somewhere else.
The jo_3d_display_level()  is an abstraction of the slZdspLevel, the parameters work like this:

jo_3d_display_level(level)

example values for level:
1: Display from 1/2
2: Display from 1/4
3: Display from 1/8
I have an image file as attachment that helps explain this.

Edit:
I did some tests with this and although this function is helpful the problem might not be related, because on your video some things that are close do not disappear while others do.
« Last Edit: April 25, 2017, 10:52:39 am by Danny »

XL2

  • Jr. Member
  • **
  • Posts: 99
  • Karma: +5/-0
    • View Profile
Re: 3D Sonic demo
« Reply #16 on: April 26, 2017, 02:57:22 am »
Yes, I have also read that part. The SGL manual is pretty useful. In fact I shrank my Sonic model to the minimum to also allow a good view while also preventing clipping. The Saturn is struggling really badly with huge polygons. It forces me to subdivise the whole map in several small polygons just to prevent the framerate from dropping. I have also added a projection window for far object clipping, which should help. I'll add several debug options for next time I burn a disk and try it on actual hardware. Do you know about a Jo Engine function to get the actual displayed framerate? Or should I just create one?

XL2

  • Jr. Member
  • **
  • Posts: 99
  • Karma: +5/-0
    • View Profile
Re: 3D Sonic demo
« Reply #17 on: April 26, 2017, 06:51:08 pm »
Ok, so I have a very good news, one not so good.

I tried the game again on actual hardware with extra debugging settings. It's still clipping heavily, but maybe I would just need to increase the size of eveything, but I'm not 100% sure. I put the slZdsplevel/JO_3d_display_level to 3 and by pressing L+R + Start I made it so it switches between the 3 modes. When 2 polygons overlap, it seems like it almost always erase the one in the foreground. For this attempt I put everything in single_plane mode unlike last time, and it seems better now. It seems like it could be an issue with the Z-Sort. Do you guys think it could be related to the SORT_MIN/CEN/MAX polygonal attributes? Or maybe I should just invert all the normals on my models and put it in single plane mode? Could it be both? Or maybe just pushing back the actual camera would help? I don't see other reasons to explain why it's like that, but trying those different solutions would require more time than I currently have. I also tried increasing the view distance, but it didn't change anything.

For the good news : it runs at 60 FPS! I never expected it to run over 40 FPS, but I still left the framerate unlocked just to test.

Video here : https://youtu.be/s7mSQ_l8tM4

ISO attached bellow.
« Last Edit: April 26, 2017, 06:55:19 pm by XL2 »

mindslight

  • Administrator
  • Full Member
  • *****
  • Posts: 134
  • Karma: +2/-0
    • View Profile
    • Jo Engine
Re: 3D Sonic demo
« Reply #18 on: April 26, 2017, 10:26:35 pm »
My 3D implementation will be different from the SGL. Maybe the results will be better. I will release a beta in 2 weeks  :)

XL2

  • Jr. Member
  • **
  • Posts: 99
  • Karma: +5/-0
    • View Profile
Re: 3D Sonic demo
« Reply #19 on: April 26, 2017, 11:00:58 pm »
Great, I can't wait! I've said it often, but you are doing a really good job, thanks again!

Danny

  • Newbie
  • *
  • Posts: 32
  • Karma: +2/-0
    • View Profile
Re: 3D Sonic demo
« Reply #20 on: April 29, 2017, 01:14:35 am »
Yes, I have also read that part. The SGL manual is pretty useful. In fact I shrank my Sonic model to the minimum to also allow a good view while also preventing clipping. The Saturn is struggling really badly with huge polygons. It forces me to subdivise the whole map in several small polygons just to prevent the framerate from dropping. I have also added a projection window for far object clipping, which should help. I'll add several debug options for next time I burn a disk and try it on actual hardware. Do you know about a Jo Engine function to get the actual displayed framerate? Or should I just create one?
Sorry friend, I have been busy at work and havent had much time to check up the forum, I'm not sure but I don't think there is a function for that, however you can set up the processing time of each frame on conf.h by changing JO_FRAMERATE to a slower framerate, this way the vdp1 has more time to draw stuff(I think). I know this does not help you much but I remembered it might be helpful although the conf.h file says "DONT TOUCH THIS FILE" xD.
As for measuring the cpu time you could use the clock tiks like i did in the dual cpu usage example  ???.
« Last Edit: April 29, 2017, 02:26:29 am by Danny »

Danny

  • Newbie
  • *
  • Posts: 32
  • Karma: +2/-0
    • View Profile
Re: 3D Sonic demo
« Reply #21 on: April 29, 2017, 01:22:39 am »
My 3D implementation will be different from the SGL. Maybe the results will be better. I will release a beta in 2 weeks  :)
That is really good news, thank you very much Johannes!
I have been trying to implement a 3d space partitioning based on portals and maybe octrees (i'm still learning) and I'm using the PDATA and XPDATA SGL native structures for the polygons, will you still use them or make some new structures for this?

XL2

  • Jr. Member
  • **
  • Posts: 99
  • Karma: +5/-0
    • View Profile
Re: 3D Sonic demo
« Reply #22 on: April 29, 2017, 05:24:53 am »
Yes, I've also set it to 30 FPS already (value = 2), but it doesn't change anything on emulators, so I just unlocked it back to 60.. which, surprisingly, ran around that on the Saturn. I did a quick update again this week, with fisheye view, new camera and controls, improved model and some REALLY basic (and to be honest, terrible) vertical detection. I might just erase it all next week and try something else as it's really bad, I just did it after finishing work today and I'm surprised it even works. If I can't improve it, I'll just move back to 2.5D gameplay.

Here is the lasted video : https://youtu.be/z5agzrz6G5w

XL2

  • Jr. Member
  • **
  • Posts: 99
  • Karma: +5/-0
    • View Profile
Re: 3D Sonic demo
« Reply #23 on: May 06, 2017, 09:58:45 pm »
Another small update : Jade Gully from Sonic X-Treme in Jo Engine!

There are still many bugs, but I'm getting somewhere slowly but surely.

I managed to do something with my terrible collision detection function, but having more than a few levels will be hard.

Anyway, enjoy : https://youtu.be/mfv6X1YFbYQ

mindslight

  • Administrator
  • Full Member
  • *****
  • Posts: 134
  • Karma: +2/-0
    • View Profile
    • Jo Engine
Re: 3D Sonic demo
« Reply #24 on: May 07, 2017, 09:30:40 am »
Amazing  :D

In my side, the SGL replacement goes well. Maybe I will release a new version next week  :)

XL2

  • Jr. Member
  • **
  • Posts: 99
  • Karma: +5/-0
    • View Profile
Sonic Z-Treme
« Reply #25 on: May 27, 2017, 12:25:16 am »
New version, running on stock Saturn!
I still have some rendering bugs and some slowdowns, but it's quite playable now and running really smoothly most of the time!


https://youtu.be/e4SUshGYl_I

mindslight

  • Administrator
  • Full Member
  • *****
  • Posts: 134
  • Karma: +2/-0
    • View Profile
    • Jo Engine
Re: 3D Sonic demo
« Reply #26 on: May 27, 2017, 10:20:06 am »
Wow  :D

I hope to finish the new 3D implementation next month. My job took me a lot of time and also my daughter  ;D

XL2

  • Jr. Member
  • **
  • Posts: 99
  • Karma: +5/-0
    • View Profile
Sonic Z-Treme
« Reply #27 on: June 24, 2017, 03:31:19 am »
New update, running 60 FPS on real hardware without clipping glitches!
https://youtu.be/8kfkc7Xa8lk

I'm using SGL directly on this version (I know, I know!) for the VDP2 RBG0 3d plane (the ocean). I have a nice fading effect which worked on SSF, but not on real hardware sadly! (The effect is the same as the fighting SGL demo)

I'm also animating the level (running water) by swapping textures on polygons.

My physics are still bad, but you can see some basic slopes physics.
Overall, I will have to improve the physics, sounds and collision detection engine, but I'm satisfied with the graphical part so far.

One question : Will the next version of Jo Engine support .bin files for the 3d meshes, including loading/clearing?
At the moment, it's holding me back since I can't produce new maps because I can't load them from the disk (unless there is a way that I don't know about).
Thanks!






mindslight

  • Administrator
  • Full Member
  • *****
  • Posts: 134
  • Karma: +2/-0
    • View Profile
    • Jo Engine
Re: Sonic Z-Treme
« Reply #28 on: June 29, 2017, 08:08:24 pm »
Mesh loading is on the todolist.

It's hard to find enough time to work on Jo Engine, but the holiday is coming :D

XL2

  • Jr. Member
  • **
  • Posts: 99
  • Karma: +5/-0
    • View Profile
Re: Sonic Z-Treme
« Reply #29 on: June 30, 2017, 12:47:16 am »
I know that you are working on a new implementation for 3D, but will the new version be compatible with the current 3d implementation? Like, attributes and all?

 

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