Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Abandoned Projects

This thread is locked; no one can reply to it. rss feed Print
Abandoned Projects
Dario ff
Member #10,065
August 2008
avatar

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? :o

TranslatorHack 2010, a human translation chain in a.cc.
My games: [GiftCraft] - [Blocky Rhythm[SH2011]] - [Elven Revolution] - [Dune Smasher!]

Specter Phoenix
Member #1,425
July 2001
avatar

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.

Quote:

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.

jmasterx
Member #11,410
October 2009

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!

Paul whoknows
Member #5,081
September 2004
avatar

I just had sex! :-*

video

Too much information? who cares! ;)

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

jmasterx
Member #11,410
October 2009

Quote:

I just had sex! :-*

Congratulations :)

james_lohr
Member #1,947
February 2002

jmasterx said:

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.

Paul whoknows
Member #5,081
September 2004
avatar

James Lohr, did you have sex?

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

Dario ff
Member #10,065
August 2008
avatar

James Lohr, did you have sex?

That's handled by the world, not by himself. :P

TranslatorHack 2010, a human translation chain in a.cc.
My games: [GiftCraft] - [Blocky Rhythm[SH2011]] - [Elven Revolution] - [Dune Smasher!]

james_lohr
Member #1,947
February 2002

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.

Mark Oates
Member #1,146
March 2001
avatar

program to an interface, not an implementation

What do you mean by that?

Quote:

favour composition over inheritance

How is that different from inheritance as a method of composition? Or does composition refer to explicit, non-inherited declaration?

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Matthew Leverton
Supreme Loser
January 1999
avatar

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:

#SelectExpand
1class MyCollection implements IteratorAggregate 2{ 3 private $data = array('foo', 'bar'); 4 5 public function getIterator() 6 { 7 return new ArrayIterator($this->data); 8 } 9} 10 11function walker(Iterator $items) 12{ 13 foreach ($items as $item) 14 echo $item, "\n"; 15} 16 17walker(new MyCollection());

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.

Specter Phoenix
Member #1,425
July 2001
avatar

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 :P. 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.

Mark Oates
Member #1,146
March 2001
avatar

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?

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

jmasterx
Member #11,410
October 2009

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.

SiegeLord
Member #7,827
October 2006
avatar

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.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Emanresu
Member #12,510
January 2011

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. ;D 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. ::)

Dario ff said:

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).

"* Entoutcas has quit IRC (Quit: And the Lord said unto John; Come forth and receive eternal life. But John came fifth and won a toaster...)"
"I was in a casino, minding my own business, and this guy came up to me and said, 'You're gonna have to move. You're blocking a fire exit.' As though if there was a fire, I wasn't gonna run. If you're flammable and have legs, you are never blocking a fire exit... ...Unless you're a table."
-Mitch Hedberg (R.I.P.)
"Quit: (+[WG]sPiKie) (Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x].)"

Dario ff
Member #10,065
August 2008
avatar

Emanresu said:

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. :P

video

TranslatorHack 2010, a human translation chain in a.cc.
My games: [GiftCraft] - [Blocky Rhythm[SH2011]] - [Elven Revolution] - [Dune Smasher!]

Specter Phoenix
Member #1,425
July 2001
avatar

Dario ff said:

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 :(.

Emanresu said:

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.

Emanresu
Member #12,510
January 2011

That was the first game you posted.

Dario ff said:

I have a more bloated version of Pong.

Game inside game. :o

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.

Specter Phoenix said:

Perhaps. I've been diagnosed as having a lot of things lately and I'm sure they are probably right or close to accurate.

http://www.mayoclinic.com/health/depression-and-exercise/MH00043 said:

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.

"* Entoutcas has quit IRC (Quit: And the Lord said unto John; Come forth and receive eternal life. But John came fifth and won a toaster...)"
"I was in a casino, minding my own business, and this guy came up to me and said, 'You're gonna have to move. You're blocking a fire exit.' As though if there was a fire, I wasn't gonna run. If you're flammable and have legs, you are never blocking a fire exit... ...Unless you're a table."
-Mitch Hedberg (R.I.P.)
"Quit: (+[WG]sPiKie) (Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x].)"

Dario ff
Member #10,065
August 2008
avatar

Emanresu said:

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. :P 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. :P

Quote:

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). :)

TranslatorHack 2010, a human translation chain in a.cc.
My games: [GiftCraft] - [Blocky Rhythm[SH2011]] - [Elven Revolution] - [Dune Smasher!]

Specter Phoenix
Member #1,425
July 2001
avatar

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. :)

Arvidsson
Member #4,603
May 2004
avatar

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.

Specter Phoenix
Member #1,425
July 2001
avatar

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.

23yrold3yrold
Member #1,134
March 2001
avatar

Don't make engine, make game.

This.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Emanresu
Member #12,510
January 2011

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!!!!

"* Entoutcas has quit IRC (Quit: And the Lord said unto John; Come forth and receive eternal life. But John came fifth and won a toaster...)"
"I was in a casino, minding my own business, and this guy came up to me and said, 'You're gonna have to move. You're blocking a fire exit.' As though if there was a fire, I wasn't gonna run. If you're flammable and have legs, you are never blocking a fire exit... ...Unless you're a table."
-Mitch Hedberg (R.I.P.)
"Quit: (+[WG]sPiKie) (Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x].)"



Go to: