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

Pages: [1]
1
Programming / Re: Screenies of LOS :3
« on: February 14, 2013, 02:34:53 AM »
Thanks for the reply, I enjoyed reading it.  As for the view distance, I am going to limit it too the width of the viewable screen (which is at the moment MAPSIZE).  Once MAPSIZE increases, I will create a new constant called SCREENSIZE or something like that.
 
Also, the line is drawn from the player outward and the calculations stop when each line hits a wall.  The bad thing though, is that at the moment it begins tracing a line from the player to every tile on the map until that "break" happens ...meaning a LOT of tiles are checked more than once -in particular those closest to the player.
 
For the time being, I am not going to look into efficiency until it starts to have an effect on gameplay. 
 
As for mobs, I figure if the player can see them, then they can see the player.  I will develop that further if I ever need the mobs to interact with each other.
 
I thought I could be clever with my lightsource and make the variable "int n" = 3 for a light radius of 3 ...but that only makes a diamond shape around the character because of the way bresenhams draws lines.  I think therefore, I may have to write a completely new function for lamps and the like.  Surely it can't be too difficult to write an algorithm that will draw a circle with tiles.  If I get it right, I can use it in my mapgen too :3
 

2
Programming / Re: Screenies of LOS :3
« on: February 13, 2013, 06:22:59 AM »
I suppose you are correct  ...though I have since decided running around my tiny little map is not fun at the moment.  The thing I really wanted to share was the code =]

3
Programming / Screenies of LOS :3
« on: February 13, 2013, 02:31:48 AM »
Hey everyone!  It has been a couple of months since my last post, but I thought I would share my first real success.
 
http://imgur.com/a/Pd4iy
 
The link above shows my line of sight in action, as best I could represent it with a few screenshots.  I would upload a working .exe but I can't think of anywhere that will let me host it ...and it would seem a little dubious at best.
 
I would like to share the code too ...the basics of which are Bresonhams in a format I grabbed from a blog linked from a thread at TIGsource (which I cannot find now), and a few modifications of my own.
 
 
https://gist.github.com/anonymous/4909278
 
 
I think I will write part of this into a function which I can call again for my aiming and so on -anywhere else I need to use LOS basically, which will save me re-writing heaps of code.
 
 
I hope this helps someone =]
 
 
The next challenge I have set myself is extending the map beyond the dimensions of the view window.  After that, it's random dungeon generation!

4
Programming / Re: Already with the line of sight!
« on: December 03, 2012, 10:40:13 AM »
Ah crap.  It doesn't work.
 
Revised code is here https://gist.github.com/4194013
 
Result is here http://imgur.com/r12lg
 
 :-[

5
Programming / Re: Already with the line of sight!
« on: December 03, 2012, 08:14:24 AM »
Suprised and impressed!  ...although not I have to figure out how to draw it properly which is doing my head in.
 
At uni we program data base queries and binary trees.  Roguelikes are something else.

6
Programming / Re: Already with the line of sight!
« on: December 03, 2012, 06:52:21 AM »
I got it!  Thanks anyways :3

7
Programming / Already with the line of sight!
« on: December 03, 2012, 01:50:12 AM »
So far, I have the ray casting ...and it works.
 
https://gist.github.com/4192017
 
FYI, wallsGFX[][] contains the wall data.  If wallsGFX
  • [y] == 0, you can see through it.

 
rays[][] contains the current ray, and it is re-initialised to 0 at the start of each iteration of the loop.
 
lineOfSight[][] is where I want to store a '1' for tiles that can be seen, and a '0' for tiles that cannot.
 
How would you go about transferring this information?
 
Have I been clear?
 
I will try to post a little example
 
wallsGFX[][]
 
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 1 1 1 1 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0

rays[][]

0 0 0 1 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
 
what lineOfSight[][] should show after this one iteration
 
0 0 0 1 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0

8
Programming / Re: New to development, no stranger to Roguelikes though
« on: November 29, 2012, 10:30:32 AM »
I sure did, and thank you.  My goal is to do all the music, tiles and programming myself :3

9
Programming / Re: New to development, no stranger to Roguelikes though
« on: November 29, 2012, 04:32:33 AM »
Because I said I'd come back with some music =]
 
http://soundcloud.com/heliacal-rising/endless-maze

10
Programming / Re: New to development, no stranger to Roguelikes though
« on: November 28, 2012, 01:34:37 AM »
What you have planned for the game's setting/story/gameplay?

Since you asked :)
 
