Open Surge Forum

A fun 2D retro platformer inspired by Sonic games and a game creation system

You are not logged in.

Announcement

Our community has moved to Discord! https://discord.gg/w8JqM7m

#1 2009-08-10 19:09:06

zl0i
Member
Registered: 2009-08-10
Posts: 10

Suggestion: Table of sinus

The OpenSonic runs great, but I think you can optimize it by using table of sinus (The table of sinus was used in first quake) instead of calculating it by sin function. The sin function has many iterations and so it is not very fast. In sinus table you just return sin value for angle without many calculations. I did n`t have practice in using it, it`s just my opinion.

Offline

#2 2009-08-11 06:31:26

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,304
Website

Re: Suggestion: Table of sinus

Welcome, zl0i! smile

It's true that sin() and cos() take a number of iterations, but I don't see any performance issues there. I tested Open Sonic in my old computer (year 2000), a Pentium III 650MHz and it runs absolutely fine in 320x240. Furthermore, storing a few values in a table could result in approximation errors. It's a lot of work to do, it may introduce some errors and there's almost no benefit. Open Sonic is optimized for old/slow hardware, but I suppose nobody is using a 486 DX2 PC with DOS nowadays. sad

Performance issues are mostly related to the graphics.

Offline

#3 2009-08-11 19:22:12

CharmyBee
Member
Registered: 2009-04-22
Posts: 31

Re: Suggestion: Table of sinus

Pentium III is a very fast CPU. Why not take some 5th or 6th generation processor (Pentium, Pentium II) and test for that? You're already using Allegro, you can still aim for that limited setup.

Last edited by CharmyBee (2009-08-11 19:23:22)


abee.png

Offline

#4 2009-11-18 00:57:45

jasonspiro
Member
From: Toronto, ON, Canada
Registered: 2009-05-15
Posts: 53
Website

Re: Suggestion: Table of sinus

But does anyone actually *want* to use Open Sonic on any PC, game system, or cellphone which is less powerful than a Pentium 3?  :)

Last edited by jasonspiro (2009-11-18 00:58:12)

Offline

#5 2009-11-20 16:57:02

darkcity
Member
Registered: 2009-10-31
Posts: 113

Re: Suggestion: Table of sinus

how does dreamcast compare to pentium 3?:)


done

Offline

#6 2009-11-21 02:53:57

CharmyBee
Member
Registered: 2009-04-22
Posts: 31

Re: Suggestion: Table of sinus

darkcity wrote:

how does dreamcast compare to pentium 3?:)

I'd say the Dreamcast is on-par with a PII 450 with a TNT2 when it comes to performance and features. Delusioned DC fans strongly believe otherwise though (especially in the homebrew scene)

Last edited by CharmyBee (2009-11-21 02:54:34)


abee.png

Offline

#7 2009-11-23 14:05:20

darkcity
Member
Registered: 2009-10-31
Posts: 113

Re: Suggestion: Table of sinus

I guess the Dreamcast has certain strengths smile


done

Offline

Board footer

Powered by FluxBB  hosted by tuxfamily.org