GDR Forum Index
Podcast Podcast
Dev Dev Logs
Search Search
RSS RSS
Register Register
Log in Log in
Reply to topic GDR Forum Index -> Game Developer's Refuge -> Development Log - Rico Page Previous  1, 2, 3, 4, 5, 6  Next
View previous topic :: View next topic  
Author Message
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10782
Location: Canadia
PostPosted: Thu Sep 27, 2012 6:55 pm    Post subject: Reply with quote

Yeah, on impact it says "You Win". ;)
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Fri Sep 28, 2012 5:45 am    Post subject: Reply with quote

Haha, not a bad idea at all! :-D

What about this: if the player shakes the device, the game is paused and the screen says something along the lines of "you mad, bro?" and also takes a photo of you (granted the device has a front-facing camera). Could be uploaded somewhere to create a gallery of rage induced faces! :-D

I've been working on getting the parallax scrolling clouds to work properly. It involved some equation solving and some headscratching on my part:

I tend to do these things on paper because my handwriting is so pretty... ;-)

This is the result:
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Fri Sep 28, 2012 1:40 pm    Post subject: Reply with quote

Been working on the new tileset which is supposed to be some kind of sand-ish desert environment. Here's what I have so far:

_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9412
Location: Not Finland
PostPosted: Sat Sep 29, 2012 8:57 am    Post subject: Reply with quote

That does have a rather dry look to it, with the wispy clouds in the background, and whatnot. I like where that's going.
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Sun Sep 30, 2012 9:25 am    Post subject: Reply with quote

Dabbling with the new sandy world! Apart from the new tileset, the game mechanics (need to) change because the player has gotten a new weapon from beating the boss in world 3: the pistol. I need to design the new levels a lot different now, as the player shouldn't be able to take out all the enemies from afar. Some types of enemies probably won't work at all anymore, or only in specific situations...

The first new enemy you encounter in world 4 is a big bad-ass sandworm:

It's not finished yet as I want to experiment a bit more with the worm's movement patterns, but it's a refreshing change to the existing enemies, methinks. :)

Quote:
That does have a rather dry look to it, with the wispy clouds in the background, and whatnot. I like where that's going.

Heh, these coulds are there in every single level, not matter if it's icy, grassy or sandy... They're omnipresent! ;-)
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9412
Location: Not Finland
PostPosted: Sun Sep 30, 2012 9:40 am    Post subject: Reply with quote

Ah yes, very nice addition!

And you get a ranged weapon at some point ?!?! Man, I haven't even finished world 2. I think I"m on 2.4.

I'm contemplating creating a simple skeletal animation system for the bosses in my current project, ala the bigger bosses in Symphony of the Night. I think that would be a nice experiment.
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Sun Sep 30, 2012 1:31 pm    Post subject: Reply with quote

I just found this:
Code:

if (Math.abs(diff) < .1f); {
    state = State.Charging;
}

After 10-15 minutes of searching... yes, there's a semicolon after the if. RAAAAAHHHHHH!!
View user's profile Send private message Visit poster's website
sonrisu
Moderator

Joined: 31 Aug 2005
Posts: 4977
Location: Silicon Valley!
PostPosted: Sun Sep 30, 2012 3:09 pm    Post subject: Reply with quote

:[ Those are the worst. In that bunch are the single-line if/else clauses that should be multi-line, but don't have curly braces. Terrible.

Even harder to notice just by looking is something like this:

Code:

if (something)
    MACRO(blabla); // Oh, wait, it's a multi-line macro! ARGHH
else {
    otherImportantThing();
    ...
}

_________________
loomsoft :]
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9412
Location: Not Finland
PostPosted: Sun Sep 30, 2012 3:30 pm    Post subject: Reply with quote

I'm psycho-anal about brackets and braces. I guess some neuroses are useful!

Regarding the latter example, I almost never use macros so I haven't run into that one yet. I appreciate the warning!
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
sonrisu
Moderator

Joined: 31 Aug 2005
Posts: 4977
Location: Silicon Valley!
PostPosted: Sun Sep 30, 2012 7:26 pm    Post subject: Reply with quote

Note that in that above example, the multi-line macro needs to contain an 'if' in the appropriate place in order to prevent the compiler from complaining about a dangling 'else'. Rare case, I know, but I recently ran into it (not my own code) ;]
_________________
loomsoft :]
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10782
Location: Canadia
PostPosted: Mon Oct 01, 2012 6:19 am    Post subject: Reply with quote

Sirocco wrote:
I'm psycho-anal about brackets and braces. I guess some neuroses are useful!

^ this.