It's going to be set on a gigantic space station of sorts, akin to a mix between the Death Star and a harbinger, only much larger ...and very very old.  So old in fact, that any original crew are long deceased and whatever its original purpose served an age ago.  Think thousands of years.
 
It is now home to hives of pirates, refugees and smugglers of both human and alien origin none of whom will have explored the full extent of the ship -which in good Roguelike tradition will be an endless maze of corridors, shafts, docking bays, cargo holds and much, much more.
 
For now, @ will awaken in a long dormant hangar from some kind of stasis in an escape pod where the adventure will begin.
 
When I get home, I will post a couple of the assets I have so far -I am going for a "used future" look -a mix between Blade Runner and the original Star Wars trilogy.
 
I also have some music I have produced which I will link later too -I think it will help give a feeling for the atmosphere.
 
To add a little flavour and humour I am going to add some NPC's such as Roger Wilco, Commander Keen, and Doomguy (from whos corpse @ will most likely find a red key card).
 
I will be using random dungeons between static 'hub' levels -similar to the town at dungeon level zero in Angband where @ can pick up quests, and talk to NPC's to gain some flavour and a taste of what is in store.
 
From the outlook I think it will take a couple of years by myself, though I may at some stage ask for help with some of the asset creation or maybe even passing out functions, but I am wary of this, and kinda like the idea of having my name to it all.
 
I was considering keeping a lot of this to myself until I have an actual product, but whatever -here it is  ...and for a title -my game is called "Heliacal Rising".
 
As for gameplay -I at the moment I am looking at a d6 system, similar to Shadowrun.  I want to incorporate some puzzles, quests, a little dialogue, key cards and doors, random items, implants, stat gain, levels and skills such as repair.
 
I also have some nifty original ideas for instance, a box of some kind that @ will have a minimal chance of stumbling across which may store ONE item which will be accessable by other @'s in other save games should they be lucky enough to stumble across it.  Kinda like a shared storage -only more Roguelike.
 
The gameplay itself will be easy to program.  It's the data management that will be challenging.  I think I will have to put together a crude relational database of some sort to tie stats and items to skills and so on.
 
Don't expect a great deal for some time, but I will be dropping by for help and ideas as the project progresses.
 
I'm doing well so far ...I just have to maintain the disclipline!

11
Programming / Re: New to development, no stranger to Roguelikes though
« on: November 26, 2012, 04:33:12 AM »
Thanks friend, I shall look into it.  The main reason I chose SFML is that it makes handeling sprites really easy for me -though it was not designed with Roguelikes in mind.
 
I guess if someone does come across this post, what I should have asked is this -is there an API out there that is good for Roguelikes && Sprites with opacity && C++.

12
Programming / New to development, no stranger to Roguelikes though
« on: November 26, 2012, 02:37:50 AM »
Hey everyone.
 
I have been playing ZAngband on and off for over 10 years now, and have dabbled here and there into other roguelikes over the years and I have decided it's high time I wrote my own.
 
Before I get too far, I wanted to ask about your experience programming Roguelikes.
 
I will be using C++ and SFML 2.0RC.
 
I looked into nCurses and libcod but neither of them seem to have the flexibility I need.
 
There are some tutorials out there, but they all seem both to teach terrible programming practice and are in high level languages.
 
Does anyone here have any interest in programming a Sci-Fi story Roguelike with some adventure-game-like aspects and a "used future" feel?
 
Is there an API that you feel might be better suited to the job?
 
Thanks for reading ...I will be perusing these forums for ideas and the like over the next few weeks :3

Pages: [1]