[WIP] microHexagon, a Super Hexagon clone

Advice on general approaches or feasibility and discussions about game design

Re: [WIP] microHexagon, a Super Hexagon clone

Postby Sorunome » Mon Jul 27, 2015 8:20 pm

I just tried it and it is super awesome! :D
User avatar
Sorunome
 
Posts: 629
Joined: Sun Mar 01, 2015 1:58 pm

Re: [WIP] microHexagon, a Super Hexagon clone

Postby jonnection » Mon Jul 27, 2015 9:43 pm

Valden wrote:NOTE : I would be very happy if someone could help me finding a faster way to render the "blocks". At the moment, the worst case scenario put the CPU at 110 % which I don't really like (even if it's barely noticeable). For the rendering, I use 2 "fillTiangles" per blocks. For comparison, a wire-frame rendering only use 35 % of the CPU, but the game is less readable.


Hi Valden. Very nice game. I took a look at your 'drawWalls' code and the fillTriangle code in Gamebuino lib. The fillTriangle routine is very unoptimized (two divisions in inner loop). Division on atmega328 is a performance killer. You will not get decent speed unless you write a proper polyfill routine with scan conversion or someone optimizes fillTriangle. Furthermore fillTriangle actually uses fastHline routine which is also unoptimized as it draws the line pixel by pixel. Proper polyfill on this hardware means a) scan converting lines b) filling in with fast vertical lines using bitshifted bytes instead of pixel by pixel drawing. Literature and examples of how fast polyfill is done can be found aplenty on internet. Offhand I believe your drawwalls is about 10% of the speed of what it could be. Floating point numbers is another killer on atmega, as it has no floating point hardware.
Last edited by jonnection on Mon Jul 27, 2015 9:55 pm, edited 1 time in total.
User avatar
jonnection
 
Posts: 317
Joined: Sun May 04, 2014 8:21 pm

Re: [WIP] microHexagon, a Super Hexagon clone

Postby Valden » Mon Jul 27, 2015 9:51 pm

jonnection wrote:
Valden wrote:NOTE : I would be very happy if someone could help me finding a faster way to render the "blocks". At the moment, the worst case scenario put the CPU at 110 % which I don't really like (even if it's barely noticeable). For the rendering, I use 2 "fillTiangles" per blocks. For comparison, a wire-frame rendering only use 35 % of the CPU, but the game is less readable.


Hi Valden. Very nice game. I took a look at your 'drawWalls' code and the fillTriangle code in Gamebuino lib. The fillTriangle routine is very unoptimized (two divisions in inner loop). Division on atmega328 is a performance killer. You will not get decent speed unless you write a proper polyfill routine with scan conversion or someone optimizes fillTriangle. Furthermore fillTriangle actually uses fastHline routine which is also unoptimized as it draws the line pixel by pixel. Proper polyfill on this hardware means a) scan converting lines b) filling in with fast vertical lines using bitshifted bytes instead of pixel by pixel drawing. Literature and examples of how fast polyfill is done can be found aplenty in the internet. Offhand I believe your code is about 10% of what it could be. Floating point numbers is another killer on atmega, as it has no floating point hardware.


Thanks for your tips. I found that the float wasn't a huge problem as if I don't do any drawing the CUP is used at around 15%. If I have the time, I'll definitely check your methods for optimizing the drawings ;) , but for now the game run fine (I can't add more feature though like grayscale because of the fact I already use 100 % of the cpu).

An important note though : Disabling the sound offers a significant boost in performance for my game, so if you happens to try compiling the game by yourself, try put the NUM_CHANNELS in the settings.c at 0. I notice lags when 1 channel is used, but none if there is no channel.
User avatar
Valden
 
Posts: 31
Joined: Mon Jun 08, 2015 5:33 pm

Re: [WIP] microHexagon, a Super Hexagon clone

Postby jonnection » Mon Jul 27, 2015 10:09 pm

(I can't add more feature though like grayscale because of the fact I already use 100 % of the cpu).

An important note though : Disabling the sound offers a significant boost in performance for my game


Sound takes up ALOT of the cpu. In my trials my Operation fox game ran at 200 fps without music and 50 fps with music. So if youre already at 100% ...
User avatar
jonnection
 
Posts: 317
Joined: Sun May 04, 2014 8:21 pm

Re: [WIP] microHexagon, a Super Hexagon clone

Postby Skyrunner65 » Sat Aug 08, 2015 4:11 pm

Thanks for the recommend, Jerom.
Now I have better footage for my game, Smash and Crash!

Oh, sorry Valden, forgot to mention that your game looks great, and WAY too hard for me.
User avatar
Skyrunner65
 
Posts: 371
Joined: Thu Mar 20, 2014 5:37 pm
Location: NC,USA

Re: [WIP] microHexagon, a Super Hexagon clone

Postby superfreaky » Thu Nov 19, 2015 11:49 pm

This is hands down the most played game on the gb for me! My record is 1 minute and approximately 5 seconds. By that time, everything is going so fast it's almost impossible to see what's going on. I guess that's just the screen's fault. I wonder why r0d0t didn't get a more modern screen, like, say, the oled that Arduboy uses? How pricey would it be to make a fakebuino using that screen instead?
Or would it be possible to incorporate such a screen into the Gamebuino itself...
superfreaky
 
Posts: 183
Joined: Wed Oct 28, 2015 1:46 am

Re: [WIP] microHexagon, a Super Hexagon clone

Postby superfreaky » Mon Nov 23, 2015 2:43 am

I just thought of a way you could include a song. After you die, you could do an instant replay. Play as much of the song as you lasted for. That would also add some additional motivation for getting good at the game.
superfreaky
 
Posts: 183
Joined: Wed Oct 28, 2015 1:46 am

Previous

Return to Project Guidance & Game development

Who is online

Users browsing this forum: Google [Bot] and 35 guests

cron