pouët.net

Go to bottom

Game Source Codes released

category: code [glöplog]
 
Hi,

You can now get the source codes of several of my games (Mega Force, Evolution, Adoktris, Adok's Magic Cube, Adok's Saturn Puzzle) from my GitHub page: https://github.com/adokhugi

Most of the games were made using Visual C++ and OpenGL, only Mega Force was made using Visual C# and MonoGame.

In Adok's Magic Cube, the rotation was especially difficult to implement. I wondered for this reason whether I should really release the code, but in the end I opted for altruism.

Cheers!
added on the 2022-11-18 18:04:47 by Adok Adok
Thank you so much, I've been eagerly awaiting this day! I bet generations of young coders to come will be inspired by the the genius and elegancy of that rotation algorithm.
But behold, what will you do when Zuckerberg or Musk will copy it and use it in their upcoming VR magic cubes? You should add a licence to make sure this act of altruism won't backfire!
added on the 2022-11-18 19:19:30 by v3nom v3nom
Wow, this code really is a feast for the eyes. Always a pleasure to see a "pro software engineer" at work!
added on the 2022-11-18 20:23:27 by arm1n arm1n
Code:tempColor [0] = faces [faces [front].fields [0].borders [1].faceNum].fields [faces [front].fields [0].borders [1].fieldNum].color; tempColor [1] = faces [faces [front].fields [1].borders [0].faceNum].fields [faces [front].fields [1].borders [0].fieldNum].color; tempColor [2] = faces [faces [front].fields [2].borders [0].faceNum].fields [faces [front].fields [2].borders [0].fieldNum].color; faces [faces [front].fields [0].borders [1].faceNum].fields [faces [front].fields [0].borders [1].fieldNum].color = faces [faces [front].fields [2].borders [1].faceNum].fields [faces [front].fields [2].borders [1].fieldNum].color; faces [faces [front].fields [1].borders [0].faceNum].fields [faces [front].fields [1].borders [0].fieldNum].color = faces [faces [front].fields [5].borders [0].faceNum].fields [faces [front].fields [5].borders [0].fieldNum].color; faces [faces [front].fields [2].borders [0].faceNum].fields [faces [front].fields [2].borders [0].fieldNum].color = faces [faces [front].fields [8].borders [0].faceNum].fields [faces [front].fields [8].borders [0].fieldNum].color; faces [faces [front].fields [2].borders [1].faceNum].fields [faces [front].fields [2].borders [1].fieldNum].color = faces [faces [front].fields [8].borders [1].faceNum].fields [faces [front].fields [8].borders [1].fieldNum].color; faces [faces [front].fields [5].borders [0].faceNum].fields [faces [front].fields [5].borders [0].fieldNum].color = faces [faces [front].fields [7].borders [0].faceNum].fields [faces [front].fields [7].borders [0].fieldNum].color; faces [faces [front].fields [8].borders [0].faceNum].fields [faces [front].fields [8].borders [0].fieldNum].color = faces [faces [front].fields [6].borders [0].faceNum].fields [faces [front].fields [6].borders [0].fieldNum].color; faces [faces [front].fields [8].borders [1].faceNum].fields [faces [front].fields [8].borders [1].fieldNum].color = faces [faces [front].fields [6].borders [1].faceNum].fields [faces [front].fields [6].borders [1].fieldNum].color; faces [faces [front].fields [7].borders [0].faceNum].fields [faces [front].fields [7].borders [0].fieldNum].color = faces [faces [front].fields [3].borders [0].faceNum].fields [faces [front].fields [3].borders [0].fieldNum].color; faces [faces [front].fields [6].borders [0].faceNum].fields [faces [front].fields [6].borders [0].fieldNum].color = faces [faces [front].fields [0].borders [0].faceNum].fields [faces [front].fields [0].borders [0].fieldNum].color; faces [faces [front].fields [6].borders [1].faceNum].fields [faces [front].fields [6].borders [1].fieldNum].color = tempColor [0]; faces [faces [front].fields [3].borders [0].faceNum].fields [faces [front].fields [3].borders [0].fieldNum].color = tempColor [1]; faces [faces [front].fields [0].borders [0].faceNum].fields [faces [front].fields [0].borders [0].fieldNum].color = tempColor [2];


