Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Josh @ Dreamland

1591
Proposals / Re: Re: Preprocessor Directives (The compile-time "if")
« on: November 09, 2010, 06:43:37 PM »
Since ENIGMA is responsible for understanding those macros to correctly parse its engine file, I would have to go out of my way to stop users from accessing macros like TARGET_IPHONE_SIMULATOR from your example. I of course have no intention of doing so.

So yes.

1592
Graphics and Video / Re: ENIGMA examples - Games
« on: November 09, 2010, 01:35:43 PM »
I'd say use anything you like from Space Invaders. Maybe not the exact 8x8 two-color bitmaps, but the shapes and behaviors, sure.

1593
Graphics and Video / Re: ENIGMA examples - Games
« on: November 09, 2010, 10:38:56 AM »
It's been 30 years, HaRRi. I'm pretty sure Space Invaders is fair game, too. But do what you like.

1594
Proposals / Re: Re: Preprocessor Directives (The compile-time "if")
« on: November 08, 2010, 05:13:05 PM »
Well, yes, but I'd much prefer directives to be inside something other than ^#(.*)$. The [[ and ]] seem to make for prettier code. (Besides, I'm pretty much doing away with #include: I may steal require from other languages.)

1595
General ENIGMA / Re: Linux Repositories
« on: November 08, 2010, 07:49:40 AM »
Actually, he was right; I didn't notice it. And I just kind of want to hear it works so I can upload it. :P
But I am pinning it.

1596
Graphics and Video / Re: ENIGMA examples - Games
« on: November 08, 2010, 07:34:24 AM »
I'm in no way opposed to having code-only examples. That -is- ENIGMA's strongest suit.

1597
Proposals / Re: Thoughts on forum registration...
« on: November 07, 2010, 07:47:50 AM »
That's SMF's default behavior. But for now, I'm enjoying the fact that we have three new members and zero new spam bots over the course of what, a week? That's three more members and four less spam bots than we usually get. I'm not sure what the correlation between a strong captcha and an increase in members is (perhaps they were lurkers who saw this post and wanted to see what the challenge was?) But I'm at this time quite enjoying the current set.

1598
Proposals / Re: Preprocessor Directives (The compile-time "if")
« on: November 06, 2010, 06:36:47 PM »
I see what you mean, Rusky. For a little bit I was thinking about doing something like that (C takes a lot of heat over the issues rising from copy-pasted macros, of course), but I don't think I should. The only reason I'm keeping any sort of macros is because of ENIGMA's C heritage. If it wasn't for that, they'd be expression based if they were in at all, but my reason for wanting preprocessors at all at this point isn't for macros. My number one concern is the #if directive. The rest are just kind of there. The reason I want #if is for altering behavior from platform to platform. I was discussing with marbs the other day the implications of ENIGMA compiling for iPhone, and he mentioned motion detecting devices.

Originally, I intended to offer controller_get_angle_x/y/z() and controller_get_shaken(). On Windows, they'd all return zero unless an applicable device was connected. On Wii, they'd all have an accurate return. On iPhone, _angle _x and _y would work, as well as _shaken (same for android). Issue is, what if that isn't enough? What if having a shake is a critical part of the game, and they would have to work around it with multiple lines of code (likely to test for a key combo instead)?

I like a number of features for Lisp's macros, but my focus is really more on preprocessors right now. Maybe we can pile on a new macro system as well, later. But for now I'm more concerned about being able to say

[[If Target_Device == eDev_iPhone]]
if (controller_get_shaken())
  earthquake();
[[else]]
if (keyboard_check(vk_control) and keyboard_check_pressed(ord("E")))
  earthquake();
[[fi]]

Granted, that's not a very good example, since a simple "or" could technically have sufficed with little overhead. But it conveys the basic idea.

Say we want our mobile game to always be oriented correctly, and which direction has the high resolution doesn't really matter.

Persistent Controller Step Event:
Code: (EDL) [Select]
[[if Target_Device == eDev_iPhone or Target_Device == eDev_Android]]
int az = controller_get_angle_z();
if (az > 45 and az < 135 or az > 225 and az < 315)
  view_wview[0] = display_get_width(),
  view_wview[0] = display_get_height();
else
  view_wview[0] = display_get_height(),
  view_wview[0] = display_get_width();
[[fi]]

Granted, that code's kinda rough. But that's the kind of thing I'm talking about. You don't exactly want it doing that on Wii. :P