sonrisu wrote:
Note that in that above example, the multi-line macro needs to contain an 'if' in the appropriate place in order to prevent the compiler from complaining about a dangling 'else'. Rare case, I know, but I recently ran into it (not my own code) ;]

Solution:
Code:
#define MyMacro( m ) \
{ \
if (something) DoSomething(); \
}

Always wrap macro functions with {}'s. If you can't, seriously consider whether what you need is actually a regular function with a return. Even min/max functions work fine as functions. Macros should really only be used for things that are not possible with the C or C++ language otherwise.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
mikedoty
Developer

Joined: 18 Mar 2006
Posts: 1788

PostPosted: Mon Oct 01, 2012 7:26 am    Post subject: Reply with quote

I've never used macros in C/++ but they sound like demon spawn.
_________________
The end of the game, yes, is pretty much getting the weapon and killing off the population.
mashup games . com | Finally! - A Lode Runner Story
View user's profile Send private message Visit poster's website AIM Address
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Mon Oct 01, 2012 7:58 am    Post subject: Reply with quote

Their ease of abuse/misuse is the main reason they only exist in dinosaur-languages like C/C++. Those reptils just can't get rid of it!
And there's not much (if anything) that cannot be expressed with the same elegance in newer languages.
_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10782
Location: Canadia
PostPosted: Mon Oct 01, 2012 8:12 am    Post subject: Reply with quote

They're incredibly useful, but the problem is when people use them like functions. Back in the old days, C compilers were poor optimizers. But as soon as the "inline" keyword came along, you pretty much didn't need to use Macros for optimization anymore. The problem is much old literature is still around, people mistake them for being still relevant.

Generally speaking, Macros are textual replacement. For every instance of this name, replace it with the following. You can even use them for creating a new programming language inside C.

Code:
#define Begin {
#define End }
#define Procedure( n ) void n()
#define writeln printf

Procedure( Hello )
Begin
    writeln("Hello World");
End

Procedure( main )
Begin
    Hello();
End

There, we've created our own Pascal like language using C Macros.

Pretty much though, you should only be using them for exotic uses. For example, defining an entire function based on the arguments.

Code:
#define CREATE_OPERATOR( _symbol, _type1, _type2 ) \
bool operator _symbol( _type1 a, _type2 b ) { \
    return a _symbol b; \
}

CREATE_OPERATOR( >, int, int );
CREATE_OPERATOR( <, int, int );
CREATE_OPERATOR( =, int, int );
CREATE_OPERATOR( !=, int, int );

#undef CREATE_OPERATOR

_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar


Edited by PoV on Mon Oct 01, 2012 8:23 am; edited 2 times
View user's profile Send private message
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Mon Oct 01, 2012 8:22 am    Post subject: Reply with quote

Quote:
They're incredibly useful

...and then you give the example of recreating a language inside another? Pretty obscure and not at all useful, I'd say...

Or did you mean to say they were incredibly useful? Because that I would agree with... :)
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10782
Location: Canadia
PostPosted: Mon Oct 01, 2012 8:24 am    Post subject: Reply with quote

I was editing and added a practical use while nobody was looking (see above). ;)

