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

Pages: [1] 2
Traditional Roguelikes (Turn Based) / Re: Expedition v0.1.7 released!
« on: July 26, 2010, 04:05:55 PM »
Needs graphics? Tolerate text? Who are you to defile this sacred place with such talk? Your fireproof pantaloons will not spare you the terror of my jaws, heretic!
Fireproof pantaloons. heh.

Traditional Roguelikes (Turn Based) / Re: Expedition v0.1.7 released!
« on: July 23, 2010, 02:36:51 PM »
Honestly, I think this need....

Hold on, lemme get my asbestos underwear on real quick.

Okay. I think this needs to be made graphical.

Now, hold on, I'm not saying anything bad about text. You know I can tolerate text a lot. But there's so much going on in this game and it's seriously so good I think you need to widen  the audience base. I want more people playing this. Honestly, the only way you're going to do that is pretty it up with a UI that folks are more used to looking at. This reminds me a lot of civilization. If others could see that I think this game has the potential for a wide audience.

Other Announcements / Re: The 2009 7DRL Challenge has begun!
« on: March 20, 2009, 07:09:19 PM »
Can anyone get backwards gravity to compile? I tried it in PDCurses on windows and got nothing. And I can't contact the developer. If anyone else can get it to work, let me know, otherwise I'm going to suggest dropping it as a failure.

Other Announcements / Re: The 2009 7DRL Challenge has begun!
« on: March 19, 2009, 02:46:57 AM »
Was there any good games this time? I haven't tried any of them.
I'll tell you in a little bit.

Programming / Re: Drawing on a diagonal...
« on: March 05, 2009, 07:28:53 PM »
I made a prototype that does rotation. If you download the source it's fun to play with steps that are smaller than 45o, but be warned you may never find zero again.,7.msg14.html#msg14

