|
This thread is locked; no one can reply to it. |
1
2
|
[SH15] Elders of Ethos |
Mark Oates
Member #1,146
March 2001
|
Peter Hull said: Aha! I see the definition of arc4random you gave in your spoiler isn't the same as I found in your source zip file caught. -- |
SiegeLord
Member #7,827
October 2006
|
I just did sed -i'' 's/arc4random/rand/g' *.cpp. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Elias
Member #358
May 2000
|
I liked this entry, but it crashed several times (Using Mark's Windows binary). Also sometimes energy got depleted within a turn I think. [edit:] And I didn't seen any particle effects at all... -- |
SiegeLord
Member #7,827
October 2006
|
Yeah, I had a few crashes too. I learned not to press any unnecessary buttons, and it worked ok. It's a bit mysterious how the energy and meditation levels work: running out of energy was how I lost the first time. My winning strategy was to ignore the calls to promote spirits and instead put as many spirits into guidance until I had 70-80'ish spirits, with about 50 in guidance. Then I promoted all the extra ghosts and had plenty of reserves to just dump into energy if it budged from the max. This entry really gave me Master Of Orion vibes, where you had to fiddle with the planet's meters. Even though this is a simple entry, I really liked the atmosphere it gave. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
bamccaig
Member #7,536
July 2006
|
SiegeLord said: I just did sed -i'' 's/arc4random/rand/g' *.cpp. That shouldn't work. The shell should remove the '' following the -i and the s/// would be interpreted as a file name. You probably want -i -e instead. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
SiegeLord
Member #7,827
October 2006
|
Sounds like somebody needs to RTFM more often . "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Mark Oates
Member #1,146
March 2001
|
#bamslam -- |
bamccaig
Member #7,536
July 2006
|
I'll concede that it appears to work, but I can't imagine how... Please enlighten me if you know. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Onewing
Member #6,152
August 2005
|
Thanks, Mark Oates, for getting a build for everybody to play with. I finally created the official binary based off your findings (updated OP with link). I made this compatible with Visual Studio 2012 using some of your findings + a few other things that Studio complained about. I did all my work on a repo that I've opened up: Elders of Ethos Repo I created a tag of the exact code snapshot that I submitted as well as a tag for the official Visual Studio 2012 compliant build. If you review all the commits to the windows_compatibility branch, you can see each step I took to get to that latter tag. Please try out the new binary and let me know if I'm missing any dll's: Elders of Ethos - Version 1.1 === And lastly, some side notes===
------------ |
Bruce Pascoe
Member #15,931
April 2015
|
Re: Backspace: I looked at the code and your check for backspace is weird: You handle KEY_CHAR and test for e.keyboard.unichar == 127. What you should do instead is check if e.keyboard.keycode == ALLEGRO_KEY_BACKSPACE. That's a more reliable check and easier to read as well. Trivia: ASCII 127 is actually the control code for Delete, Backspace is ASCII 8.
|
Onewing
Member #6,152
August 2005
|
Thanks, Bruce. I was just printing out the codes to the console of what I typed and 127 is what came back (for a Mac wireless keyboard for where the backspace is). Had I made it over to Windows in time, it would've been a 5 minute "oh duh" moment. ------------ |
Bruce Perry
Member #270
April 2000
|
Interesting: the game responds to 'Delete' but not 'Backspace'. Allegro portability issue? (Will post more comments later when I've played it more.) -- |
GullRaDriel
Member #3,861
September 2003
|
No, it's because delete and backspace are two different keys you have to deal with when building your keyboard management. "Code is like shit - it only smells if it is not yours" |
Bruce Perry
Member #270
April 2000
|
Very well presented. Good work on that front! I found the gameplay a little unforgiving the first time I played. It seemed as if my attempts to restore energy and whatever else was running out were too little, too late, and I didn't have enough people to recover. I restarted and did better the next time, and then it was a bit too easy. Once I had to do sequences of at least three instructions (at least one free, then promote and purity) over and over, it became a bit tedious. These seem like things that could be fixed if there is more time to spend on gameplay design, and what you've done is pretty good for a SpeedHack GullRaDriel said: No, it's because delete and backspace are two different keys you have to deal with when building your keyboard management. I know that, but are you telling me you expect Onewing to have programmed Delete rather than Backspace and not noticed it was strange? It seems more likely to me that whatever works on the Mac behaves differently on the PC, which in my view is a bug in Allegro whereby the key codes aren't matched up correctly across the two platforms. Or that Mac users honestly expect to be pressing different keys, which seems less likely. -- |
Elias
Member #358
May 2000
|
I agree, backspace should send ASCII 8. This is not technically a bug in Allegro as we make no guarantees about which unicode code any key produces. On a German keyboard ALLEGRO_KEY_Y might produce a "z". ALLEGRO_KEY_CLOSEBRACE simply may not exist at all on some keyboards (that was a problem in Mark's entry). However, I think it would be good to have a small exception there and ensure that on all platforms: - The Return key produces ASCII 13 This will make it easier to at least have working text input across platforms and layouts -- |
Onewing
Member #6,152
August 2005
|
Perhaps this will shed some light. The keyboard does in fact say "delete", so it's not surprising that the key maps to that unicode. However, I don't look at what I'm typing and I just mechanically hit where my fingers are programmed to hit backspace. In the Mac app of the game, this works as intended and I never thought twice about it. {"name":"609572","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/a\/ca925ff7e8750588c6ee7162e2507dab.jpg","w":640,"h":480,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/a\/ca925ff7e8750588c6ee7162e2507dab"} Bruce Perry said: and what you've done is pretty good for a SpeedHack Thanks! First time I've actually finished a Speedhack entry. Pretty proud of what I accomplished in a limited weekend for my first allegro 5 project in a Mac environment. Another interesting sidenote: I never could figure out how to get Ogg files to play, so I tried to find a wav file which are obviously expensive size-wise. I ended up finding a song and used a free tool to compress it down further. The free version of the tool cuts the song in half, but this happens to loop perfectly so it was acceptable. I'll take it. ------------ |
Bruce Perry
Member #270
April 2000
|
Elias, I've always checked for key codes (not chars) when dealing with special keys like Enter and Backspace - might be worth having a similar guarantee for those too? I wonder what the Mac currently does if you check for ALLEGRO_KEY_DELETE. Perhaps it should never generate that code, and if you want anything, you have to check for ALLEGRO_KEY_BACKSPACE? And/or ALLEGRO_KEY_DELETE could be deprecated and replaced with ALLEGRO_KEY_DELETE_PC or ALLEGRO_KEY_DELETE_TO_RIGHT? -- |
|
1
2
|