Definitely still useful, especially in defining large classes. You can generate functions, types, combinations of functions and types (using the # and ## macro operators).
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar


Edited by PoV on Mon Oct 01, 2012 8:27 am; edited 1 time
View user's profile Send private message
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9412
Location: Not Finland
PostPosted: Mon Oct 01, 2012 8:27 am    Post subject: Reply with quote

Flexible, at the very least. But much like C, power requires responsibility, or at least a healthy level of paranoia!
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
Gil
Developer

Joined: 14 Nov 2005
Posts: 2341
Location: Belgium
PostPosted: Tue Oct 02, 2012 3:48 am    Post subject: Reply with quote

I've been toying with an idea in my head where basically the entire language side of things exists as a preprocessor macro, boiling things down to simple constructs. As such, you'd be able to create your own language macro, turning the whole language into one big DSL toolkit (kinda like what PoV demonstrated with his Pascal example).

The trick would be that the language (macro) definition files would be checked for validity and would give errors on illegal operations (for example, not including a trailing "}" somewhere). You can't do the hacks with it, but you'd be able to do design your own language with it, or create an inline language (Monad DSL anyone?).

I've even got a colleague in mind to attempt the project with (language design has been a hobby the last two years), but as said before, time :)

I'd the say the main problem with C macros is they are TOO powerful, because they are just text replacements, not checked for syntactic hacks.
_________________
PoV: I had to wear pants today. Fo shame!
View user's profile Send private message Visit poster's website
Ninkazu
Contributor

Joined: 21 Sep 2005
Posts: 482
Location: Austin, TX
PostPosted: Tue Oct 02, 2012 4:23 am    Post subject: Reply with quote

It just so happens that macros were an area that I studied during my PhD. There is a world much much nicer than C preprocessor macros: Scheme macros. In particular, Racket macros. It's not textual replacement, but an expansion process that ensures temporary names are fresh, and names used in the definition of a macro are not shadowed. The transformations a macro makes to its input can themselves be written in the same language, just without that macro - this creates a phasing process to compilation.

Macros in Racket are so powerful that it now has the most expressive pattern matching language form of any language. It has an entire statically typed sub-language (with optimizations). It has a language for documentation with cross-referencing and example generation, slide presentations, parser generators, logic programming, object-oriented programming, and of course writing macros themselves (see the paper "Fortifying Macros").

The C preprocessor has no understanding of the language it is writing macros for - some see this as a quick and easy way to add macros to burgeoning languages, but really it makes the entire facility brittle and unusable for large-scale language extensions. Hell, they can make the resulting text not even parse because it's all token-based and not structure-based. This causes a real problem in code like the Linux kernel, where there are so many #ifdef's that there is a combinatorial explosion in the number of programs actually expressed in the presence of compile-time flags. There has been recent research on determining if all combinations actually parse. So much effort wasted because of a broken mechanism.
_________________
Get woke. Stay woke. ~@deray
View user's profile Send private message Send e-mail Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Tue Oct 02, 2012 6:31 am    Post subject: Reply with quote

Hmm...

It seems like Desura doesn't support runnable jar files in their packages. That means I have to create a separate executable for each platform (.exe for Windows, .app for Mac, I-have-no-idea-binary for Linux). That just takes away the whole Java "run anywhere" mantra. It's not completely game-changing, but I have no clue (yet) how to create the executables from the runnable jar I have.
_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10782
Location: Canadia
PostPosted: Tue Oct 02, 2012 6:46 am    Post subject: Reply with quote

Yeah, I would never do the Pascal thing in practice, but I have built sets of macros for defining data. Sort of like a simple assembly language without looping constructs.

Code:
// 4 shorts's per opcode - If you need more, use a whole 2nd opcode //
#define OP_GEN( e, x, y ) 1, e, x, y
#define OP_STEP( x, y )   2, 0, x, y

#define E_BIRD 1
#define E_SNAKE 2
#define E_BUFFALO 3

const short EnemyPlacementData[] = {
    OP_GEN( E_BIRD, 100, 0 ),
    OP_GEN( E_BIRD, 200, 0 ),
    OP_STEP( 0, 50 ),
    OP_GEN( E_SNAKE, 150, 0)
};

Again, I'd say the main practical use for Macros today is generating code. Sometimes it just makes sense to create a throwaway dialect like this for clarity and because you'll never need to use it again.

Practical is about saving time and effort, because at the end of the day, the player does not care about how beautiful the code is.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10782
Location: Canadia
PostPosted: Tue Oct 02, 2012 6:56 am    Post subject: Reply with quote

IMakeGames wrote:
It seems like Desura doesn't support runnable jar files in their packages. That means I have to create a separate executable for each platform (.exe for Windows, .app for Mac, I-have-no-idea-binary for Linux).

Yeah, regrettably Java is really only a "write once, run anywhere" language in the console/command prompt. Hardly as exciting as the sales pitch made it. Applet's give it one advantage over languages like C++, but that will finally be changing any day now (Flascc is RC1 is out in private beta).
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Tue Oct 09, 2012 3:42 am    Post subject: Reply with quote

It took quite some time, but the beta is out and live on Desura:
http://www.desura.com/games/publish/rico-a-tale-of-two-brothers
It includes the first 8 levels, so if you haven't played it yet, give it a try! :)

I already found some small bugs that crept in along the way, but oh well...
_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Tue Oct 09, 2012 9:16 am    Post subject: Reply with quote

I just finished my new (or should I say first?) trailer:

And I made it with Windows Live Movie Maker!!! o_O

I couldn't achieve a decent framerate when recording on my Mac no matter what I tried. So I switched to Windows + Fraps and it worked just dandy!
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Wed Oct 10, 2012 3:45 am    Post subject: Reply with quote

I finally got around to creating a small website:
http://www.imake-games.com/
It's nothing fancy, but it does the job...

pfew... so much stuff to do that's NOT making games! -_-
_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
Reply to topic GDR Forum Index -> Game Developer's Refuge -> Development Log - Rico Page Previous  1, 2, 3, 4, 5, 6  Next

Use this link to get a Sign-On Bonus when you get started!

All trademarks and copyrights on this page are owned by their respective owners. All comments owned by their respective posters.
phpBB code © 2001, 2005 phpBB Group. Other message board code © Kevin Reems.