BB Image
added on the 2022-11-18 20:29:30 by Rob Rob
isn't rotation, like, simple matrix algebra tho? ;-)
sophisticated optimizations making it hard then?
@rob: Jesus holy Christ
added on the 2022-11-18 22:01:29 by NR4 NR4
Massive Adok TECH attack.
added on the 2022-11-18 22:29:32 by phoenix phoenix
You're brilliant! What a novel design. Come to Baltimore at once.
added on the 2022-11-19 09:29:41 by Emod Emod
Quote:
[…] in the end I opted for altruism.

That is so not how altruism works.
added on the 2022-11-19 09:48:41 by Bombe Bombe
I noticed a memory leak here. Those temporary char arrays are heap-allocated on every call of CalculateTimeDisplay (every frame?) but never free'd.
added on the 2022-11-19 16:39:46 by fizzer fizzer
Quote:
I noticed a memory leak here. Those temporary char arrays are heap-allocated on every call of CalculateTimeDisplay (every frame?) but never free'd.

There are 24 new-s in the file and 0 delete-s.
added on the 2022-11-19 16:42:47 by Gargaj Gargaj
It looks like generally in this old code you are never using operator delete to free up memory allocated with operator new actually...
added on the 2022-11-19 16:43:40 by fizzer fizzer
Yeah, what Gargaj said.
added on the 2022-11-19 16:44:48 by fizzer fizzer
That whole function should just be an sprintf anyway.
added on the 2022-11-19 16:53:45 by Gargaj Gargaj
A man releases his code, and the others (at least some) are just... Well, just hate...
If you do not like it (or the dude), do NOT look at it. Do not "waste" your time (if it is lame, or not Farbrausch-like or from your hero).

Be well...
added on the 2022-11-19 17:38:14 by sim sim
or maybe we're just altruistically doing a code review to help Adok improve his rotations!
People would be surprised to see how unprofessional sometimes the code is from certain very professional and popular projects! :D
added on the 2022-11-19 17:55:53 by Defiance Defiance
A beginner writes terrible code. The hobbyist slightly better. An junior professional writes complicated but mostly solid stuff. Mid-range professional writes solid to excellent code that does its job without any nonsense. A senior, experienced professional writes consistently excellent code with absoloutely terrible bits in it, because they know when it matters and when it doesn't.

This stuff I would not send along my application for a job.
added on the 2022-11-19 18:03:14 by Preacher Preacher
Quote:
or maybe we're just altruistically doing a code review to help Adok improve his rotations!

(^_^)=d[¨]
added on the 2022-11-19 18:09:51 by sim sim
Just found this gem in my old Atsou demo source (first C code I ever wrote)
https://i.redd.it/94a8xxdukhz91.png
added on the 2022-11-19 18:22:40 by Optimus Optimus
A man altruistically releases his code. It’s terrible and we all laugh. What a fun weekend, maybe the real code is the friends we made along the way.
added on the 2022-11-19 18:42:11 by okkie okkie
Quote:
A man releases his code, and the others (at least some) are just... Well, just hate...

As already said on the oneliner, sharing code is always a cool move - just don't pat yourself on the back for it overly and drivel about altruism
added on the 2022-11-19 19:27:31 by v3nom v3nom
@okkie: maybe the real scene is the scene we made along the way… 
It sure looks nicer than all the code for the games I've thought about but never made.
added on the 2022-11-26 06:45:49 by bloodnok bloodnok
I've now also added the code of my demo "Ruky hore" and my 256b intro series "Indian" to my GitHub account.
added on the 2022-12-27 12:06:40 by Adok Adok
Awesome code, thanks.
added on the 2022-12-27 13:28:30 by thec thec

login

Go to top