14. Ocai by CForr

User avatar
Rudy
Caiman Moderator
Posts: 2704
Joined: Sat May 31, 2008 7:42 pm
Location: Belgium
Contact:

14. Ocai by CForr

Postby Rudy » Mon Jun 23, 2008 1:53 pm

14. Ocai
by CForr

Welcome at the contest, buddy!! :pals: :ooh: :ooh: :ooh:

Good luck!!! :clap: :ooh: :ooh:

CForr
Posts: 34
Joined: Mon Jun 09, 2008 9:26 am
Contact:

Re: 14. Ocai by CForr

Postby CForr » Mon Jun 23, 2008 1:58 pm

Thanks Rudy!

And for those of you beavering away at your own entry, a cautionary tale...

So there I am, coding some movement vectors in OpenGL, and the caiman in my game still isn't moving correctly. This is despite me having tried all kinds of optimisations for the vector mathematics, then stripping away all those optimisations in order to get a clearer idea of what is going wrong.

Still, the movement of the graphic is not corresponding to what the mathematics dictate should happen, so I reread a primer on vector mathematics only to be told what I already know. I decide to swallow my pride and convert everything to nice and easy trigonometry - far more intuitive for a human mind to keep track of what is happening this way.

That done, I dump all the relevant angles to the screen so I can monitor the key variables as they are changing... and there it is! The position displayed for the caiman's location is clearly not corresponding to where it is on the screen: it's almost as if it has its own frame of reference...

... and sure enough, I scroll down to the rendering code and spot an old glTranslate() function left over from a primordial version of the code when I was trying out something else. That one line, a splinter of something that was abandoned long ago, had upset all the code I had written over the course of 2.5 days (of spare-time programming) by setting the player's coordinates in a completely different frame of reference from everything else in the game.

The trigonometry was fine all along, and never needed to be implemented. My understanding of mathematics and vectors had been fine all along, and never needed to be reread on. The optimisations I had made to the vector handling routines were perfectly good, and never needed to be undone.

The moral of the tale? If you are going to bugfix your program, ignore that little voice in your head that tells you to only look at the part of the program which seems relevant to what you are doing (in my case, movement). Check everything: following the code logically through a part of the program traps you within the conceit that the problem must be there.

All that time wasted over a simple mistake that my selective attention kept there throughout my mathematical fulminations. :tongue:
Last edited by CForr on Wed Jun 25, 2008 3:13 pm, edited 1 time in total.
Play Ocai at

User avatar
Rudy
Caiman Moderator
Posts: 2704
Joined: Sat May 31, 2008 7:42 pm
Location: Belgium
Contact:

Re: 14. Ocai by CForr

Postby Rudy » Mon Jun 23, 2008 4:37 pm

Awwww :there: ;)

I already knew you are very good in vector math ;) :pals:

CForr
Posts: 34
Joined: Mon Jun 09, 2008 9:26 am
Contact:

Re: 14. Ocai by CForr

Postby CForr » Wed Jun 25, 2008 3:07 pm

Unfortunately, my common sense didn't.
Play Ocai at

CForr
Posts: 34
Joined: Mon Jun 09, 2008 9:26 am
Contact:

Re: 14. Ocai by CForr

Postby CForr » Thu Jul 31, 2008 8:41 pm

Alpha release is available at .

Hope I've posted it in time!
Play Ocai at

CForr
Posts: 34
Joined: Mon Jun 09, 2008 9:26 am
Contact:

Re: 14. Ocai by CForr

Postby CForr » Sun Aug 31, 2008 9:35 pm

My entry is now available for download at . I hope people enjoy it!
(Do please read the "Instructions.txt" file. The mouse-only control system is explained, which will make menu navigation more intuitive without a cursor.)

A few notes on the final submission for those interested (not required reading):

Constraints on my spare time, since releasing the alpha, meant that I couldn't make the game I had in mind. Instead, I decided to scrap the original notion of AI enemies pursuing the player across the screen (the AI was a bit ropey, and needed extra work that would have taken me past the deadline), and focus more on the sinuous ease with which Ocai glides across the various areas. Collecting and dodging therefore became the main theme for gameplay.

Also, I was bitterly disappointed not to have enough time to implement realistic water ripples. I already know the algorithm, and it was literally the next thing I would have coded had the deadline been one more day along. Anyone who has played Seiklus will appreciate how good it looks when abstract graphics have realistic algorithms driving the particle effects.

Anyhoo, I hope people enjoy the game as it is, in its final form.
Play Ocai at

User avatar
Rudy
Caiman Moderator
Posts: 2704
Joined: Sat May 31, 2008 7:42 pm
Location: Belgium
Contact:

Re: 14. Ocai by CForr

Postby Rudy » Sun Aug 31, 2008 10:12 pm

Downloaded ;) :ooh: :ooh:

CForr
Posts: 34
Joined: Mon Jun 09, 2008 9:26 am
Contact:

Re: 14. Ocai by CForr

Postby CForr » Mon Sep 08, 2008 11:44 am

Version 1.1 is now available at , or available as a direct download

Thanks to those who waited half a day for this version :4u:

Hope Rudy updates the links at the start of the Final Versions thread :tongue:

See the post within that thread for details of the changes, or go to the site and read the "About" section.

Thanks all.
Play Ocai at

User avatar
Rudy
Caiman Moderator
Posts: 2704
Joined: Sat May 31, 2008 7:42 pm
Location: Belgium
Contact:

Re: 14. Ocai by CForr

Postby Rudy » Mon Sep 08, 2008 11:55 am

updated ;) :pals: :D

User avatar
Rudy
Caiman Moderator
Posts: 2704
Joined: Sat May 31, 2008 7:42 pm
Location: Belgium
Contact:

Re: 14. Ocai by CForr

Postby Rudy » Mon Sep 08, 2008 9:22 pm

Strange.. In the previous version I could play 10 levels. In this one I cannot pass the third level. What did I wrong? I ate all mana eggs, it says "Mana Eggs:11" and that's all. No new mana eggs (as in levels 1 & 2), nothing.. I clicked with the left mouse button, but no joy. It stays in level 3 forever (see screenie) :shock:

Image


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Return to “Caiman Crocodile Contest”

Who is online

Users browsing this forum: No registered users and 4 guests