![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
[SH15] Elders of Ethos |
Onewing
Member #6,152
August 2005
![]() |
{"name":"609511","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/0\/80e245fe9794e4f0fc7edda64c2084c3.png","w":799,"h":623,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/0\/80e245fe9794e4f0fc7edda64c2084c3"} Windows Binary I'll try to put the binary (Mac app) up later. For now, time to put up the white flag and get a nap in before work. EDIT:
------------ |
GullRaDriel
Member #3,861
September 2003
![]() |
Well done Onewing ! Edit: "Code is like shit - it only smells if it is not yours" |
Onewing
Member #6,152
August 2005
![]() |
GullRaDriel said: Mac only For now...yes. I have a PC at home too that I'll try to get a functioning windows build, but gonna have to spend family time tonight and got a big site launch tomorrow evening, so that will have to wait a bit. ------------ |
GullRaDriel
Member #3,861
September 2003
![]() |
I'll wait for your build then ^^ "Code is like shit - it only smells if it is not yours" |
devo_au
Member #15,282
August 2013
|
From the screenshot, looks like you put a lot of effort into the dialog.. Look forward to a windows version when you get around to it.. it wasn't me, it was other kids |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
I too am waiting for a windows binary. I tried building it with CB and MinGW but it fails to compile with several warnings and an error about not being able to find the arc4random function. Also, how do you compile .m files? Are those Obj-C? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Bruce Pascoe
Member #15,931
April 2015
![]() |
Yes, it's completely nonsensical but .m is an Objective-C file. No idea how that will ever be able to be ported, I thought Obj-C was an Apple-only thing.
|
Onewing
Member #6,152
August 2005
![]() |
Yeah, I haven't been coding very much past few years and when I do, I'm coding Objective-C for non-allegro projects in xcode. I've completely forgotten the make processes and how to do so. Our site just launched, so I'm going to eat some dinner and play around with getting a windows build for you guys. Apologies for the delays! ------------ |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Here's the full compile log for the *.cpp files at least : 1
2c:\ctwoplus\progcode\allegro5\SpeedHack2015entries\Elders_of_Ethos>srclist.bat
3
4c:\ctwoplus\progcode\allegro5\SpeedHack2015entries\Elders_of_Ethos>mingw32-g++ -Wall -g -Ic:\mingw\LIBS\A5111distro\include -o EldersOfEthos.exe -Lc:\mingw\LIBS\A5111distro\lib *.cpp -lallegro_monolith-debug.dll
5game.cpp:426:2: warning: #warning "Currently skipping AI turns" [-Wcpp]
6 #warning "Currently skipping AI turns"
7 ^
8In file included from game.cpp:14:0:
9game.h:77:23: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default]
10 Game(Game const&)=delete;
11 ^
12game.h:78:33: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default]
13 void operator=(Game const&)=delete;
14 ^
15game.cpp: In member function 'void Game::ProcessCommand()':
16game.cpp:226:24: warning: unused variable 'from' [-Wunused-variable]
17 TRIBEPARAMETER from = this->currentTribe->FindParameterInUstrInRange(this->input, 0, (int)al_ustr_length(this->input));
18 ^
19In file included from main.cpp:15:0:
20game.h:77:23: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default]
21 Game(Game const&)=delete;
22 ^
23game.h:78:33: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default]
24 void operator=(Game const&)=delete;
25 ^
26main.cpp: In function 'int main(int, char**)':
27main.cpp:25:11: warning: unused variable 'bouncer_x' [-Wunused-variable]
28 float bouncer_x = SCREEN_W / 2.0 - BOUNCER_SIZE / 2.0;
29 ^
30main.cpp:26:11: warning: unused variable 'bouncer_y' [-Wunused-variable]
31 float bouncer_y = SCREEN_H / 2.0 - BOUNCER_SIZE / 2.0;
32 ^
33main.cpp:27:11: warning: unused variable 'bouncer_dx' [-Wunused-variable]
34 float bouncer_dx = -4.0, bouncer_dy = 4.0;
35 ^
36main.cpp:27:30: warning: unused variable 'bouncer_dy' [-Wunused-variable]
37 float bouncer_dx = -4.0, bouncer_dy = 4.0;
38 ^
39In file included from message.cpp:10:0:
40game.h:77:23: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default]
41 Game(Game const&)=delete;
42 ^
43game.h:78:33: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default]
44 void operator=(Game const&)=delete;
45 ^
46In file included from parameter.cpp:11:0:
47game.h:77:23: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default]
48 Game(Game const&)=delete;
49 ^
50game.h:78:33: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default]
51 void operator=(Game const&)=delete;
52 ^
53In file included from particle.cpp:13:0:
54game.h:77:23: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default]
55 Game(Game const&)=delete;
56 ^
57game.h:78:33: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default]
58 void operator=(Game const&)=delete;
59 ^
60particle.cpp: In constructor 'Particle::Particle(PARTICLESPIRIT)':
61particle.cpp:16:26: error: 'arc4random' was not declared in this scope
62 this->x = arc4random() % SCREEN_W;
63 ^
64particle.cpp: In member function 'void Particle::Draw()':
65particle.cpp:68:105: error: 'arc4random' was not declared in this scope
66 al_draw_filled_circle(this->x-this->dx*4, this->y-this->dy*4, this->size, al_map_rgb(arc4random() % 20 + 235, arc4random() % 20 + 235, arc4random() % 20 + 235));
67 ^
68particleengine.cpp: In member function 'void ParticleEngine::Update(int, int, int)':
69particleengine.cpp:58:102: error: 'arc4random' was not declared in this scope
70 if(this->count < (maxCount + ghosts + angels) && this->count < MAX_PARTICLES && (int)(arc4random() % 100) >= 80) {
71 ^
72In file included from plane.cpp:10:0:
73game.h:77:23: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default]
74 Game(Game const&)=delete;
75 ^
76game.h:78:33: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default]
77 void operator=(Game const&)=delete;
78 ^
79In file included from tribe.h:13:0,
80 from tribe.cpp:12:
81game.h:77:23: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default]
82 Game(Game const&)=delete;
83 ^
84game.h:78:33: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default]
85 void operator=(Game const&)=delete;
86 ^
87tribe.cpp: In member function 'void Tribe::KillRandomSpirit()':
88tribe.cpp:102:24: error: 'arc4random' was not declared in this scope
89 if((arc4random() % 100 < 20 || breakOut > 100) && this->purity->spirits > 0) {
90 ^
91tribe.cpp: In member function 'bool Tribe::RandomlyDetermineUnwillingSpirit()':
92tribe.cpp:145:29: error: 'arc4random' was not declared in this scope
93 int choose = arc4random() % 50;
94 ^
95tribe.cpp: In member function 'void Tribe::UpdateEnergy()':
96tribe.cpp:344:43: error: 'arc4random' was not declared in this scope
97 this->energy->stock -= arc4random() % 10;
98 ^
99tribe.cpp: In member function 'void Tribe::UpdateMeditation()':
100tribe.cpp:359:47: error: 'arc4random' was not declared in this scope
101 this->meditation->stock -= arc4random() % 10;
102 ^
103tribe.cpp: In member function 'void Tribe::UpdateGuidance()':
104tribe.cpp:374:45: error: 'arc4random' was not declared in this scope
105 this->guidance->stock -= arc4random() % 10;
106 ^
107tribe.cpp: In member function 'const char* Tribe::DetermineEvent()':
108tribe.cpp:601:29: error: 'arc4random' was not declared in this scope
109 int choose = arc4random() % range;
110 ^
111tribe.cpp: In member function 'const char* Tribe::ProcessEvent(EventChance*)':
112tribe.cpp:629:33: error: 'arc4random' was not declared in this scope
113 deaths = arc4random() % 4 + 1;
114 ^
115
116c:\ctwoplus\progcode\allegro5\SpeedHack2015entries\Elders_of_Ethos>echo off
117
118c:\ctwoplus\progcode\allegro5\SpeedHack2015entries\Elders_of_Ethos>
My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Onewing
Member #6,152
August 2005
![]() |
Little progress, but I'm (obviously) going to have to get allegro 5 installed on a windows machine. My PC is not connected to the internet and is running Windows XP. I'll have better luck on my work machine which can dual boot to windows. Got to refresh up on makefiles, so that's good. Fortunately, the only error I'm seeing from Edgar's post is regarding arc4random, which will just need the right include file most likely. The warnings don't look too concerning. ------------ |
Mark Oates
Member #1,146
March 2001
![]() |
I tried compiling on clang but realized I needed to for solve Cocoa and ended up getting distracted on Facebook. #windowsbuild -- |
Onewing
Member #6,152
August 2005
![]() |
FYI, the two .m files (ViewController.m and main.m) can be deleted and are not required for building. I deleted them (apparently, just the reference) from the project and never touched/saw them again, but accidentally blindly copied them into the source I uploaded. ------------ |
Mark Oates
Member #1,146
March 2001
![]() |
So I've created a build. I had to make a few modifications. modifications
1I created a replacement for the arc4random() function, just using rand()
2Added the *.wav files into the resources file (the game would crash without them). 3Took out the unnecessary .m files. 4Compiled with -std=gnu++11 5Added #include "allegro5/allegro_primitives.h" and al_init_primitives_addon() in main.cpp. The game was crashing without the addon being initialized. 6
Had to go hunt down chintzy.ttf on the internet, and put it in the root folder. The font rendering appears different than in your screenshot, I'm not sure what the cause of this is. A result is that the fonts are quite a bit more difficult to read. It's possible that I grabbed an older version of chintzy.ttf that doesn't render as well. 7I did my make like this CPP_FILES := $(wildcard *.cpp) OBJ_FILES := $(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o))) main.exe: $(OBJ_FILES) g++ -o $@ $^ -LE:/allegro-5.1.11-mingw-edgar/lib -lallegro_monolith-debug.dll obj/%.o: %.cpp g++ -std=gnu++11 -c -o $@ $< -IE:/allegro-5.1.11-mingw-edgar/include
conclusionI haven't played the game through, yet, but I'm assuming it will work to the end. Here's the binary (including the DLLs). And here's the revised source and makefile I used: -- |
SiegeLord
Member #7,827
October 2006
![]() |
Got it compiled, and after 1 false start, I managed to win it. That was pretty fun! By the way, you're missing the font (I had to substitute it with a different font without issue). This is another game that could have used the backspace key "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Mark Oates
Member #1,146
March 2001
![]() |
Mark Oates said: It's possible that I grabbed an older version of chintzy.ttf that doesn't render as well. Sure enough I downloaded the chintzy.ttf font from another website and it was a newer verion. It renders much more nicely now. -- |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Oates, your first download link gives a 404 not found error. The second source link works though. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Bruce Pascoe
Member #15,931
April 2015
![]() |
I'll have to try this now. The screenshots look very 90s-retro (that's a good thing). Like a Wolfenstein 3D-era DOS game.
|
Mark Oates
Member #1,146
March 2001
![]() |
Edgar Reynaldo said: Oates, your first download link gives a 404 not found error. The second source link works though. Yikes! Sorry about that. Fixed now. Here's that link again: -- |
GullRaDriel
Member #3,861
September 2003
![]() |
SiegeLord said:
This is another game that could have used the backspace key Yes! That aside it was a nice polished entry. A bit monotone but it's not crashing and the ambiance is cool :-) Thanks Mark for the Windows build ;-) "Code is like shit - it only smells if it is not yours" |
Peter Hull
Member #1,136
March 2001
|
Mark: On the subject of arc4random, I don't think your implementation is strictly correct Reason (from cppreference) Quote: Generally speaking, the pseudo-random number generator should only be seeded once, before any calls to rand(), and the start of the program. It should not be repeatedly seeded, or reseeded every time you wish to generate a new batch of pseudo-random numbers.
I think it actually doesn't matter here because the time between each of the user's entries is going to be random anyway. #include <random> #include <stdint.h> static std::uniform_int_distribution<uint32_t> uni; static std::default_random_engine engine; uint32_t arc4random() { return uni(engine); } Onewing: I've got a Linux makefile if you want. Cheers,
|
Mark Oates
Member #1,146
March 2001
![]() |
Peter Hull said: Mark: On the subject of arc4random, I don't think your implementation is strictly correct You are correct, it isn't. I wasn't in the business of creating the ideal PRNG, just make a random number generator and make it work. My implementation of arc4random() doesn't meet the specification of the original arc4random() (return uint32_t for example), but it does adequately meet the requirements of its use case in the game. -- |
Peter Hull
Member #1,136
March 2001
|
Mark Oates said: but it does adequately meet the requirements of its use case in the game. Well, yes and no. On my Linux it makes the particles go all in a line - and maybe affects the gameplay too, I couldn't tell.
|
Mark Oates
Member #1,146
March 2001
![]() |
Interesting. -- |
devo_au
Member #15,282
August 2013
|
Spent 20 minutes getting 10 from purity to the top. Had some weird shit going on with meditation requiring every follower to rest at one point before stabilising and moving them back to other disciplines. Good speedhack entry, well done. it wasn't me, it was other kids |
Peter Hull
Member #1,136
March 2001
|
Aha! I see the definition of arc4random you gave in your spoiler isn't the same as I found in your source zip file; with the addition of the if (!initialized) bit, yes, I agree, it should work perfectly fine!
|
|
1
2
|