Programming / Re: Starting Small
« on: March 05, 2009, 07:25:18 PM »
You could always just do the lonely take of an '@' symbol trying to escape out the right side of a dungeon.
Code: [Select]
#include <curses.h>
#include <time.h>
#include <stdlib.h>
main() {
  char map[10][15];
  int y=1;
  int x=1;
  int c;
  for(int yy=0;yy<10;yy++)
    for(int xx=0;xx<15;xx++)
      map[yy][xx]=((yy!=0)&&(yy!=9)&&(xx!=0)&&(xx!=14)&&(rand()%4))?' ':'*';
  map[rand()%8+1][14] = ' ';
  while((x!=14) && ('q'!=(c=getch()))){
    for(int yy=0;yy<10;yy++)
      for(int xx=0;xx<15;xx++)
      if(KEY_UP==c && ' '==map[y-1][x]) y--;
      if(KEY_DOWN==c && ' '==map[y+1][x]) y++;
      if(KEY_LEFT==c && ' '==map[y][x-1]) x--;
      if(KEY_RIGHT==c && ' '==map[y][x+1]) x++;
I should improve the dungeon generation. I can't take credit for most of that. I reduced a pre-defined map to three lines that make a random pattern, added a winning condition, and in the end reduced the game from 902 chars to 713. But there's no guarantee you can make it to the end the way it's written.

You may think this sort of thing is silly, but it's an excellent proof of concept sort of thing, gives you a little satisfaction. Something stupid you can show off that no one has much expectations for.

Programming / Re: Curses - Issue with init_color
« on: March 05, 2009, 07:16:05 PM »
My init_pairs are as follows:
Code: [Select]
    init_pair(0, COLOR_BLACK, COLOR_BLACK);
    init_pair(1, COLOR_RED, COLOR_BLACK);
    init_pair(2, COLOR_GREEN, COLOR_BLACK);
    init_pair(3, COLOR_YELLOW, COLOR_BLACK);
    init_pair(4, COLOR_BLUE, COLOR_BLACK);
    init_pair(5, COLOR_MAGENTA, COLOR_BLACK);
    init_pair(6, COLOR_CYAN, COLOR_BLACK);
    init_pair(7, COLOR_WHITE, COLOR_BLACK);
    init_pair(8, COLOR_GREEN, COLOR_BLACK);

I'll then use attron(COLOR_PAIR(n)); to turn on whatever color I want to use.
i.e. -
Code: [Select]
attron(COLOR_PAIR(0)); // turns on black/black
That's about right, tho if I were you I'd change the init pair to something like this:
Code: [Select]
for (c = 0; c < COLORS; c++)
  init_pair(c, c, COLOR_BLACK);

Then when you init you can actually init with:

Code: [Select]
replacing with whatever color you want. There's one small caveat in that on PDCurses you'll initialize 16 colors, where as on nCurses you'll only initialize 8, but the naming will still work the same, and if you just stick to them you can maintain cross-platform compatibility.

I've actually considered extending this sort of functionality so that you can get the background colors in there too by multiplying the background color by COLORS.

Now as for defining other colors, I've never tried using init_colors. Maybe I'll have to play with that one.

Programming / Re: 7DRL
« on: March 05, 2009, 07:09:26 PM »
You got a link?

Classic Roguelikes / Re: Spelunky: How Deep
« on: March 05, 2009, 07:03:03 PM »
Both my wife and I have beat it. Heh.

Off-topic (Locked) / Re: Cymon's Games wants you
« on: January 07, 2009, 12:36:56 PM »
I am actually also reviving the day of the type-in, commercially (it's a coincidence!). The program must be BASIC or Forth to be ideal type-in for what I am doing. (You can still write in any program language you want to, but only BASIC or Forth are ideal for type-ins for this new system.) And it will be a new computer/game-console system, everything built-in is free (as in freedom, not as in beer, because you obviously still have to pay) software. It will be able to run many old type-ins as well, for various different old computers.

That's neat. Get some old BASIC books and finally get to see the programs in action. If I had that maybe I wouldn't have started converting them, and I would have never made Cymon's Games.

Then again, I supposed I could have just used GWBasic in DOSBox, and I chose not to.

My guess is, tho, that you won't be able to do the machine dependent memory blitzes, which will negate most of the cooler games.

And of course it will have other features as well, such as play audio CD, run complex software from DVD, etc. Maybe I will convert some of your program to ForthBASIC (BASIC programs are automatically converted to Forth when you run, Forth programs will run directly without conversion) and you can include the program in a book you write. You can write book with this programs and with many other things, such as describing things about programming, rules and strategy for the games, etc. Later on I will write some short programs like you have as well, you can post on your web-site. But, it will be BASIC (or possibly Forth), not C/C++. C/C++ just isn't ideal for type-ins in my opinion!
Why isn't C/C++ ideal for type-ins? Just because "hello world" is 3 times longer.

No, you might not be wrong. C/C++ adds overhead that BASIC didn't have, but at the same time it provides a little more platform independent robustness, in particularly in the graphics and sound department, if you extend it with libraries like PDCurses, Allegro, SDL, or OpenGL.

Good luck with your project. I can definately see some educational applications for it. A bit like an Uzebox.

Off-topic (Locked) / Re: What do you do for a living?
« on: October 23, 2008, 06:31:42 PM »
As cool as it is, Airship 2600 is just about graphics; where is the playability?
How can you say that? Airship had some of the most revolutionary game play ever. Just because it didn't fit with your predefined notion of gaming (before or since) and used a unique control scheme it was the most solid game play ever.

I suppose I can understand, tho. A game that has such remarkably integrated game play as Airship 2600 it's easy to feel like it's playing you at times. Ah, but to be played like that, how can you complain.

Programming / Re: Drawing on a diagonal...
« on: October 23, 2008, 06:14:08 PM »
Hex boards make my head hurt. Besides, this is a momentary effect that will only last an instant. However, I will be doubling my blocks so that there's more of a square effect.

To complete you example, I want it to go like this:
Code: [Select]


Which requires some sort of half steps. One of the problems is that a diagonal is longer than a ordinal.

Since I posted that first post I've become an expert on rotation. Let me share what I've learned:

A rotation matrix looks like:
Cos DSin D
-Sin DCos D
which you then multiply with a [x,y] matrix. Fortunately we can cut the whole matrix thing and just say that:
(x,y) rotated D degrees = (x*cos D - y*sin D, x*sin D + y*cos D)
So basically change D for the degree of rotation and you have a rotated x,y around a center point (0,0). Complications with shifting aside there is a simplification we can make because we're dealing with a 450 rotation and cos 45o = sin 45o = 0.707. So our rotation above becomes:
(x*0.707 - y*0.707, x*0.707 + y*0.707)
(0.707*(x - y), 0.707*(x + y))
Similarly for a 90o rotation we get sin(90)=1, cos(90)=0 so we can simplify our rotation matrix:
(x*0 - y*1, x*1 + y*0)
(-y, x)
Which is pretty simple.

But it's that 45o transformation that we should be buggered about. What does that look like when you do a rotation? With rounding we get:
Code: [Select]

What thu? I guess that works, it's not what I expect tho. What happens when we go bigger than a 3x3 block? How will it look? Will we get overlaps?

And here's another caveat. In reality what I want to use an inverse operation so I don't have to worry about clipping.

I know I can do this, but it's going to be a pain in the neck.

Off-topic (Locked) / Re: What do you do for a living?
« on: October 08, 2008, 02:47:41 PM »
I forgot to mention. I'm a QA Software Technical Tester

Off-topic (Locked) / Cymon's Games wants you
« on: October 07, 2008, 08:31:14 PM »
I'm impressed with you all.

If you haven't heard of it before, my website Cymon's Games ( and I am attempting to revive the good-ole days of the type-in. I'm sure more than a few of you started programming with type-ins. Since the focus is on printed code I like can only host programs that don't require external data files (that can't be typed in) so the programs tend to be simple, which is good for learning. So naturally in my search for programs that I can add to the site I (re)found roguelikes.

This Friday Ido's Crypt Rover will be the week's featured program. Jakub Dębski has already given his okay for a few of his 1K roguelikes to go up in the future. There is a lot of talent on this site and I'll bet more than a few folks already have programs that could be featured on Cymon's Games.

At the moment the focus is on C/C++ programs. I may expand to python or java one day, but I have to weigh those options first.

I am asking you, begging you, to come forward if you have something you can share with the next generation of type-in-ers. I'd love some more roguelikes, but I'll also take anything elementary programming examples, to more ambitions projects. The most ambitious project to date is Star Merchant, however I will soon be featuring a couple of allegro programs on the site too, so don't think you're limited by size and scope.

I look forward to seeing your programs!

Programming / Drawing on a diagonal...
« on: October 07, 2008, 07:34:23 PM »
I think part of this is going to be me thinking out loud.

I want to do a ASCII game (it's too far from the official definition to be considered Roguelike in my opinion) where the room will occasionally flip around a center point. The game itself will never be played on anything other than level surfaces, so the rotations will only be a momentary visual thing, but it could stop at 90o from the original rotation. I wonder if it will even work? I mean, text boxes aren't exactly square. Maybe I should use the whole "double up" trick to keep things a little more level...

Actually, that could work since every step will have an inbetween that will need to be animated, the flip could just be the inbetween for that moment. Hmmm.

Either way, what I need is a way to walk through the data at a diagonal and draw it straight. There's got to be a nice mathematical way of doing that. I did something similar with alleytris, but that was only fo 90o angles. Does a similar technique exist for more discreet angles? I'm sure it does. AND I have to, like I said, center it at a point. This could be fun.

Does anyone here know of some good rotation around a point algorithm resources?

Pages: [1] 2