1599
Proposals / Re: Preprocessor Directives (The compile-time "if")
« on: November 06, 2010, 03:14:57 PM »
There's no point in using real types for macros... It's strictly interpreted... it'd just be more work.
#pragma once won't help us; this is for EDL in objects and scripts, which are always included once manually (they can't be included by the user...)
As for using ifdef and endif instead of {}, it's really a matter of preference. I like it text-based because you can always tell the preprocessor from the rest of the code. If we're going to be using [[]]. [[]]{} would look ugly. I'm opposed to so many _ in everything, but I suppose I'm not against using a word and {} instead of [[if]] [[fi]], if that's what everyone else wants.

Moreover, has anyone really been far as decided to use even go want to do look more like?

1600
Proposals / Re: Preprocessor Directives (The compile-time "if")
« on: November 06, 2010, 02:00:43 PM »
"__preproc__ int x = 2;"
"Also, mandatory is official #pragma once support"

wat is this i dont even

1601
Proposals / Re: Thoughts on forum registration...
« on: November 06, 2010, 01:20:15 PM »
That's just annoying, serp. XD

1602
Proposals / Re: Preprocessor Directives (The compile-time "if")
« on: November 06, 2010, 10:42:18 AM »
I see what you mean, Rusky. For a little bit I was thinking about doing something like that (C takes a lot of heat over the issues rising from copy-pasted macros, of course), but I don't think I should. The only reason I'm keeping any sort of macros is because of ENIGMA's C heritage. If it wasn't for that, they'd be expression based if they were in at all, but my reason for wanting preprocessors at all at this point isn't for macros. My number one concern is the #if directive. The rest are just kind of there. The reason I want #if is for altering behavior from platform to platform. I was discussing with marbs the other day the implications of ENIGMA compiling for iPhone, and he mentioned motion detecting devices.

Originally, I intended to offer controller_get_angle_x/y/z() and controller_get_shaken(). On Windows, they'd all return zero unless an applicable device was connected. On Wii, they'd all have an accurate return. On iPhone, _angle _x and _y would work, as well as _shaken (same for android). Issue is, what if that isn't enough? What if having a shake is a critical part of the game, and they would have to work around it with multiple lines of code (likely to test for a key combo instead)?

I like a number of features for Lisp's macros, but my focus is really more on preprocessors right now. Maybe we can pile on a new macro system as well, later. But for now I'm more concerned about being able to say

[[If Target_Device == eDev_iPhone]]
if (controller_get_shaken())
  earthquake();
[[else]]
if (keyboard_check(vk_control) and keyboard_check_pressed(ord("E")))
  earthquake();
[[fi]]

Granted, that's not a very good example, since a simple "or" could technically have sufficed with little overhead. But it conveys the basic idea.

Say we want our mobile game to always be oriented correctly, and which direction has the high resolution doesn't really matter.

Persistent Controller Step Event:
Code: (EDL) [Select]
[[if Target_Device == eDev_iPhone or Target_Device == eDev_Android]]
int az = controller_get_angle_z();
if (az > 45 and az < 135 or az > 225 and az < 315)
  view_wview[0] = display_get_width(),
  view_wview[0] = display_get_height%

1603
Announcements / Re: Long enough without an update
« on: November 06, 2010, 10:18:55 AM »
I need to offer preprocessors in ENIGMA. But I'm NOT using C's.
I'll make a post under proposals.

Done. http://enigma-dev.org/forums/index.php?topic=676

1604
Off-Topic / Re: Wayland (aka DIE X11 DIE)
« on: November 05, 2010, 09:39:54 PM »
I'm usually in favor of preserving, though my public track record doesn't suggest it. (In all honesty, there's no hope for GM, and there was no hope for even the better aspects of R3's instance system and parser sync.)

X has been, recently, much better about not crashing and dying all the damn time. The sheer motivation they must have attained in seeing that the project would otherwise be replaced probably got them going again on the errors. Look at Pidgin. Empathy replaces Pidgin; next thing you know, pidgin has voice and video support.

I haven't seen X's code, so I can't speak for whether or not it should be scrapped. I trust a group of GNUs to make the right choice.

But if they totally fuck up the API and still don't offer widgets natively, I'm going to flip shit.
(Nah, I'm actually pretty much over it at this point.)

1605
Proposals / Re: Thoughts on forum registration...
« on: November 05, 2010, 09:27:44 PM »
I kind of like what the second question is getting at. Basically, I'm going for things the typical ENIGMA user would know. (Or should go fucking learn before asking about it here <_<).