Hi!
I created this thread in order to post: binaries, screenshots, art, videos, or any other related things about our abandoned projects. I'll start with mine:
B.R. Project:
I started this project probably in 2007, using Allegro 4, then I moved the project to AllegroGL and in the end all the graphics related code was just pure OGL.
As my skills improved I realized the core code was a fine piece of crap, then I decided to start from scratch using my own framework, but lack of time and motivation made this never happen.
Somehow I managed to break the old code, and it won't compile again so there are no working binaries and the only thing remaining are the assets(not sure about this) and these videos:
]]>I haven't abandoned any of my projects, well except for all the ones I'm not currently working on. I have no screenshots either only text output of random things like memory addresses of pointers, array element indices, and basic debugging junk.
]]>I started writing a reply to this thread, then abandoned my attempt halfway through.
]]>I wrote a Zelda-esque game maybe 6-7 years ago, and abandoned it for the same reason as the OP: the code was out of control. It was my first C++ program (coming from C background.) It was a half decent engine feature wise. You could walk around, interact with stuff (pick stuff up, attack, special attacks, dialogue, triggers, doors, etc) but it reached a point where it was too hard to add new stuff because it was a big ugly blob.
I still have the code in a backup, but don't ever plan on looking at it again. Oh, and the toughest part was graphics... I suck at drawing and this game had 8 directional movement, so I had the character animated but there were too few frames and it didn't look great, and I needed a lot more graphics. Also, I made a WYSIWYG map editor where you could place entities and stuff, give them properties and all that, but the GUI "library" was total crap so it was getting really difficult to program the editor too.
]]>Somehow I managed to break the old code, and it won't compile again
That's a piss-poor excuse. Unless you've managed to mislay code, it can't be that hard to get it compiling.
One good way to not give up on a project is to make sure it's useful and maintainable from the outset. Then release it as open-source, and you'll have people nagging you about bug fixes and feature requests ever after. This way you're not only letting yourself down, but you're letting others down too.
]]>{"name":"605345","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/4\/04c246f6dcdfa598029525f0ad0f1c7d.png","w":642,"h":426,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/4\/04c246f6dcdfa598029525f0ad0f1c7d"}
Not really abandoned, as I do still occasionally load it up for giggles. But I don't expect to ever finish it, so I guess it qualifies.
I think the biggest demotivating factor for me is that I hate all C IDEs on Linux, and I don't really feel like booting into Windows just to work on it for 30 minutes here or there. The project is complex and without a good debugger, it's hard to remind myself of how everything is working after I've been away.
]]>I abandoned Arkab on purpose because I got bored of the gameplay in the end and couldn't think of new ways to spice it up. It just was trial & error at its core. Some casual players I've tried it with liked it, but I didn't end up liking it later. It was quite a relaxing game tho.
It was quite a big help on learning shader language tho, which originated my next, more interesting project.
]]>I started a simple Battleship game, but gave up when my hard drive crashed. I don't have the time to revive it, but as soon as I hit the lottery, I will.
]]>
Here's my dead baby (I added some MM8 music to make it less dull to watch):
I abandoned it because it was all written in plain C, lacking even basic object orientation. I was a bad programmer at the time.
Actually just looking at it is a bit depressing.
On the bright side, I've put even more time into my current game, which I'm going to finish or die trying.
]]>If the code for that is even remotely readable, your statement about being a bad programmer at the time is 100% bullshit.
]]>Well, by bad I mean unprofessional. As I gradually became more aware of best practices and "beautiful" code, the code base became gradually more abhorrent to work with until eventually I just couldn't hack it (pun intended ).
]]>Was supposed to be an isometric RPG thing, but never made it past the basic editor. Was the reason I started using Allegro in the first place. Abandoned for no particular reason, but I'll try to restart it from scratch at some point.
{"name":"605350","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/5\/d5eba14fc4249511e458c1cfd6665536.jpg","w":805,"h":624,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/5\/d5eba14fc4249511e458c1cfd6665536"}
{"name":"605348","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/a\/fafefbb4c837031b742fc2d632830da5.png","w":805,"h":624,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/a\/fafefbb4c837031b742fc2d632830da5"}
Made a voxel editor for the purpose of making things for it too:
{"name":"605349","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/9\/c93639a4e6fc3daccabd712dccd1be42.png","w":804,"h":623,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/9\/c93639a4e6fc3daccabd712dccd1be42"}
Was supposed to be a clone of Klingon Academy. Used Irrlicht for this one... Abandoned it for no particular reason. I think I got around to making weapons + damage modeling.
{"name":"605351","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/7\/2754ca0422d1cd0b88a7645341a3e5d9.jpg","w":956,"h":596,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/7\/2754ca0422d1cd0b88a7645341a3e5d9"}
{"name":"605352","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/e\/ee19c65cdf34901bfd33a84db84602a9.jpg","w":954,"h":597,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/e\/ee19c65cdf34901bfd33a84db84602a9"}
]]>I have too many abandoned projects to decide which one goes here. Also I have two rungs of abandoned... "Abandoned and very unlikely to ever resume" and "Functionally abandoned, may yet get back to it, but no idea when".
]]>I abandon stuff a lot less these days. I could list a lot of other games I abandoned. Oh, here's one from high school. I don't even start something that I'm going to abandon anymore. git r done!
]]>I have too many abandoned projects to decide which one goes here. Also I have two rungs of abandoned... "Abandoned and very unlikely to ever resume" and "Functionally abandoned, may yet get back to it, but no idea when".
Same feeling here. Most of the "won't touch again" projects are just old iterations of my dream game. Who knows if I'll ever get close to doing it someday, but it's what's been driving me to learn a lot of stuff over all these years.
]]>I'm afraid this thread isn't big enough to list the failed projects I have had. Ideas are a dime a minute but I've failed time and time again to make them into final projects (if I got started on them at all).
]]>I'm afraid this thread isn't big enough to list the failed projects I have had.
Then just list the most tragic abandonment (i.e. the project you got furthest with but still abandoned).
]]>Then just list the most tragic abandonment (i.e. the project you got furthest with but still abandoned).
Well they all have got to the same point before I start thinking I can't do it and abandon it.
]]>The last project that I abandoned where there were actually graphics present was a platformer I was working on.
You could jump, wall jump and slide down walls. It could have been a very fun game I think. It was actually fun to play around in the test map, without any obstacles or enemies.
The graphics were really crap though, black background and a red square as a character. The collision detection was also quite broken.
I think I'm going to start this project all over again though.
]]>Well they all have got to the same point before I start thinking I can't do it and abandon it.
Of course if you think you can't do it you're never gonna progress. Challenging yourself to a new goal is what will get you to learn new stuff that you think of mysterious right now. Even if you don't succeed as you wanted in the end, every little bit helps.
My little side project of doing a level editor for a recently released game, even if a bit that looks like it would never be finished, has got me into trying newer tools now. XML parsing, writing. 3D rendering using Ogre. I never thought I would try something like that when I was trying to figure out how to get double buffering and sprites working, but yet it seems I did.
]]>I abandoned a game that was going to use Box2D, Skeletal Animation, and Parallax backgrounds.
But I reused a lot of the code for a card game I'm making. (Not Box2D though).
]]>I don't even start something that I'm going to abandon anymore.
This pretty much sums it up. Last gaming project I've done is probably ChristmasHack 2007. Other than that I'm consumed by school projects and don't have time and motivation to start anything else.
Anyway, to name at least a few of my abandoned projects:
Intruder - this was supposed to be SHMUP, rewrote it probably 4 times. Found out how not to write AI though.
Battlestar - this was supposed to be a game where you would control large space ship from above and complete missions. All from the top down perspective.
Tactics - failed turn-based strategy. Never got past map generator. Though, I've had complete design document including an implementation plan.
There's one project that I've finished as my semestral work that got abandoned. It was a utility that would load bitmap with height iso-contours and create 3D terrain. User interface was lacking and there was no LOD, but actually it worked. There's even a possibility to return to it - now that I know a lot more about image analysis
An obligatory screenshot:
{"name":"594111","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/e\/5ee8e41f88201f6ca8ceb53a5e218650.png","w":1024,"h":768,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/e\/5ee8e41f88201f6ca8ceb53a5e218650"}
Of course if you think you can't do it you're never gonna progress. Challenging yourself to a new goal is what will get you to learn new stuff that you think of mysterious right now. Even if you don't succeed as you wanted in the end, every little bit helps.
Yeah, it is easier to think I can't do it. I'm a logical person but when I try to make ideas into code it falls apart. Can do simple terminal/console apps but the more complex they get the more issues I have and then throw in graphics and such and I feel overwhelmed with it.
]]>An obligatory screenshot:
Set as Desktop Background - thanks.
I started on a shmup which I abandoned this last year. Couldn't get the scolling to work.
Also I recently abandoned my main game in favour of a new simpler game which I'm current;y working on - called Pong Ping.
An obligatory screenshot:
{"name":"605353","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/f\/7fcd3292d63441022910219c565fa2d9.png","w":640,"h":480,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/f\/7fcd3292d63441022910219c565fa2d9"}
]]>What are those weird polygons towards the bottom left side and center of the screen
]]>placeholders for grass tiles.
The terrain was made of tiles that made pyramids but I decided I stupidly let the whole thing pass quality control too easily.
]]>An obligatory screenshot:
I just stepped into a black and white version of Tron.
]]>Now I wanna play Arkab and Turns of War
Hmm... any recommended screen-capture programs? You know, for my crap?
]]>I like Fraps. Not sure what are good options for free stuff though.
]]>Under Windows I don't know. Under *nix I use Desktop recorder and just upload the output to YT.
]]>I'm reminded of this: {"name":"605357","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/f\/df31fafa841adb583c4b27b7ffb908d5.png","w":665,"h":384,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/f\/df31fafa841adb583c4b27b7ffb908d5"}
From a program I made that uses Diamond-Square to generate a fractal terrain and displays it in isometric perspective (there were many improvements, like a projection perspective and basic lighting and without the bug in fractal generation that causes the edges here to look like crap.
I started the best game ever in the history of gaming. It was a Monday morning, the ideas were just shooting through my veins like rockets. But I decided the world wasn't ready yet so I gave up. Here's the code if anyone wants to finish it:
int main() { AwesomeGameStart();
]]>
return 0; }
]]>
void AwesomeGameStart() { return; }
]]>
Wow, I just ran that code through a white space compiler...
The game it produced was AWESOME..... So awesome I am lost for words about it.
]]>An obligatory screenshot:
Is it a recursion based terrain generator?
]]>Is it a recursion based terrain generator?
Could be Delauney triangulation.
]]>Could be Delauney triangulation.
I've tried that to make a "cracked mud" salt flat terrain, but there wasn't any heightfield to it. No fractals whatsoever.
]]>Is it a recursion based terrain generator?
It was a utility that would load bitmap with height iso-contours and create 3D terrain. User interface was lacking and there was no LOD, but actually it worked. There's even a possibility to return to it - now that I know a lot more about image analysis
]]>
I abandoned it because it was all written in plain C, lacking even basic object orientation. I was a bad programmer at the time.
Truly impressive what library were you using in that project? Open TK?
]]>what library were you using in that project?
Take a guess. Allegro and AllegroGL of course! You deserve a slap for that.
]]>Now I wanna play Arkab and Turns of War
There is a public test version from 2010 available. (the thread has 5 pages because of some weird off-topic issue about women being able to make games ) But here's the latest compiled(debug) version I found on my folder, and as buggy as it may be, you might still find some fun in it.
Take a guess. Allegro and AllegroGL of course! You deserve a slap for that.
That reminds me when I was using OpenLayer, and eventually abandoned it, frustrated at some of its weird bugs(one of which I actually ended up fixing later here for somebody else )
]]>Rarely do I abandon anything. I'm this very day working on a resurrected shoot-em-up which is kind of an engine test for an older game concept I had. Then it's probably back to my strategy game, or maybe the puzzle game. Hell, I still want to finish the Monday project.
]]>I miss the old days of OpenLayer.
I hope there will be a renaissance of its methodology sometime soon.
]]>Rarely do I abandon anything.
I haven't 100% abandoned anything yet, except the projects that I no longer have the code for. I have the code for probably 90% of everything I've ever worked on. Eventually I may get around to working on 10% of that, who knows
]]>I'll have to start something now just so I can officially abandon it.
]]>Here's a screenie of something I was working on called Jetpack :
{"name":"605360","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/4\/34d75dba88e30db126971625c9448b90.png","w":799,"h":601,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/4\/34d75dba88e30db126971625c9448b90"}
I still want to finish it, but I probably won't get back to it until sometime this summer.
]]>I miss the old days of OpenLayer.
I hope there will be a renaissance of its methodology sometime soon.
Do it yourself, you're the fanboy.
(But make sure it doesn't build on MSVC only)
]]>Here's a screenie of something I was working on called Jetpack :
Looks very Apple II.
]]>Is it a recursion based terrain generator?
Nope, as gnolam already pointed out, though, that's a pet project I'm still working on. It was part of my bachelor thesis, but right now I was deeply engulfed in finishing a compulsory school sofware project.
No screenshots in this thread as it is not an abandoned project
]]>Well, I can say 2 Pong clones and a Lightcycles game. Two worked and on partially worked before I gave up on it.
]]>Rarely do I abandon anything.
Yeah, abandoning things is stoopid.
Edit: great, now I want to play it. And the Geocities link in that thread is broken. Care to attach here?
]]>I don't have a version I can compile; I'm still in the process of porting it to a library made this century. No it's not abandoned, believe it or not.
]]>Abandoned, because I didn't plan out well enough... Tic-tac-toe >_>
{"name":"6ae693b6de5f3b1ff1129abfec4f36ad.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/a\/6ae693b6de5f3b1ff1129abfec4f36ad.png","w":646,"h":508,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/a\/6ae693b6de5f3b1ff1129abfec4f36ad"}
{"name":"ff0ec02b44005e8a844c65f8e9ccf97d.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/f\/ff0ec02b44005e8a844c65f8e9ccf97d.png","w":647,"h":506,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/f\/ff0ec02b44005e8a844c65f8e9ccf97d"}
{"name":"7fe874bf08c159eb3b1cb64eb95f34e5.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/f\/7fe874bf08c159eb3b1cb64eb95f34e5.png","w":645,"h":507,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/f\/7fe874bf08c159eb3b1cb64eb95f34e5"}
There's a lot of programming material I have lost... If I find it, I can show more abandoned crud.
]]>Heh. I abandoned pretty much all the games I ever started. Don't think I ever finished a single one. Closest I ever got was an old-schoolish platformer (featuring a sheep); this one merely lacked interesting content and a bug-free menu UI; I had this 2D top-down space shooter, which is actually playable and all, but lacks a story and a mission system (say, objectives and such), and obviously there's no real content yet, you just spawn and shoot it out against AI opponents until you get tired. And I had a 3D space shooter, also with fairly complete space flight dynamics and all, but again, no mission objectives, no content, no story, and the models were crap. Jeez, I really have to dig these back up and see if I can get them to compile, if only for screenshots...
I've completed a number of websites / web applications though (at least they've made it into production; there's always room for improvement), and the music notation thing I'm currently working on is useful enough already - it's not really 'finished' in the sense that I don't know what else to add, but it is seeing some actual real-world use already (if only by myself).
]]>Do it yourself, you're the fanboy.
Hey! I loved OpenLayer.
(But make sure it doesn't build on MSVC only)
fixed.
]]>One day I hope to finish my 'KILL EM ALL' game. Its a cross between worms and ogre tactics. I stole the sprites from Metal Slug 2 for the units, and had some nice arcing grenade action going on at one point...but it's been so long, I just had a peek through one of the .c files and closed it again.
One day...
]]>About 18 hours ago I read about the release of FreeDOS 1.1 on Slashdot. I downloaded it for the fun of it, installed it into VMWare and tried to get the Sound Blaster working to no avail, so I switched over to VirtualBox where the sound did work. Then I grabbed the latest DJGPP and started playing around with some old programs I had from about 10 years ago. This computer I have is pretty much bargain bin stuff (3.1Ghz Athlon II) but it can count down an unsigned 32 bit register in 2 seconds even though it's running in a virtual machine. I remember being amazed at the 200Mhz Pentium I had in '97 which could do the same in a mere three minutes! I also remember playing around with a ray caster on a 16Mhz 386SX, I couldn't refresh the screen faster than about 20FPS in mode 19 even with no other work for it to do, and I just did the same with DJGPP nearptr stuff with approximately 10000 frames per second. Funny how both cores were maxed out during the blitting, but the register decrement thing only maxed out one core, as does the DOS text editor I'm using in this emulator (spinlocking looking for a keypress with 8088 assembly).
[EDIT]
Just for the heck of it I tried Allegro 4.4.2 exscn3d in an 800x600x24 X11 window, it got 150+fps, and the cubes were moving too fast to allow the illusion of motion.
"Pretty soon, computers will be fast."
I think they're here now...
[EDIT2]
I tried recompiling an old terrain demo with svga, kept getting a black screen with no way to end it except telling the VM to send a hard reset, no way to debug it in svga mode. Ghod it seemed so primitive now! Kind of like hiking across the Rockies with a bad knee vs. driving across them on an Interstate in a luxury car.
]]>I haven't abandoned any game yet, however I just have less than two years programming so there is a lot to come.
Well I think that changing completely the same game doesn't mean that I abandoned it... Or it does?
]]>Could be Delauney triangulation.
I don't see how can it be an answer.. Wiki hints it's an algorithm to connect dots in to triangles. But you need to place the dots first.
@Molang
ty, missed that
@OP
Yeah got it.. Nice idea.. AFAIK it's used in "real life mapping" as well, but for a user- it can allow one to make terrain using any "paint" or Photoshop or whatsoever. You don't even need a GUI actually
P.S:
I think it maybe a good idea to actually store terrain maps as BITMAPS..
Wiki hints it's an algorithm to connect dots in to triangles.
Wikipedia is a troll fest. The points come from random projections or you create a grid based on mathematical methods of generating 3d surfaces. It wouldn't make sense not to have a subroutine to generate the dots before connecting them.
]]>Does being tired of playing minecraft count as an abandoned project? Been in MC everyday for weeks and just got burned out on it. With nothing to do but dig and build it gets boring quick . So I abandoned the grinder I was working on for now. Does that count?
]]>Does being tired of playing minecraft count as an abandoned project? Been in MC everyday for weeks and just got burned out on it. With nothing to do but dig and build it gets boring quick . So I abandoned the grinder I was working on for now. Does that count?
I guess I could say the same about simcity 4 although I didn't get bored of it and I still have an urge to play sometimes but I have no time.
]]>I got burned out with minecraft a few times. Played too much. Now I just play a little at a time, and it stays interesting enough to play semi-regularly.
]]>Yeah, contemplating just taking a break from everything. Not like I'm doing anything that would suffer from not doing it though. Started on a SP map to do a project that was 75x75xMAX_HEIGHT and using SPC I got the 75x75 done and then just said "Ah, fuck it! Too bored to care to do the project. Never get anything done cause I'm on IRC goofing off too much, so I may need a break from that (plus I was tired of Sev's smart ass replies to almost every question I asked ), again not like I would get anything done if I wasn't in IRC. Truth be told, today I thought I was going to code and instead I took son to school, came home and helped wife get cleaned up so we could go into town. Got home and set up my wife's Kindle Fire, put my Battlefield 3 down with my other untouched games, picked up son, played angry birds (taking turns with wife), and now goofing off on YT, complaining on FB, and typing on here. Yep, I'm a lost cause, I'll never amount to anything because I no longer apply myself to anything I want to do (yay, me! failure extraordinaire! 14 years strong so far, my parents would be so proud!).
]]>Never get anything done cause I'm on IRC goofing off too much
You do NOT want to know how much time I've wasted in IRC over the years.
As to the rest of your rant, I decided to stop being a failure. Got fed up with it Though you do have me beat in one regard, you have a family, I don't
]]>Doesn't that make me a bigger failure though? I mean I have this dream way up here, and a family which means I should have drive to achieve that dream in order to support them. Yet here I am still down here with my family dreaming about making a living programming and making games.
[EDIT]
My problem really isn't the language. I mean I know about classes, know that for file i/o I can ask for a string but to open it I have to do filename.c_str() or such to convert the name so it can be loaded. My issue seems that I get majorly caught and distraught over the turning any idea (beyond simple) into code. I just get overwhelmed I guess would be a good way of putting it.
you have a family, I don't
I couldn't give a rat's a**e what spectrum felix said, he only moans anyway, but no, you DO have a family! ALLEGRO.CC! And if you're ever in Kent in the UK and need some cash, get in touch.
On a more serious note, I know where you're coming from. Big Hug Strom of Fjell. x
And shutup special fooyung.
]]>
Damn, I think the grammar discussion has fucked up your ability to make sense. You need bed rest.
]]>Meheh, yeah. Mwah, love you Sceptre! x
]]>Heh...
On coding note. This is what I just coded in a few minutes...minus a few typos on my part. Nothing major, but small things like this I can normally do no problem, but something like say an address book, or something more complex I see the whole picture rather than the individual things and I get overwhelmed and never do anything.
]]>
I see the whole picture rather than the individual things and I get overwhelmed and never do anything.
You should really sit down and do bit by bit and just not rush it.
I am currently learning how to make a platform game and that for me is pretty hard so I'm going bit by bit. Got the player movements and now to do world rendering and collision checking
]]>I couldn't give a rat's a**e what spectrum felix said, he only moans anyway, but no, you DO have a family! ALLEGRO.CC! And if you're ever in Kent in the UK and need some cash, get in touch.
On a more serious note, I know where you're coming from. Big Hug Strom of Fjell. x
Heh, I wasn't trying to be a moaning bitch. Just comparing against Specter. He thinks he's a failure, but I don't think he really knows the meaning of the word.
Personally I'm doing pretty good. money is tighter than ever, but I'm scraping by.
I see the whole picture rather than the individual things and I get overwhelmed and never do anything.
I think a lot of people have that problem. I know I do. I used to spend my spare time on bus's and daydreaming and falling asleep (etc), planning out the structure of semi complex (or just plain complex) programs and/or libraries. I've learned to stop doing that quite so much over time. I just try to sit back look at the really big picture and trace an outline of it my mind, then try and build that outline in code. It doesn't always work, but along the way, that work leads you to a better solution. That's when it's time to refactor or replace bits. Don't be afraid to change or throw out code that isn't working. I still spend entirely too much time trying to fix code that I should sometimes just replace outright. But I can't always resist my urge to figure out the problem. I really do think we have a fair bit in common, except you have a wife and child. Something I've only dream about.
]]>We have something in common? Are you sure you want to be admitting that? :p
[REVISION] Joking aside, I've really not been in IRC because I thought I would focus on programming. So far it hasn't been all that easy. I just couldn't resist poking fun at Sevalecan's sense of humor with the smart arse replies (actually I laughed when he said I was a tool because he is probably right).
[REVISION] My previous code in action with a source file. http://twitpic.com/84ekro
I like revision better than edit (mainly because of the fact that you can see the revisions of each post.
]]>You should really sit down and do bit by bit and just not rush it.I am currently learning how to make a platform game and that for me is pretty hard so I'm going bit by bit. Got the player movements and now to do world rendering and collision checking
I do all my projects from the finished part. First I hack it into pieces, then I reverse engineer every part of it myself and reassemble everything. I find this more useful because I learn from a lot of other peoples work.
]]>He thinks he's a failure, but I don't think he really knows the meaning of the word.
fail·ure [feyl-yer] Show IPA
noun
1.
an act or instance of failing or proving unsuccessful; lack of success: His effort ended in failure. The campaign was a failure.
2.
nonperformance of something due, required, or expected: a failure to do what one has promised; a failure to appear.
3.
a subnormal quantity or quality; an insufficiency: the failure of crops.
4.
deterioration or decay, especially of vigor, strength, etc.: The failure of her health made retirement necessary.
5.
a condition of being bankrupt by reason of insolvency.
Nope the definitions there sound like what I have in my mind.
Though many on IRC and A.cc, have said I excel at failure. I was reading a thread I made when I first joined where Matthew said "Ambition + No_Talent = Depression", but does that mean ML is saying I have no talent . My ambition hasn't changed and nether have my goals, I just learned to never post my ideas or thoughts here in regard to video game programming. This is really the only place I ever asked questions at and now I don't ask questions at all . Oh well depression is many faceted, I'm int the "God, I suck!" stage safely away from the "God, I want to die!" stage out of the several stages.
]]>Personally I'm doing pretty good. money is tighter than ever, but I'm scraping by.
"Money is better than ever, but I'm scraping by"... Ok I think this statement has no sense, if you're scraping by, but money is better than ever, then how the hell were you living before?.
Man, with your knowledge I thought you was working at a big company or something... Wth is wrong with you?, I always wonder why you don't have any game. Do you also have the Specter complex?. I think you guys talk all that shit here but unconsciously you're really happy with your life, otherwise I can't understand it.
What do you need? a Microsoft company to feel better?, I have just saw that Elias posted the changes that I did to make Ogre run on Allegro and Windows and I'm really happy, with just that I have like a year of "motivation gas" to move on...
]]>"Money is better than ever, but I'm scraping by"... Ok I think this statement has no sense, if you're scraping by, but money is better than ever, then how the hell were you living before?.
Money is tighter => he has less money.
]]>Man, with your knowledge I thought you was working at a big company or something... Wth is wrong with you?, I always wonder why you don't have any game. Do you also have the Specter complex?. I think you guys talk all that shit here but unconsciously you're really happy with your life, otherwise I can't understand it.
He worked on a big chunk of the library you're currently using. That's quite a big accomplishment.
]]>Money is tighter => he has less money.
Ohhh... My bad...
He worked on a big chunk of the library you're currently using. That's quite a big accomplishment.
Of course it is! and he's comparing himself with Specter it's impossible man, you can't do that...
]]>he's comparing himself with Specter it's impossible man, you can't do that...
He is comparing an aspect of him with the same aspect of me. That is completely different from comparing one's self with another person.
Thomas Fjellstrom: encouragement in this forums is lacking. The users now make Inphernic seem like a sweet guy when he tore into me .
]]>He is comparing an aspect of him with the same aspect of me.
Hmmm... I hope so...
Your problem Specter is that you're too busy thinking that you can't do anything to actually do something...
And by reading your code above, it's like you sit in front of your computer every time you want to program something, and that's not the way it works.
What you have posted, it's already in your brain, you knew how to do it before writing it, for that reason you did it. In programming, and in other aspects, you need to think about what you're going to do before doing it, but in programming this is even more important.
You need to pass throw levels of abstraction before writing anything, if you know the language then you have everything, what you need is the logic, think about the behavior of your program. Before using the programming language use the human language, abstract your idea, then get a level down, for example:
I'm going to make a ping pong game:
First level:
I want two paddles with a ball bouncing, the ball is going to collide only with the paddles and I don't want scores or anything. It's very important in this step to know exactly what you want and what you don't.
Second level
How the user is going to see this game, fullscreen, windowed, static fullscreen, or dynamic fullscreen?. Mouse... Keyboard... Graphics... Sounds... Depending on this choice you might or might not need more abstraction levels.
Third Level
Ok I have chosen a windowed mode, and the game is going to be played with the keyboard. My resolution is going to be 640 X 400. With this info I already know that the paddle is going to stop moving if its position is equals to 0px, or 400px( y axis) less the height of the paddle.
Something like this:
move_paddle(ALLEGRO_EVENT *ev){ if(ev.keyboar.keycode == ALLEGRO_KEY_UP && posiY != 0) posiY--; if(ev.keyboar.keycode == ALLEGRO_KEY_DOWN && posiY != al_get_bitmap_weight(paddle_img) - 400) posiY++; }
The same for the other paddle. Now the ball, the ball is going to change its Y position when its posiY is 0 or when is posiY is equals to 400 less its height:
if(ball.posiY == 0) falling = true; if(ball.posiY == 400 - ball.height) falling = false if(fall) posiY++; //See that I'm just moving pixel per pixel here... the same with the paddle else posiY--;
The same with the sides, if the ball reaches less than 0 pixels... Game over, if it reach more than 640 pixel you win... and so on...
The collision detection for the paddles and the ball is very simple too. And everything depend in what you have thought before reaching this point.
My game is so simple that I know that my paddle has a margin of 20pxs from the borders, so if the ball is in 20px or 640px-20px-its_wight and the ball.posiY is bigger than paddle.posiY and smaller than paddle.posiX+its_height that means that you're colliding... So you need to change its X direction:
if(ball.posiX == 640-20-balls_width && ball.posiY > paddle.posiY && ball.posiY < paddle.posiY+its_heigh) left=true; if(ball.posiX == 20 && ball.posiY > paddle2.posiY && ball.posiY < paddle2.posiY+its_heigh) left=false; if(left) posiX++; else posiX--;
Probably there are some errors, I just did it in some minutes, but what I want to say is that you need to think A LOT if you're not sure about what you're going to do before writing something. Try to abstract your ideas and then go down until you finally know how to write them using a programming language.
]]>So far it hasn't been all that easy
It wasn't for me. Still isn't. But as I slowly work on it, it slowly gets better. It is incredibly frustrating. But I just have to keep at it, or it gets bad again.
Man, with your knowledge I thought you was working at a big company or something... Wth is wrong with you?, I always wonder why you don't have any game. Do you also have the Specter complex?. I think you guys talk all that shit here but unconsciously you're really happy with your life, otherwise I can't understand it.
BiPolar, Chronic Depression (for most of my life) and Social Phobia (with a healthy dose of Generalized Anxiety Disorder). aka: I'm nuts. Learning to manage it though. It just takes time. A lot of it.
Of course it is! and he's comparing himself with Specter it's impossible man, you can't do that...
But look how long it took If I was in a good mood, the work for Android would have been committed a week or three after I got the phone, rather than 6 months The fshook and mode/fullscreen stuff for the a5 X port is about the same, I started the fshook stuff a year or two before I ended up finishing.
Huge issues with motivation when I'm depressed and anxious. But I'm getting better. Thats all that matters
To Specter: The only reason its getting better is because I truly WANT it. No, I believe I NEED it. I can't do the "FML" thing anymore. Failure on our scale is just not something I want to do anymore. I hope you have the same realization soon too. Sitting around complaining about it actually makes it worse, believe it or not. Its all about mind power. If you believe something, or tell yourself something enough times you will believe it. So stop it. (I know its hard, I have a hard time doing it). I'm not kidding. Its like trying to brainwash yourself, its quite hard to consistently retrain your thoughts to not be negative. Even the slightest bit of negativity has an accumulative effect on your state of mind.
]]>encouragement in this forums is lacking
I disagree. You should have joined this last SantaHack regardless of "I can't make a game in 7 days", and plenty of people encouraged you there. [1] You'll be amazed of how much you can actually do in a small amount of time if you just let go of any fears about it. Even if you don't succeed in it, you still learn from any failures.
You can even cheat and set up some basic code for common game stuff in the previous days to the competition. Now I realize we're like 7 months away from another possible Hack compo, but it's just something to think about.
Instead of coding a game right away, you could try coding up some stuff like a basic game engine to handle resource loading, drawing, all that stuff. The motivation on it is that it will just make the process much easier later if you intend to make a game from it(and it's actually pretty fun too, at least the first time). Low-level stuff like that shouldn't get in your way when you WANT to code actual game mechanics.
Yeah, you seem to have no problems with the really boring framework style code. Work on that, then when you get that stuff going, wrap it all up into a game with the framework. should be easier to get a working game done if you have most of it done before you start the actual main.c bit
]]>Yeah, you seem to have no problems with the really boring framework style code.
Yeah because it is the same boring framework taught by almost every book I've read and every tutorial I've done. When it comes to anything complex the tutorials and books really don't do a good job and preparing you because most of them are here is the concept, feature, and example code, next concept/feature and leave it at that. So the advance stuff confuses me because I never know where to start. With the pong clone I did I got as far as "I need two paddles and a ball bouncing around the screen" then breaking it down more was like me trying to speak japanese without ever learning it.
I've noticed that is one thing that is lacking in a lot of CS and such courses, they just assume you are top notch at problem solving and throw you into problem solving in software terms when most people are taught their entire school education how to do mathematical problem solving and real world problem solving. Even my problem solving course in both IVY Tech and DeVry were all mathematical or real world of "Susan is having a problem with Sarah at work. What possible ways could she approach the problem." The one that sticks out in my head is "You're the judge of a dispute. Jim is a farmer who has a family near a stream. Danny is the representative for a large company further up the stream. Proof has been given that the company is having run off in the stream which may or may not be dangerous during the high rain fall months. Read both sides and then come up with a solution that you think would benefit both sides." While it is great for problem solving in real world situations it sucks for programming so I don't understand the point of them in a computer degree.
]]>I try to break it down into objects. Then I break those objects up into computer objects.
For example:
In Pong you need a PlayArea, a 2xPaddle and 1xBall.
You then need some things that will do stuff to your objects. Note that objects themselves should not necessarily have the logic. You always want to stay as generic as possible.
Now we need PongLogic.
The PongLogic's job is to keep track of the ball, handle user input, and collision.
If this were a larger project I would recommend you break those down into 3 separate objects to adhere to the single responsibility rule.
Right now, nothing happens. We need to feed user input to PongLogic.
When Allegro tells me the user has pressed a key, I will send this event to a new class called InputHandler. InputHandler's job is to translate key events into Pong usable input.
When I hit KEY_LEFT, this will cause InputHandler to call PongLogic->moveSecondPaddleDown(1);
You might also have a moveSecondPaddleTo(int y); if you use the mouse.
PongLogic will then check if that move results in the paddle being outside of the play area. If it is, it will not move the Paddle object.
When the Paddle is in fact moved, it raises a PADDLE_MOVED event. This will be useful when we want to add sound or respond to certain events.
Each logic iteration of the game, the ball is moved, if it collides with a paddle, its new velocity vector is calculated. If the ball falls out of the play area in the horizontal axis either a FIRST_PLAYER_SCORED or SECOND_PLAYER_SCORED event is fired.
We now need to handle the score.
We create a ScoreHandler class. This class implements the PongListener class. This means we can cleanly be notified when a player scores and respond appropriately.
We then store the score in ScoreHandler.
When a winner is determinable, you could either call PongLogic->gameOver(); or have a listener and raise an event.
Notice I have not mentioned drawing. This is because you should see a game as a system of objects. One of the outputs of this system happens to be video output.
You should have a PongRenderer class. Its job is to read attributes from the objects and display them on the screen. If you prefer you can give your objects a render() method but the former is usually a better idea.
To add sound, you can simply create a PongSound class. It will listen to events from PongLogic or other objects and play sounds when certain events are raised. This keeps it clean and modular.
Hope this helps a bit
]]>make things really complex
Woah, woah, woah. That is seriously over complicating pong. At most, a basic OOP implementation of pong would have these classes {ball , paddle , game}, and these methods for each class {check_input() , update(double dt) , display()}.
K.I.S.S. F.T.W.
]]>
Hack away until you have a Pong game.
I'm well aware that it is way too complex for a Pong game, but it was to illustrate how a big project should be orchestrated. If you do not build a big game using this kind of design, it will become unmanageable very quickly.
Also, it's not that complex
]]>I'm well aware that it is way too complex for a Pong game, but it was to illustrate how a big project should be orchestrated. If you do not build a big game using this kind of design, it will become unmanageable very quickly
Usually you'd use UML to describe this stuff though.
]]>Usually you'd use UML to describe this stuff though.
Yes, ofcouse, I use UML all the time. But I chose to explain it in words.
I'm quite certain that if a Pong game was made for something like Xbox Live Arcade, its design would more closely resemble mine than Edgar's.
]]>Also, it's not that complex
When pong needs listeners and events, you might as well stop programming altogether, because You're Doing It WrongTM.
Case(s) in point :
We create a ScoreHandler class. This class implements the PongListener class. This means we can cleanly be notified when a player scores and respond appropriately.
It would be simpler to give the Game class a ScoreTable, and manipulate it directly.
To add sound, you can simply create a PongSound class. It will listen to events from PongLogic or other objects and play sounds when certain events are raised. This keeps it clean and modular.
OR, you could give the Game class some sound objects that it plays when it detects certain events taking place (not necessarily actually using events).
Listeners are classic over complication in my opinion. Events passed to parents are much simpler, and you don't have to keep track of some crazy inheritance tree created by making everything and its brother inherit Listener classes. Sure you only have to overload one method, but it's the same with events, and events keep things simpler.
]]>Once again, for a small game like Pong, listeners would be overkill, but the pattern you're illustrating continuously adds more responsibility to the game class until eventually, in a bigger project, it would become unmanageable. The mediator pattern is also great to a certain extent. There are situations where letting the parent handle the event is easier. However, in games or applications with over 500,000 lines of code, you start to put too much responsibility on one class and it becomes messy. I find the observer pattern (listeners) very applicable for many situations. Especially many to many relationships,
In my card game, the server (which can be local) sends messages to the client. The client sends out all sorts of event messages. It also needs to receive certain messages too, thus a many to many relationship. I have an event handler that handles events from the client and updates certain gui components and whatnot. The client also listens to another class. This class listens for action events from certain gui components and triggers the appropriate action. Ex: when I get an action event from startButton, I notify the client to start the game which sends a message to the server to start the game.
Ex:
For example, the client should not need to know anything about how I set a bid. The class handling bid assignment will listen for this event and deal with it.
If I went ahead and passed these events to the parent, it would get really messy in the parent because the upper level module is the game scene itself and there are far too many sub components to this scene to justify letting the game scene do all the logic.
I'm sure you think this is over complicated but it makes it very easy for me to manage, test, and debug the game.
One of the biggest reasons I put so much effort into making my game so object oriented is so that it does not end up in this thread with me saying it became unmanageable.
]]>Yeah because it is the same boring framework taught by almost every book I've read and every tutorial I've done. When it comes to anything complex the tutorials and books really don't do a good job and preparing you because most of them are here is the concept, feature, and example code, next concept/feature and leave it at that. So the advance stuff confuses me because I never know where to start.
Think of it as Lego. You have lots of bricks and all you need to do is start taking these basic blocks and build a larger structure. There are generally two approaches a top-down and bottom-up. In the former you begin from the whole structure and fill in the blocks at the end.
Though, at first I'd recommend the latter, where you begin from the blocks and build the stuff up from the ground often using scaffolding code that will get replaced later. Richard Phipps had a great tutorial somewhere, where you've actually completed a whole game using this approach.
I like building stuff, I like thinking about solving engineering problems. Though I lack the motivation and time to actually do it. My sticking point is to begin. I have lots of ideas lying around, lots of building blocks to use, but no will power to actually begin.
EDIT:
Oh, I knew I saw them somewhere on the wiki:
http://wiki.allegro.cc/index.php?title=Create
though, they seem to be incomplete
]]>
Oh, I knew I saw them somewhere on the wiki:
http://wiki.allegro.cc/index.php?title=Create
though, they seem to be incomplete
Nice, the thing that made me laugh was the completion section.
After 8 articles, Free Dungeons has gone from a concept and a design plan to a fully working and playable game. We have achieved everything we set out to do and I hope these articles have been motivational and useful in explaining how to make a more advanced game. Good luck for your future programming experiences!
Thank you. Richard.
Really? Guess he got busy. Two chapters is nice but would have been a good series to have been finished.
Thanks for the link though.
]]>I think he actually finished the articles, just no-one finished importing them into the wiki.
]]>Actually they have been finished, but they haven't been completed on the wiki. The old page linked from the original thread from three years back is down - obviously, Phipps have moved along and now he's doing something else. Though you can check out his Chaos Groove. Kind of on-topic since we speak about abandoned projects. If I'm not mistaken he actually more or less finished it.
Anyway I am pretty sure me or somebody else should have all 8 chapters lying around somewhere. Any ideas where to post them?
EDIT: too late
]]>Any ideas where to post them?
Either help to reformat for the wiki , or zip them all up and attach them to the Create page. That way anyone can download them and help to add the rest to the wiki.
]]>I'm sure you think this is over complicated but it makes it very easy for me to manage, test, and debug the game.
Well, I can't see your whole design inside my head, but I still think I would prefer to solve it with events and composition instead of listeners and inheritance. It seems like your method would end up with a lot of redundant references to other objects being stored in lots of other objects, when it seems to me that it would be easier to give a single object responsiblity for handling any messages from its subordinates. It just seems like your method would be more complex than mine, that's all.
]]>Yes, it is more complex, but for me it is worth it to take the extra time in order to make debugging and refactoring much easier. Otherwise my GameScene (the parent) would be well over 4,000 lines of code with well over 100 methods (so far). There is quite a bit going on in the game scene.
I have made projects where I did use the mediator pattern in Java and they got out of hand and I had to stop. I made a Drawing Application where the Panels were responsible for the logic of their children. As I added more features I got lost. After that I started making lots of listeners and while it took much longer, I found myself able to manage much bigger projects.
I have not yet programmed professionally. I'm on my last year of college. Maybe writing code for a company will better enlighten me on the benefits of parents handling child logic, but as it stands, I find myself able to much more easily debug, test, and add features with listeners.
With C++0x, more references is not really a big deal for me.
]]>Would delegation work for you? Or is that what you mean by the Mediator pattern? I don't have all the different design patterns memorized yet. It seems like you could sub divide the responsibility of GameScene into separate objects that handled different aspects of the game, which would help things stay modular, but would also alleviate the need for listeners. Every many to many relationship can be modeled as a one to one relationship that dispatches messages to others as necessary. I just don't see the value of listeners yet.
]]>I have a more bloated version of Pong.
I have not yet programmed professionally. I'm on my last year of college. Maybe writing code for a company will better enlighten me on the benefits of parents handling child logic, but as it stands, I find myself able to much more easily debug, test, and add features with listeners.
Actually what you are doing is much closer to what one would expect to see in professional/enterprise code than what others are suggesting. The difference is that professional code would likely be broken down into even smaller components, with even more emphasis on extensibility and maintainability.
Maybe writing code for a company will better enlighten me on the benefits of parents handling child logic
Let's hope not.
don't see the value of listeners yet.
I'm not sure about C++, but in C# listeners (which are necessary for events) are wonderfully elegant and are the cleanest solution to a multitude of problems.
]]>I could do it like this, yes. I think it would mean a big switch case since the parent would have:
case CARD_THROWN_ON_TABLE: client->passMessage(msg); playSound("throw"); ... ... break;
From the server to the client and client to the server, I pass messages and there is a switch case and it is not too big.
To do it like this, I still have to be bothered to look through big switch cases, where I might forget to write break;
Generally the way I use listeners is that I have 1 big listener class for all the events in the game. The parent just has to make the connections between the objects, who is listening to what. I think both come out to about the same, but I can see how listeners can be a pain without reference counting.
As far as letting the parent handle the logic of its children, I feel it would get out of hand, but I'm fine with delegation. I do use it when it is far simpler than a listener.
With listeners I can use a variety of enums to represent the message which helps self document the code for me. I also do not have to go digging through a gigantic case statement.
When it is between delegation and listeners, I think the developer should choose whichever they feel more comfortable with. They each present a solution to many to many relationships while staying modular and flexible. (At least for C++) As was mentioned, in a language like C#, listeners are absolutely the way to go, as they are practically built into the language.
]]>I'm not sure about C++, but in C# listeners (which are necessary for events) are wonderfully elegant and are the cleanest solution to a multitude of problems.
This is a little too vague to be helpful.
Edit
@jmasterx
The way I do it is like this :
void InheritedClass::QueueUserMessage(Widgetmsg wmsg) { const Widgetmsg msg1(&some_widget , TOPIC_SOME_KIND_OF_WIDGET_TOPIC , ENUM_MESSAGE_VALUE); if (wmsg == msg1) { // blah, we got a message from some_widget about something blah blah deal with it here } if (notused) { parent->QueueUserMessage(wmsg); } }
]]>
The difference is that professional code would likely be broken down into even smaller components, with even more emphasis on extensibility and maintainability.
I always thought that was used to maintain a working relationship with India for outsourcing source code. Being more professional these days implies being unemployed for less time but always switching companies.
]]>
@jmasterx
The way I do it is like this :
void InheritedClass::QueueUserMessage(Widgetmsg wmsg) {
const Widgetmsg msg1(&some_widget , TOPIC_SOME_KIND_OF_WIDGET_TOPIC , ENUM_MESSAGE_VALUE);
if (wmsg == msg1) {
// blah, we got a message from some_widget about something blah blah deal with it here
}
if (notused) {
parent->QueueUserMessage(wmsg);
}
}
That is Chain of Responsibility, you pass it up the parent chain until someone consumes it. That works pretty well for Gui components with children, or composed Widgets like a NumbericUpAndDown. In this case, that works much more effectively than a listener. It is also small though. In GUIs in general it is a good tool for the job. Java's Swing I read uses a Model View Controller which adds a fair amount of flexibility.
Game inside game.
Pongception
]]>Either help to reformat for the wiki , or zip them all up and attach them to the Create page. That way anyone can download them and help to add the rest to the wiki.
Oh, well. I've thought about that myself. Didn't have much time though. I'll see what I can do. Anyway I've wanted to get to wiki editting sooner or later
]]>With C++0x, more references is not really a big deal for me.
Psst. It is no longer C++0x it is now C++11 .
Oh, well. I've thought about that myself. Didn't have much time though. I'll see what I can do. Anyway I've wanted to get to wiki editting sooner or later
Yeah I've thought the same thing, but don't have anything that would be beneficial to be put up. Sometimes I wish we had Pixelate still going from the users but I think almost all the writers have moved onto other things.
]]>Psst. It is no longer C++0x it is now C++11 .
Yes, I know, but I use Visual Studio 2010 which came out before the official C++11 standard.
]]>Yeah I've thought the same thing, but don't have anything that would be beneficial to be put up
Meanwhile as we speak - ok, about an hour ago - I've put online chapter 3, more coming tomorow/today depending on your timezone.
]]>Yes, I know, but I use Visual Studio 2010 which came out before the official C++11 standard.
Change compilers immediately! VS doesn't support the standards that well. Last I knew it doesn't even support the C99 standard yet.
]]>You're really determined to crap on this thread, aren't you?
]]>You're really determined to crap on this thread, aren't you?
No, I have VS but every time I am on IRC they point out that VS doesn't support quite a bit of the standards which is why I quit messing with them. Now I use gcc in Ubuntu and Ming in windows. I can think of better ways to 'crap on this thread' other than pointing out that VS is outdated (knowing MS it is by choice).
]]>This is a little too vague to be helpful.
In C#, events/listeners look like this:
The point is that "listeners" are so cleanly supported by the language that it tends only to be inexperienced programmers that don't use them and instead opt for polling.
]]>The point is that "listeners" are so cleanly supported by the language that it tends only to be inexperienced programmers that don't use them and instead opt for polling.
I'm inexperienced so guess that means I should opt out of listeners until I become experienced .
]]>Can we use the spoiler tags for off-topic comments? wouldn't be that a great idea?
I mean, it bothers me to skip off-topic comments, it would be great if it were some way to easily see off-topic comments and then just ignore them.
By the way, I really like Death Note デスノート Desu Nōto , take a look at it: http://en.wikipedia.org/wiki/Death_Note
]]>I've watched the anime, and it was awesome. People told me I should read the manga tho.
EDIT:
I was rooting for L
]]>
L Lawliet? hahaha. I'm reading the manga right now (chapter 45/108) it's amazing! I think I'm going to watch the anime after reading all the chapters!
I wish I had a Death Note, real names and pictures of some of the members in this forum off-topic comments would be dramatically reduced in my threads.
]]>I think I'm going to watch the anime after reading all the chapters!
The anime is quite short as well. Only 37 episodes, but I loved it(except for the last few because of some new characters...)
I wish I had a Death Note, real names and pictures of some of the members in this forum off-topic comments would be dramatically reduced in my threads.
I'm safe.
]]>I heard the anime was sub-par compared to the manga. Haven't seen it, but the manga was fantastic. Until about the half-way point (JUST AS PLANNED). Then it dropped a bit to pretty good.
Fun fact: The same artist/writer team who did Death Note (writer Tsugumi Ohba and artist Takeshi Obata) now write and draw Bakuman, which is one of my current favorite mangas. It's kind of a meta-comic about a couple of teenagers trying to make it as a manga writer and artist.
(... how did we get off on this topic ...)
]]>(... how did we get off on this topic ...)
Same way we always do. We just talk about what is on our minds and boom we are off topic and on a topic that is completely left field.
]]>Talking about cartoons/animes here is fine, I can't control it. But if you're ever in my house, remember this rule: NO ANIME.
]]>The abandoned projects thread has now been abandoned.
]]>Maybe writing code for a company will better enlighten me on the benefits of parents handling child logic
Textbook OOP modelling is often inconvenient, inefficient, or plain old wrong.
Consider the typical moving ball problem. Many OOP textbooks model a moving ball like this:
class Ball { public: virtual void move() { x += dx; y += dy; } };
Very nice, the ball moves itself. Awesome. We can even implement a bunch of moving objects, each with a different implementation of the polymorphic move() method, and they will all move differently.
But then we want to do collisions, and the thing breaks. The ball moves, but in order to check if it can actually move, it needs to know a lot about its environment: the position and type of all the other objects, the walls, and maybe a lot more. We can, of course, change the move method's signature to:
virtual void move(World& world);
...but this means we have to open up a whole bunch of internals of both the world and its objects so that individual objects can read and manipulate them. The benefits of encapsulation are mostly moot this way. Another ugly spot is that if two object collide, the design mandates that one of them is the 'bouncer' and one is the 'bouncee': it's ball1->bounceWith(ball2);, even though they are really equal partners in the collision.
If we take a step back, we might observe, though, that in the real world, a ball does not in fact move itself. It is a passive object, subject to physical effects such as elasticity, inertia, in short, mechanics. The ball does not move itself: the ball has a bunch of properties, and the laws of nature act upon it.
Taking this back into the OOP domain, we end up with a design where the ball is just a data object with little functionality; it has a position and a velocity, and a few immutable properties such as mass, elasticity, etc. Movement is not handled by the ball itself, but by the Physics class: this class reads the object's parameters, and performs suitable physics calculations, something like this:
class Physics { void updatePositions(Object[] objects) { foreach (objects as object) { object->position += object->velocity * deltat; foreach (collidingObjects(object, objects) as cobject) { handleCollision(object, cobject); } } } };
The Physics class can act upon all the objects, without knowing too much about them (e.g., it doesn't have to know the color of a ball to calculate how it bounces, so the ball can keep that information to itself), but it can naturally operate on two objects at a time - the bouncer/bouncee problem goes away, as it is now physics->bounce(ball1, ball2);.
If you're a keen observer, you may notice something: the ball is a plain data object with little or no functionality; the physics class is pure functionality with little or no state. This means that we have separated state from behavior, exactly the opposite of what OOP tries to do (bundle state and behavior into classes). We could just as well have written this in a procedural paradigm or, in fact, if we ignore the OOP boilerplate, we actually have: class Physics is basically just a function (or a set of functions), and class Ball is just a record type (polymorphic, if you have different object types, but still just a record type).
]]>Talking about cartoons/animes here is fine, I can't control it. But if you're ever in my house, remember this rule: NO ANIME.
Too much tentacles?
]]>it's like you sit in front of your computer every time you want to program something, and that's not the way it works.
What? What do I sit in front of when I want to program then, the stove? My problem is that I quickly do the thinking in my head. I don't write many things out.
What you have posted, it's already in your brain, you knew how to do it before writing it, for that reason you did it.
Yeah, only things I had to look up was eof() get() but I was an idiot and didn't do get at first. I opened the file and then just did cout << nums; without reading anything into it.
]]>The Physics class can act upon all the objects, without knowing too much about them (e.g., it doesn't have to know the color of a ball to calculate how it bounces, so the ball can keep that information to itself), but it can naturally operate on two objects at a time - the bouncer/bouncee problem goes away, as it is now physics->bounce(ball1, ball2);.If you're a keen observer, you may notice something: the ball is a plain data object with little or no functionality; the physics class is pure functionality with little or no state. This means that we have separated state from behavior, exactly the opposite of what OOP tries to do (bundle state and behavior into classes). We could just as well have written this in a procedural paradigm or, in fact, if we ignore the OOP boilerplate, we actually have: class Physics is basically just a function (or a set of functions), and class Ball is just a record type (polymorphic, if you have different object types, but still just a record type).
Interesting. I did not know this technique was anti OOP. Your description is exactly how I always make my games in fact. I thought it was more OOP to do it this way because it separated state from behavior. (At least for simulations of real world objects, it just seems like the natural way to solve it.)
Thanks!
]]>I just had sex!
Too much information? who cares!
]]>I just had sex!
Congratulations
]]>I thought it was more OOP to do it this way because it separated state from behavior.
Yes, I'm pretty sure it is considered one of the "good OOP principles", along with things like:
program to an interface, not an implementation
favour loosely coupled designs between interacting objects
favour composition over inheritance
etc.
]]>James Lohr, did you have sex?
]]>James Lohr, did you have sex?
That's handled by the world, not by himself.
]]>James Lohr, did you have sex?
The thread gradually progressed from abandoned projects, to reasons why they were abandoned one of those being coding styles which we were discussing until Specter Phoenix you began derailing it.
]]>program to an interface, not an implementation
What do you mean by that?
favour composition over inheritance
How is that different from inheritance as a method of composition? Or does composition refer to explicit, non-inherited declaration?
]]>Put simply, composition implies a has-a relationship. Inheritance implies is-a. Composition works great for dependency injection and makes it much easier to build reusable components.
Programming to an interface is much like it sounds... You shouldn't care much about the underlying implementation.
A simple example in PHP:
Here the walker function is programmed to the Iterator interface as opposed to the MyCollection class. As a result, it works with any type of iterator and is far more reusable.
]]>which we were discussing until Specter Phoenix you began derailing it.
You have been here long enough to know if it wasn't me that derailed it someone else would have . I can't think of any OT topic that has ever stayed on topic, has there been? Anyways, if it is that big a deal I'm sure ML would have warned me or banned me by now.
]]>Put simply, composition implies a has-a relationship. Inheritance implies is-a. Composition works great for dependency injection and makes it much easier to build reusable components.
So if you have:
class Position { public: float x; float y; };
composition looks like:
class Object { public: Position *position; std::string id; };
where inheritance looks like:
class Object : public Position { public: std::string id; };
right?
]]>When I had researched composition for games I cam across this article:
http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/
The nice thing about it if I recall is the ability to make new types of objects at runtime. Ex: Flying Talking Dog at runtime.
]]>I used component based design in my SantaHack entry to great success. It was certainly far more pleasing to work with rather than an inheritance hierarchy which I always observe devolving into god objects in my games.
]]>My issue seems that I get majorly caught and distraught over the turning any idea (beyond simple) into code. I just get overwhelmed I guess would be a good way of putting it.
Perhaps you have a bit of an anxiety disorder. I started taking vitamins to help my anxiety and that's why I've finally come back to programming again, (that and the holiday rush is over for me). What I take are those Mega Men Sport multi-vitamins from GNC. I was always a bit bogged down with programming, (really doing anything in general). My desire to program would hit me for just a moment, I'd load up Code::Blocks and then feel like there was a wall in front of me, completely hindering my desire to do anything. Pushing through to start programming was actually a little bit painful to me. "Do it, just start typing stuff." That's what I'd tell myself, then put my hands on the keyboard and feel like my whole body just started hurting like I didn't really want to program after all, but I did. A Google search for nutrition and vitamins to help reduce anxiety lead me to a short list of things to help, almost all of which are in those Mega Man Sport supplements. Keep in mind that it has certain vitamins that can build up in your system, so working out just a bit to clear those out every now and again is recommended. Ohhh yeah, my roommate convinced me to start taking those vitamins to help me with energy and I looked up anxiety after I was haphazardly taking them. What a nice unintended effect.
How many abandoned projects do I have? Dunno, I can neither count that high, nor can I even remember them to count them.
I have a more bloated version of Pong.
Dude, that game looks amazing as is. Forget about spicing it up, it's a Pong clone it's not supposed to be spicy...... At least I don't think it should, (especially if it helps you release the game faster).
]]>Dude, that game looks amazing as is. Forget about spicing it up, it's a Pong clone it's not supposed to be spicy...... At least I don't think it should, (especially if it helps you release the game faster).
But it's not a Pong clone. It's a puzzle-trial and error game, the Pong level is just ONE puzzle of the entire game.
But it's not a Pong clone. It's a puzzle-trial and error game, the Pong level is just ONE puzzle of the entire game.
It's modified pong. Pong with thought!
Also I thought about what you said regarding making a basic game engine. Started to do it then realized I have no clue what I'm doing .
Perhaps you have a bit of an anxiety disorder.
Perhaps. I've been diagnosed as having a lot of things lately and I'm sure they are probably right or close to accurate.
]]>That was the first game you posted.
I have a more bloated version of Pong.
Game inside game.
The one in that quote is the one I was talking about....... Ummm, is there a specific reason there's no quote button in the forums? Or am I just missing it?
It's modified pong. Pong with thought!
And an amazing looking pong at that.
Perhaps. I've been diagnosed as having a lot of things lately and I'm sure they are probably right or close to accurate.
Depression and anxiety: Exercise eases symptoms
Depression symptoms often improve with exercise. Here are some realistic tips to help you get started and stay motivated.
I started off super simple to help me get some motivation back. I bought two 10 pound weights. Randomly, I would go pick them up and do a few curls and maybe some other exercise action thingies. When they started to feel pretty easy to move around, I got a pair of 25 pound weights...... Haven't gotten past those just yet though.
]]>The one in that quote is the one I was talking about...
The first one I posted and the 2nd video are the same game. It's just that one of the levels(I think it's level #12) has this puzzle where it simulates pong. Heck, you can even download it and check it out for yourself.
Ummm, is there a specific reason there's no quote button in the forums? Or am I just missing it?
I assume it is to prevent abuse of the quote feature and just use it for the relevant parts of the text you're replying to. Quote pyramids are a plague in most boards. Do note that it's not needed to link to the original post, since with only <quote></quote>, it will search and link to the author on its own(and it's correct nearly 99% of the time).
]]>Dario ff: I took you up on your idea. I decided to make a simple 2D game engine, but even simple game engines aren't simple (at the least input, graphics, sound, physics). Then you also have networking, AI, scripting, math library, and of course the engine core (and utilities). That is just quoting what I read on google results. Maybe a little more advanced than what my abilities can do. I'll figure out something, and if not -- oh well.
]]>Don't make engine, make game. Then, rip the game's guts out and create engine à la Frankenstein. It will serve your purpose. Or kill you.
]]>Think it is safe to say I don't understand the logic required. I've tried to make two games and both times I needed a lot of help with code that was considered simple for beginners.
]]>Don't make engine, make game.
This.
]]>Here's an idea that may be even better for you. Start simple and build up.
Super general: Write a calculator program that uses only the command line at first. Then slowly build on it until you have a GUI, mouse and joystick inputs. YES joystick inputs. Really work yourself out here and do something no one else does.
More specific: Start off by having it request a number as input. Then ask for a math operation and then a second number.
Work on this until you can have the user input the whole thing on one line.
Add a GUI to show you what the results are, then later have it where you can input data into the program. Get the mouse into it now and when that is down pat, start on the joystick.
Now add sounds for feed back on when it accepts or completes commands. Now you've worked out how to start with the basics of the game/engine. Time to add physics for even more fun. I'd say use the mouse or joystick to drag/move a ball to a desired location and drop it onto some blocks that represent numbers or operations.
Now take over the world with your new program and rule with an iron fist.
? ? ?
Profit!!!!
]]>An engine is really just a bunch of APIs that help you make games. Therefore, consequently if you make a game, you'll generally have an engine. You can then figure out what is reusable for other projects and make a library. Now every game you make can use this library. As you make more games you improve this library and all your old projects benefit. Therefore, make a game, and then you will have an engine.
Remember: Game Engine, not Engine Game.
]]>Dario ff: I took you up on your idea. I decided to make a simple 2D game engine, but even simple game engines aren't simple (at the least input, graphics, sound, physics). Then you also have networking, AI, scripting, math library, and of course the engine core (and utilities). That is just quoting what I read on google results. Maybe a little more advanced than what my abilities can do. I'll figure out something, and if not -- oh well.
Stick to what you need. You're not gonna reinvent a car if you just need the wheels.
Plus, the first design of your engine is likely wrong and will get to a point which will need a full rewrite. Just get the basic functionality working(resource loading, scene management, input, simple sounds), and then try to make a simple game with it.
Striving for the "perfect" engine is an endless loop which will net you nothing. It's not as simple as, "make game" either. Just set up what you need for a basic engine and get working later. Making an engine while trying to make a game will take more time overall than if you had set it up properly first.
]]>Striving for the "perfect" engine is an endless loop which will net you nothing.
I concur. I prefer to work with a set of familiar code and libs I can string together loosely to fit my needs, then fill in the gaps. I get up and running on new projects fast, and don't feel like I have my hands tied.
]]>Yeah, my problem is that with me I think: I want to make a simple game engine (or game for that matter). With the engine I say, okay I need to have the core, graphics, sound, input, and physics and collision detection. Then don't know where to go from there.
In regards to a game, I think I want to make a pong clone. Then go blank because I really don't have the proper thought process developed to say ok I want this, break it down more, so I need this, break it down more, repeat til Code is ready to be written.
Then I also have issues with the logic. I messed up the drawing for Pong and was a complete retard/noob when it came to collision detection for both Pong and Lightcycles. I thought college was going to help me build, grow, and overcome this problem, but instead I seem to have fallen victim to it as I have become depressed and not coded much outside of what I know by heart. Rather frustrating to be honest. Just don't know how to fix it or combat the issue.
]]>Like I said earlier, start with the core, then work your way out. You're trying to start with everything and then make the game. As far as I can tell, you don't have the thought process for that at this time.
Another thing they should have taught you in college, (which I personally loath and despise and never do myself), is pseudo coding and flow charting. Write down the steps you want to take and then write your program based on it. Draw a big picture of what you want to happen in the order that you want.
When you teach a child something, you should NEVER tell them they can't do something. That will make them want to do it more. Nothing to see here folks, move along.
Then I also have issues with the logic. I messed up the drawing for Pong and was a complete retard/noob when it came to collision detection for both Pong and Lightcycles. I thought college was going to help me build, grow, and overcome this problem, but instead I seem to have fallen victim to it as I have become depressed and not coded much outside of what I know by heart. Rather frustrating to be honest. Just don't know how to fix it or combat the issue.
Seriously? You're going to let a few little coding flaws stop you? Did you ask anyone for help, (keep in mind I haven't been here for like ten months)? Have you asked anyone to teach you how to do it better?
Change your attitude. Instead of saying: "I can't do that", say: "I don't want to do that right now". You'll only put it in your head that you can't do something, and then you won't want too.
You sound like you have a good deal of anxiety like I said earlier and I think I know where it is coming from. It sounds like you're like me and have a bad case of ADD.
]]>When you teach a child something, you should NEVER tell them they can't do something.
If it is true, you should. It's quite evil to give somebody false hope just because you want to be nice.
]]>If it is true, you should. It's quite evil to give somebody false hope just because you want to be nice.
I guess I missed something as I'm not sure what you're talking about. However I've been up for way too long, haven't gotten enough sleep and your advice tends to be sound, so allow me to rephrase and somehow explain my thinking.
In my opinion, if you're going to teach someone something, it is best to avoid telling them that they can't do it due to the effects of reverse psychology. However when you are teaching/talking to yourself, (in a sane manner), I feel that you should avoid telling yourself that you can't due to the fact that you have better access to your brain and can convince yourself of something faster than someone else can if you feel it makes sense.
For example, if you try to convince yourself that you can't climb to the top step of a step stool, you may find this to be quite difficult as your brain has learned that it can usually get onto such objects, (such as stairs and other such platforms) and that you should be able to get on the stool in the same manner as before.
Next example, if you have a wall that is a few feet higher than you and the top is a bit out of reach, it would be a lot easier for you to convince yourself that it is unclimbable. Even if there are small footholds in the wall, you can still convince yourself that it isn't climbable, (unless the footholds are very obvious).
And after writing all of that, I think I do see why what I said earlier isn't of any use.
[EDIT]
And personally I feel it would only be evil if I was purposely being malignant. As it was, I feel I was being more ignorant than anything.
I would make a big distinction between physical tasks and mental tasks. Exercising doesn't require you to acquire any skills. To lift weights, you simply lift weights. To run, you run. Anybody who fails to get in shape simply didn't try hard enough. Yes, some people have to try harder than others, but anybody can get in shape in a reasonable time given the right amount of effort.
Acquiring a skill such as programming requires mental ability that the aforementioned tasks do not. It's easy to blame the lack of effort... to say a person isn't trying hard enough. But how hard must a person try before you are convinced he cannot do it?
Yes, it's quite possible that somebody could suck at programming for the same reason he is fat and out of shape: lack of effort. But you cannot force somebody into learning a skill like you can force him into getting into shape.
Even if given infinite time anybody could learn anything, we don't operate under those conditions. So to me, when it comes to acquiring skills, not having the motivation to learn is the same thing as not having the potential because it is impossible to separate the two as an observer.
So practically speaking, if a person after two years of entry level programming classes at university is still struggling to comprehend the most basic concepts, I would feel compelled to respectfully tell him that he is wasting his time and that he should pursue other careers.
I wouldn't tell him to try harder, to do this, or to do that, and then he will succeed. Maybe, in 1% of the cases, I would ultimately be proved wrong. But I would save 99% of people from wasting money and time (and feeling miserable) pursuing things that are beyond their reasonable grasp.
It's hard for me to understand why somebody cannot learn how to program. I taught myself from books (pre-Internet) and was coding my own BASIC programs at the age of eight. But when I consider things I am not good at (basically everything else), it gets put into perspective.
This is just something I rant about from time to time.
(I would have responded more directly to your actual point, but I don't really understand what you're trying to say within the context of advising Clayton.)
]]>[edit]
In response to Matthew's post:
I don't think it's fair to make the distinction between physical and mental tasks. Take music for example: it has at least as large a spectrum for natural talent as programming.
I do think that people have a natural innate ability which plays a very large role in defining the upper-limits to what they can achieve in most tasks (both physical and mental), which I would be tempted to call intelligence. I think IQ has a strong baring on this measure (or rather, this intelligence has a strong baring on people's IQ scores) only if the person has spent a sizeable chuck of their life solving IQ test style problems.
For example, I do very well in IQ tests because I studied maths and CS, and I'm a programmer. My mother, on the other hand, doesn't do so great even though her innate intelligence is as good, if not better, than mine. She is a good pianist, a brilliant remedial teacher, and generally good at most things she does.
That being said, I doubt she could ever be a programmer. Programming requires an acute (boring on obsessive) attention to detail and ability to follow logic through that I believe is in some ways separate from ones innate intelligence. I also believe that some programmers meet this requirement while still having an average innate intelligence, but are able to excel beyond their peers because they can doggedly follow logic through.
On game engines:
As jmasterx said, if you build a game and you follow principles such as encapsulation, reusability, abstraction etc. whilst sticking to a strict (but sensible) project hierarchy, you will end up with a game and some sort of engine.
Essentially the game acts as giant test rig, and as something to showcase the engine when it is done.
In fact those are probably the most important metrics in measuring how good a game engine (or framework if you prefer) actually is:
1) How good the actual game is
2) How well the code was written for reusability
Think it is safe to say I don't understand the logic required. I've tried to make two games and both times I needed a lot of help with code that was considered simple for beginners.
I'll try to add the rest (4 more) Create articles onto the wiki. Last week I was getting ready for presenting our school software project - a year worth of development getting judged by your 20 minutes presentation (well that and by an opponent). You can try implementing the game Phipps is describing there.
Anyway, as far as engine is concerned. I've came to conclusion that it is viable to have several boiler plate code functions/classes around so you don't have to write the same mundane code again and again. Though, I wouldn't call it engine. As others said, don't bother making engine. It's rather boring and an endless loop without any outcomes.
For the boiler plate code, basically all you need is:
Core functions - setting up graphics window, main loop, screen refresh
Resource manager
Utility functions - not necessarily, but it can be good to have around some advanced string functions (those STL are limited), config file routines (Allegro has them already), etc.
That means forget about implementing sound, collisions, physics etc. You can do this later when you need it. Collisions & physics depend on the concrete game you are making, so implement it just when needed. For the short outline I just gave, I think that you won't get over 500 lines of code.
]]>I would make a big distinction between physical tasks and mental tasks. Exercising doesn't require you to acquire any skills. To lift weights, you simply lift weights. To run, you run. Anybody who fails to get in shape simply didn't try hard enough. Yes, some people have to try harder than others, but anybody can get in shape in a reasonable time given the right amount of effort.
That's not what I'm saying. If you look at one of my previous posts, I referenced a link from the Mayo clinic that stated that exercise can help reduce anxiety and help you focus. Which is what he said he was afflicted by. I don't care if he's out of shape or not and I'm not going to recommend that he get into shape. That would be: "The pot calling the kettle black". I do realize that I said I was lifting some weights earlier, but that in no way means I've gotten in shape.
Acquiring a skill such as programming requires mental ability that the aforementioned tasks do not. It's easy to blame the lack of effort... to say a person isn't trying hard enough. But how hard must a person try before you are convinced he cannot do it?
Depends on if they want to do it or not. He says he wants to program a game, but a few little minor details are stopping him. I'm trying to get him get over his issues, (the ones I had earlier) and start him programming again. If a person absolutely loves a game but gets stuck at the same part over and over again, do you tell them to just quit, or do you try to help them out?
Yes, it's quite possible that somebody could suck at programming for the same reason he is fat and out of shape: lack of effort. But you cannot force somebody into learning a skill like you can force him into getting into shape.
There's that whole in/out of shape thing again.
Even if given infinite time anybody could learn anything, we don't operate under those conditions. So to me, when it comes to acquiring skills, not having the motivation to learn is the same thing as not having the potential because it is impossible to separate the two as an observer.
He says he's having motivational issues but he has the skills. I'm recommending he build up his skills to get to the point he wants to be at.
So practically speaking, if a person after two years of entry level programming classes at university is still struggling to comprehend the most basic concepts, I would feel compelled to respectfully tell him that he is wasting his time and that he should pursue other careers. I wouldn't tell him to try harder, to do this, or to do that, and then he will succeed.
I would say he's in the wrong classes then. He said he can do basics, it is the more advanced issues that he has a problem with. To be honest, I feel that college is not the greatest place in the world to learn. I'm in the computer repair field, and I've met plenty of people with degrees. I have no degrees or certificates and I blow those people out of the water. By the time you get out of college, the computer world has changed.
Maybe, in 1% of the cases, I would ultimately be proved wrong. But I would save 99% of people from wasting money and time (and feeling miserable) pursuing things that are beyond their reasonable grasp. It's hard for me to understand why somebody cannot learn how to program. I taught myself from books (pre-Internet) and was coding my own BASIC programs at the age of eight. But when I consider things I am not good at (basically everything else), it gets put into perspective. This is just something I rant about from time to time. (I would have responded more directly to your actual point, but I don't really understand what you're trying to say within the context of advising Clayton.)
I'm going to assume that Clayton is Specter. I'm just trying to help him out with some advice that helped me. Why am I trying to help him out? Three reasons:
1) He's programming a game right now. Something I love to do. It's my hobby.
2) He's got the same issues I had/have. Anxiety and lack of focus.
3) He hit a subject that's close to home with me.
Getting really anxious and depressed to the point where I don't want to program again sends a fear throughout me. It's sad when you don't want to work on your favorite hobby. I was at a point where I didn't even want to write a "Hello world!" program and Code::Blocks will do 99% of the work for you with one of those. That is sad.
]]>I suspect that all he needs is a good thorough kick right up the backside.
]]>I suspect that all he needs is a good thorough kick right up the backside.
Have a wife for that and so far it hasn't worked . It makes me depressed more when I see people who don't know me having more belief in my abilities than I do. Wife is always telling me that I could do it if I just stop being so negative.
]]>Now that the thread's been terminally derailed...
Ohhh yeah, my roommate convinced me to start taking those vitamins to help me with energy and I looked up anxiety after I was haphazardly taking them. What a nice unintended effect.
Hooray for the placebo effect!
]]>Now that the thread's been terminally derailed...
After 10 years of all the threads being derailed and you still feel it necessary to waste you time commenting on it? After 11 years of seeing it I don't worry any about derailing the thread because 23yrold3yrold and several other are notorious for derailing threads more so than me. Though as of late I think I'm catching up to them a little.
]]>After 10 years of all the threads being derailed and you still feel it necessary to waste you time commenting on it?
Just because you derail all threads you post in doesn't mean all threads get derailed.
]]>It's still vaguely on topic: we're talking about lack of motivation in a thread about abandoned projects.
]]>He says he's having motivational issues but he has the skills. I'm recommending he build up his skills to get to the point he wants to be at.
It's not like we are discussing somebody who is giving up after a few weeks or after the first hurdle. He's been at it for over ten years with almost no results. You are wasting your time if you think your encouragement will help him succeed. His lack of belief in himself comes from the reality that he doesn't have what it takes to be a competent programmer.
That doesn't mean he's stupid or that he isn't trying hard enough. It means his brain isn't "wired correctly" for programming, and he ought to pursue other tasks. If he wants to make games, then perhaps he should just focus on modding games via level editors. It's much more kind to give him realistic advice than to pat him on the back or kick him in the butt. And when he starts doing things he's good at, his self confidence and attitude will improve.
Telling somebody that they ought to be able to do something that they cannot do despite trying very hard is only going to make his or her depression and lack of confidence worse. When you come to the understanding that you have limitations (like everybody else), it's much easier to handle defeat.
And even if he could eventually do it, it's dumb to spend a thousand times more effort than a "regular person" does to accomplish the same task. e.g., If it took me two hours every morning to put on my own socks, then I would get somebody else to do it for me. That doesn't mean I'm a quitter or have no faith in my abilities, but that I'm realistic about how I should spend my time.
]]>And even if he could eventually do it, it's dumb to spend a thousand times more effort than a "regular person" does to accomplish the same task.
We're all still the same species, and so unless he's got a specific learning difficulty, I doubt it's going to be worse than 1.5 - 2 times a "regular" person's effort. Humans are very versatile creatures, both mentally and physically; we're remarkably good at compensating for weaknesses if we're willing to spend the time to learn coping strategies. This is how remedial teaching works: it's all about teaching children strategies (or "work-arounds") for their weaknesses.
If you're missing all the fingers on your right hand being a pianist is probably not a realistic career choice, but still possible if you're persistent enough.
For this reason I'm more inclined to agree with Emanresu: even if he isn't optimally "wired" for programming, if he were to believe that he could do it and put the effort in, he would probably be able to achieve just fine.
...also, if we're all patronising enough he might get is arse into gear and write a game out of pure embarrassment.
]]>Hooray for the placebo effect!
Speaking of thread derailings...
I always laugh a little when I come across that word (placebo). It sounds like some sort of Japanese demon; perhaps the small, perverted sort that flies around sneaking peeks up girls' skirts.
]]>
If it took me two hours every morning to put on my own socks, then I would get somebody else to do it for me. That doesn't mean I'm a quitter or have no faith in my abilities, but that I'm realistic about how I should spend my time.
This has so much to do with Adam Smiths invisible hand it's incredible.
We're all still the same species, and so unless he's got a specific learning difficulty, I doubt it's going to be worse than 1.5 - 2 times a "regular" person's effort.
It's widely known that the programming field is unique in that ability can be a thousandfold different between individuals.
http://catb.org/jargon/html/S/superprogrammer.html
I'd say I can program well enough that I'm not "wasting my time" but I'd say Matt could usually code a certain algorithm ten to fifteen times faster than me based on his answers to programming questions here.
]]>Just because you derail all threads you post in doesn't mean all threads get derailed.
Yeah the only threads that get derailed are the ones that provoke enough thought to cause people to talk and bring in other tangents that coincide with the main original topics. The ones that stay on topic are boring and cause no real conversation potential.
]]>With the engine I say, okay I need to have the core, graphics, sound, input, and physics and collision detection.
What would you want to do with graphics and sound? Input (when building a generalized system) and physics/collision detection are pretty extensive projects, that could be objectives on their own. I get the impression most games here are written for one purpose only (i.e. use no general framework); if code is reused it is hacked away from a previous project, and hacked into the current project. (Or they use a 'framework', which is discarded for the next project.) It's not a crime to write one use code, unless you are a professional
As someone who is struggling himself with getting a decent game done, I can say: it's better to have shit that works, than to have perfection that doesn't exist.
Physical fitness... yeah, that helps too. I've been out of shape for the last year. Better work out a little I believe the novelist Murakami also worked on his fitness to become a better writer. (And he's pretty good )
Two rules which help me with coding:
Even when properly thinking out a framework, there will be some use cases for which it is unfit. You first write a program that does what you want. Then you generalize and/or make classes to do a lot of work for you. If it yields a reusable framework: excellent. If it doesn't: your code will at least be cleaner.
When doing the functional part[1], you would have to see a difference the next time you compile it. Working several days on one function is OK, putting in a function you won't be using in your program for some time is not OK. This also ensures you write and rewrite the functionality in one go; you don't have to study a problem you studied a year ago, because that was when you wrote that broken function. Of course there can still be flaws in a function you wrote a year ago... Thinking of edge cases or feeding random/interesting arguments to your function can help you find errors ASAP. (There might be cases where you want your function to fail gracefully.)
Yeah the only threads that get derailed are the ones that provoke enough thought to cause people to talk and bring in other tangents that coincide with the main original topics. The ones that stay on topic are boring and cause no real conversation potential.
Yeah, arguing is humanity's greatest merit.
Two rules which help me with coding:
Three...maybe have a shot of liquor to mellow me out.
]]>It's not a crime to write one use code, unless you are a professional
Whether anyone pays you to do it is absolutely irrelevant. Bad code is bad code, and good code is good code.
The thing is, though, that "code reuse" is a misunderstood concept. "Write reusable code", also known by the names "DRY Principle (Don't Repeat Yourself)", "Single Source of Truth", "Refactor Early, Refactor Often", "Simple Is Better Than Complex", "KISS (Keep It Simple, Stupid!)", etc., means that within one project, you should strive to eliminate redundancy. If you have a function that calculates the average of a bunch of values, it better be the only function in the project that does so. It does not mean that you should write a library with a function that solves all facets of number-averaging that you will ever encounter in any project.
Because what it comes down to is that writing reusable code (and taking advantage of it) within the scope of one project is relatively easy and yields impressive results in the long run, in terms of maintainability and extensibility, but writing a library (which has much larger potential scope, needs more testing, needs to take all possible future usages into account) is harder by a few orders of magnitude but doesn't yield much additional benefit.
Personally, I avoid redundant code like the plague, partly because I'm too lazy to solve the same problem twice, and partly because I've seen to many projects that almost collapsed under the sheer amount of code they contained (and any change would potentially break things elsewhere, where other code relied on two implementations of the same thing being roughly equivalent). I only turn something into a library when it turns out that I am really going to reuse it more than two or three times, which has happened maybe once or twice in my entire programming life.
]]>Bad code is bad code, and good code is good code.
Sad part is that when you see code from professionals you realize that a lot of pros use a lot of bad code.
]]>Sad part is that when you see code from professionals you realize that a lot of pros use a lot of bad code.
I was amused by this, especially since my current work project includes a client-server setup with client-side caching, SQL, and other stuff I'm pretty dumb about but still do better than this.
]]>Forgot about catching up with tdwtf for a while:
private static bool InvertBool(bool org) { bool returnValue = false; if (org) { returnValue = false; } if (!org) { returnValue = true; } return returnValue; }
Oh my.
]]>That's obviously much clearer than
return !org;
Forgot about catching up with tdwtf for a while:
Lots of programmers don't understand booleans, return values, function parameters, etc. I saw lots of things like this as a GA:
bool rv; int i; i = 42; rv = some_function(i); return rv;
The reason is they would always think that when you call a function that takes a parameter named i, that you would also have to send it a parameter named i. And directly returning the value of one function call just blew their minds.
]]>However, one should also be aware that there are occasions where cleverly reducing an expression to its simplest form may detract from readability. This is particularly true when implementing pieces of business logic.
]]>However, you should also be aware that there are occasions where cleverly reducing an expression to its simplest form may detract from readability
I usually create my classes one function at a time.
]]>Really the code always looked like:
bool rv; // bool variable named rv int i; // int variable named i i = 42; // set i to 42 rv = some_function(i); // set rv to some_function(i) value return rv; // return rv
But yes, overly brief code can be hard to read as well.
]]>Seeing a ! should be as natural as seeing + in code. It's not about overly brief, it's about NOT replacing an already implemented operator with no good reason. I understand ignorance on some functions of the standard(for example, I really didn't know there was sscanf for reading values from strings nearly a year ago), but the author of the snippet clearly knew the operator existed... he even used it in the definition.
]]>I usually create my classes one function at a time.
What has that got to do with anything?
Seeing a ! should be as natural as seeing + in code.
Of course.
Let me just be clear that I was most certainly not implying that Matthew's example is one where verbosity aids readability.
]]>It's not about overly brief, it's about NOT replacing an already implemented operator with no good reason.
James is probably referring more to things like:
return (b = func1(a + func2(func3() * magic_number) / func4())) ? b : func5(b);
That ends up looking like this.
]]>Yeah.
However, there are less clear-cut cases.
For example, suppose the CEO comes along and says: "Write me a little program which books me a taxi if it is not a Monday (because I cycle in on Mondays), and if the trains are not running."
bookATaxi = !isMondayToday && !trainsAreRunning;
You could then simplify it to this:
bookATaxi = !(isMonday || trainsAreRunning);
..now suppose you come back to the code a month later, because you want to remember what it was exactly that the CEO asked you to implement. The second is decidedly more difficult to reason about (maybe not to you, but it certainly would be if you worded it back to the CEO).
This is not a particularly good example, but I'm sure you can think of more extreme cases. In fact I'm guilty of simplifying a few chunks of boolean logic to half their original size at the cost of making it nearly impossible to understand what it actually means afterwards.
Don't get me wrong: simplifying boolean logic can be extremely powerful and in most cases will actually give a better insight into what the original statement really means. I'm just saying that there are some cases where a bit of verbosity is better.
]]>Being clever, in the real world, is only great when you want to flex your programming fu and don't have to worry about ever revisiting the code.
My boss runs in circles all day because be produces undocumented, intricately designed code that is never meant to be changed or looked at. I produce well-documented code that is designed with practicality in mind. When the inevitable change requests start rolling in, I finish my mods before anyone else.
Work smarter, not harder. Everything in moderation. Etc.
It's perfectly fine to make mistakes, as long as you learn from them. Doing the same retarded thing over and over is the mark of a PHB.
]]>This is half the reason why functional languages don't really cut it in industry: elegance and cleverness for the sake of elegance and cleverness is all very well in academia, but in the real world all it really achieves is unnecessary bewilderment.
]]>What has that got to do with anything?
It makes things easier to read. I have one class for printing, one for calculating the same thing 50 million times, and one for stupid shit that gets repeated over and over again.
I guess you've never broken down your code to make it easier to read.
]]>It makes things easier to read.
As does a pair of glasses. We were talking about statements and expressions. Classes have no bearing on the conversation, and we could quite feasibly be discussing a language that doesn't even support classes.
You do this all the time, and if you want me to stop picking you up on it, then start thinking before you post. If a random vaguely related thought flashes before your mind that you feel the need to blurt out it onto the forum, please qualify it as such.
]]>Sad part is that when you see code from professionals you realize that a lot of pros use a lot of bad code.
Two reasons:
Just because you get paid to do something doesn't mean you're good at it; some shops hire based on actual skills, but there are plenty of places where you can get pretty far with a combination of a college degree, meaningless fact memorization, and personal marketing skills.
As a professional, there are always real-world constraints on your programming: you are on a budget (which means you can't sink infinite amounts of time into a task), you are on a deadline, there's an existing codebase you have to work with, the specifications are unclear, contradictory, or outright impossible, there's other team members with incompatible ideas, etc. etc. Sometimes, the proper solution would require a month of feature-freeze, and the customer cannot afford that, so you start out with a hack and try to gradually phase toward the proper solution. Sometimes, you are looking at a ten-thousand-LOC file full of puss, and you have to implement a small change; you can't rewrite all the puss in the time you have, so you read enough of the mess to make sense of it, clean up what you reasonably can, and do what it takes. Since you have to at least partially go with what's there, the code you add isn't going to be pretty, but it will work, and it will be a bit better than what was there.
This is half the reason why functional languages don't really cut it in industry: elegance and cleverness for the sake of elegance and cleverness is all very well in academia, but in the real world all it really achieves is unnecessary bewilderment.
Functional Programming is more than cleverness and elegance for its own sake; there are actual practical benefits, such as simplified static analysis and formal proof-of-correctness, simplified unit testing, easier parallelization and distribution of execution, etc. etc; however, OOP and enterprise programming get along very well, and it's hard for any other paradigm to break into this marriage. The reasons are many, but I guess the most important ones would be
Similar structures. OOP with its class hierarchies and locally-imperative approach is very similar to how a typical business is structured, and the way functionality is encapsulated and bundled through several layers looks a lot like the way management layers distribute and delegate tasks. Because of these similarities, OOP programmers and designers have an easier time communicating with non-technical managers; given an intelligent non-technical management type, I could easily explain an OOP design in terms they can understand, but I'd have a much harder time doing it with an FP design - simply because there isn't anything in the organisation of a business that resembles partial function application, closures, monads, or any other core FP concept.
Tradition. The business world has used imperative and structured programming since the early days of COBOL, and OOP, which inherits most of this heritage, is a logical extension - after all, a class is just a subprogram with its own local state, and a method is just a procedure with a scope.
Available programmer material. The way things are at the moment, OOP programmers are plenty, but FP programmers are scarce. Finding a few dozen code monkeys to hack on your Java codebase is easy (though you get what you pay for), doing the same for a Clojure application is much harder. Try outsourcing a PHP project, then try outsourcing a comparable project written in CL. Try C# vs. F#. Of course, if it's excellence you're looking for, then the paradigms are probably almost on par, and programmers in that category will be more likely to be comfortable with either, and most of them will have developed a hybrid style that takes advantage of many different paradigms.
Tools. Let's face it: OOP has the better tools. When I do OOP, say, in C++ or PHP, I miss an interactive environment like Common Lisp's REPL, Haskell's ghci, or Python's interactive interpreter, but other than that, there are more and better tools to choose from, and almost any tool you could use for a functional language is also available for OOP, either because it's language-agnostic, or because someone has written an equivalent. Of course, the fact that functional languages tend to come with less boilerplate and better language features to reduce cruft somewhat alleviates this (a lot if you ask me), but it remains that the comfort of a modern IDE is at least significantly reduces for FP languages.
Trust. The above points combined also lead to a higher level of trust among business users for OOP. Given the choice, they rather trust a programming paradigm that has shiny tools, is used throughout the industry, and can be explained in layman's terms without leading to utter confusion, than one that seems to require a PhD to fully understand, has only text-based tools that look like random gibberish, is used mainly in academia (thus, by PhD's), and even confuses experienced programmers. And I can't really blame anyone, even though FP may actually often be the better solution, bottom line.
As does a pair of glasses. We were talking about statements and expressions. Classes have no bearing on the conversation, and we could quite feasibly be discussing a language that doesn't even support classes.You do this all the time, and if you want me to stop picking you up on it, then start thinking before you post. If a random vaguely related thought flashes before your mind that you feel the need to blurt out it onto the forum, please qualify it as such.
James you trolled my thread the last time. Remember your question, re-read the thread!
What specifically are you trying to hash that you have having trouble with?
I mentioned it in the first post!
]]>Currently working on a pure terminal address book app. Right now I have a few things missing that I hadn't figured into the original paper design (yes I actually set down and laid it out on paper to an extent, which I never do). I normally just tell myself, "I want to make <app/game>.", open IDE and terminal and start writing code without thinking it out. This time that isn't the case. It's an abandon project I decided to pick up from scratch and try actually thinking it out before I started coding.
Parts of the code is test code til I get everything addressed (no pun intended). Been bouncing back and forth between the book files, menu files, and main file.
Do to size I put the code in a spoiler to not fill so much of the screen.
addrBook.h
addrBook.cpp
addrMenus.h
#ifndef ADDRMENUS_H #define ADDRMENUS_H #include "addrBook.h" void menuSystem(addrBook& Book); void addMenu(addrBook& Book); void editMenu(addrBook& Book); void deleteMenu(addrBook& Book); void viewMenu(const addrBook& Book); #endif
addrMenus.cpp
addrMain.cpp
]]>
Just a tip:
Setters in general should take a const reference:
ex:
void setName(const std::string& first,const std::string& last); void setAddr(const std::string& addy); void setPhone(const std::string& phone);
This is because you do not want to allocate a new string on the heap and you wont modify the data being passed (const).
]]>Ok, thanks for that. My CS book I'm using as reference doesn't say anything about that, just to use reference on get functions with multiple parameters or return values needed.
]]>It's not like we are discussing somebody who is giving up after a few weeks or after the first hurdle. He's been at it for over ten years with almost no results. You are wasting your time if you think your encouragement will help him succeed. His lack of belief in himself comes from the reality that he doesn't have what it takes to be a competent programmer.That doesn't mean he's stupid or that he isn't trying hard enough. It means his brain isn't "wired correctly" for programming, and he ought to pursue other tasks. If he wants to make games, then perhaps he should just focus on modding games via level editors. It's much more kind to give him realistic advice than to pat him on the back or kick him in the butt. And when he starts doing things he's good at, his self confidence and attitude will improve.Telling somebody that they ought to be able to do something that they cannot do despite trying very hard is only going to make his or her depression and lack of confidence worse. When you come to the understanding that you have limitations (like everybody else), it's much easier to handle defeat.And even if he could eventually do it, it's dumb to spend a thousand times more effort than a "regular person" does to accomplish the same task. e.g., If it took me two hours every morning to put on my own socks, then I would get somebody else to do it for me. That doesn't mean I'm a quitter or have no faith in my abilities, but that I'm realistic about how I should spend my time.
Like I said earlier, I don't really know him, (or anyone here on Allegro.cc for that matter), all that well. I don't know how long he's been working on anything at all. Since it's taken him 10 years to do nothing, perhaps it is time for him to try another approach. Kinder to give him realistic advice? Shall we call Dr. Kevorkian then?
...also, if we're all patronising enough he might get is arse into gear and write a game out of pure embarrassment.
I always laugh a little when I come across that word (placebo). It sounds like some sort of Japanese demon; perhaps the small, perverted sort that flies around sneaking peeks up girls' skirts.
-->
Red hot tentacle love.
Need I say more?
As someone who is struggling himself with getting a decent game done, I can say: it's better to have that works, than to have perfection that doesn't exist.
Agreed.
Currently working on a pure terminal address book app. Right now I have a few things missing that I hadn't figured into the original paper design (yes I actually set down and laid it out on paper to an extent, which I never do). I normally just tell myself, "I want to make <app/game>.", open IDE and terminal and start writing code without thinking it out. This time that isn't the case. It's an abandon project I decided to pick up from scratch and try actually thinking it out before I started coding.
That's how I am. I can't stand pseudo coding or flow charting. I'm glad you're going for a console only application right now. I was thinking about what you've been saying and I feel that you were trying to eat some beef one cow at a time. Have a few steaks or burgers at first, then work your way up.
What I was going to recommend to you was that you avoid physics all together and use logic to move the ball around. And also avoid using sound, mouse input, graphics and keyboard input all together at first. Make a console pong clone to get your logic working properly. Fact is, don't even make it 2d at first, make the ball stay all on one line. Get that working well before you take on larger tasks. You said logic was one of your biggest problems after all.
I also recommend that you don't post your code that has your logic in it if you can avoid it. Sure, post it when you can't find out why it won't compile or you get massive errors that shouldn't occur, but try to avoid posting your logic. Why do I say that? Because people may just give you the answer to your problem instead of helping you learn what you're doing wrong.
]]>