Jump to content

Photo

Games in Mad Pascal


29 replies to this topic

#26 bocianu OFFLINE  

bocianu

    Combat Commando

  • 6 posts
  • Location:Silesia, Poland

Posted Tue Aug 15, 2017 1:05 PM

 

The ghost may have a little more AI

 

They have, but on higher levels of game ;)

 

You can check their behaviour in LevelEditor - here

 

There is a field : ghost AI - check different values.

On AI=9 ghosts are deadly ninjas.


Edited by bocianu, Tue Aug 15, 2017 1:07 PM.


#27 gorgh OFFLINE  

gorgh

    Star Raider

  • 99 posts
  • Location:warsaw,poland

Posted Tue Aug 22, 2017 8:21 AM

kawał dobrej roboty ten edytor, i kompiluje do .xex, brawo!
Good work with the editor,amazing!



#28 tebe OFFLINE  

tebe

    Dragonstomper

  • 652 posts
  • Location:Poznań - Poland

Posted Sat Sep 9, 2017 6:05 AM

Graviten in MadPascal
 
900 REM GRAVITEN by jeff.piepmeier@gmail.com
901 REM Written March 22 2016
902 REM for the 2016 NOMAM 10-line
903 REM programming contest
904 REM Program notes at
905 REM jeffpiepmeier.blogspot.com

Attached Files


Edited by tebe, Sat Sep 9, 2017 6:06 AM.


#29 Gury OFFLINE  

Gury

    Stargunner

  • Topic Starter
  • 1,217 posts

Posted Sat Sep 16, 2017 12:55 PM

Hmm, I looked at the code of Graviten and there seems to be VERY compact and optimized way of moving object around. No additional if branches, just pure logic in one line using bitwise arithmetics. And using similar thing for rotating an object using offsets to an array of data.

 

Great work!


Edited by Gury, Sat Sep 16, 2017 1:10 PM.


#30 VladR OFFLINE  

VladR

    Dragonstomper

  • 898 posts
  • Location:Montana

Posted Sat Sep 16, 2017 8:14 PM

Hmm, I looked at the code of Graviten and there seems to be VERY compact and optimized way of moving object around. No additional if branches, just pure logic in one line using bitwise arithmetics. And using similar thing for rotating an object using offsets to an array of data.

 

Great work!

Be very careful of one-liners in higher-level languages. Some translate to pages of ASM code...

 

The best way to produce fast code in higher-level language (say, C or Pascal), is to let the compiler produce also assembly file in parallel, and that way you can quickly compare your subroutine with the generated ASM code.

 

This will provide you with an insight that goes waaay beyond any benchmarks that you execute, since after a week or two of watching the generated ASM code, you'll be able to understand what works best (though the original code will never look like a human wrote it, but hey - it's fast so who cares :) ).

 

It will also be a source of major entertainment, as certain WTFs are truly mind blowing (talking about 68000 C compiler on jaguar here) :)






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users