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.


Topics - Krice

Pages: [1] 2 3 ... 8
1
Programming / How to apply lighting to this FOV routine?
« on: August 22, 2017, 07:25:56 AM »
http://www.roguebasin.com/index.php?title=LOS_using_strict_definition

So I'd like to use lighting with this routine which seems to be quite nice. My lighting values are from 8 to 0 (dark). I have some kind of idea about distance and light value, but this routine is kind of strange and I'm having difficulties to figure out exactly how.

The closest I got was getting a distance from my Coords class like this: (oc = origin coordinates)
Code: [Select]
   while (next.x != x1 || next.y != y1)
    {
int d=oc.Get_Distance(next);
v=8-d;
if (v<0) v=0;
...

But with this the light source is rectangular in shape.

2
Programming / How to maintain a large Level class?
« on: June 25, 2017, 01:21:45 PM »
I have a Level class from which some special level types are derived, but most of the code is in Level class. It has also a member Level_Map class which is kind of strange, because it could have more low level generation code. Also, there are separate classes for most feature generation (corridors, rooms, rivers, etc.).

Since Level has roughly two main operations: generation and then actions that happen in level during the gameplay, my plan is divide the class to "base" class with generation and actual Level class with gameplay operations. In a way Level_Map is redundant so it could be a part of that base class.

The deriving style is probably not important, because I just want to split the class to those two main operations, because it's so huge. I may have to open the base class to public access I guess. I'm mostly thinking out loud, but if someone has more experience on OOP I'm happy to know your opinions.

3
Programming / Help me find a better language than C++
« on: June 09, 2017, 11:53:14 AM »
Planning on programming a new tile editor from scratch on OSX platform (possibly portable to Windows also). Requirements:

- real language, not a scripting language like python
- not purely functional (must have mutable variables)
- library for gui development (like SDL or wxwidgets for C++)
- not xcode/swift

I have Visual Code already installed on OSX so it could be one of languages supported by it. Some kind of IDE would be a nice thing anyways.

Edit: Let's possibly make this easier and forget OSX. I just tried to use Ruby on osx and could not, because the default ruby (that ships with os) doesn't have debug "stuff" in it and you can't install it over, or should not. You need something called rbenv and looking at the installation procedure I gave up. I guess it's not that bad. Someone has done it before, right?

4
Off-topic / Prime numbers
« on: May 29, 2017, 12:32:56 PM »
I think working on prime numbers is a nice hobby. I haven't read a lot about them (I'm not good at math), all I know they seem to be somewhat "random", although I don't believe they are. The way composite numbers are made up appears to be two types: divisible by two or made from a number of >2 primes in a certain way (some kind of prime sequence itself) where I think there is some kind of logic in that, but I don't yet know what.

Did I start a topic about this already? Can't remember..

5
Design / Skill category problem
« on: May 17, 2017, 07:40:44 AM »
I have a silly problem with 'searching' skill. I've created categories for skills (like combat, thievery, athletics, bushcraft etc.) but I can't figure out a proper category for searching. At the moment it's the only skill in its category. Maybe trap detection could be also in that category (it's now in thievery).

6
Off-topic / Grey hair
« on: April 03, 2017, 09:08:30 PM »
I think my hair has started to get grey. I talk about this everywhere but people don't seem to share my joy about hair getting grey. It's cool. The bad thing is that for me this can be a long process I guess?

7
Programming / How to handle targets?
« on: January 29, 2017, 04:32:22 PM »
When npc targets something it has to know the location of the object (often another moving object) and so get the location from the object. But sometimes objects get destroyed and if the npc is still trying to get the location it may be a null pointer waiting for it. I made a list of npcs for each object so they know who is targetting and when destroyed can message back to npcs to stop targetting them. But feels like it's not the most efficient way to store targetters, because most game objects are never targetted by npcs. How to message a npc so it knows when the target is destroyed?

8
Announcements / C++ programming blog
« on: November 22, 2016, 10:54:20 AM »
I've started a new blog to concentrate more on programming. There has been a lot of that in my game project blogs, but this time I'm writing stuff about C++ features and programming in generic level. I try to approach things from my perspective and experience rather than tell "how to" do things in one "right" way, because there isn't one.

http://cppprogblog.blogspot.fi/

9
Off-topic / Is Finland the best country?
« on: November 08, 2016, 10:00:45 PM »
I think that sometimes. Is it the best we can do? (Or was it, we have became something else lately, more "american" I would say). This is a serious question, because there are things that makes me want to leave this country actually... but where? To somewhere even worse. Why this world sucks so much?

10
Off-topic / Trump for president
« on: September 16, 2016, 08:06:49 PM »
I believe Trump is better than Clinton. I'm just pretty sure if you vote for Clinton she will be like Obama, giving lot of speeches and nothing else happens. I also would like to see if Trump is going to build that wall. Besides Trump is a better image of USA.

11
Design / Keyboard command survey
« on: September 11, 2016, 07:33:30 AM »
I have a small problem with key Q. I had an idea to use lower case letter for items and uppercase for larger objects, like 'r' to read items in inventory and 'R' to read signs and stuff like that. But of course, 'q' is to quaff (funny word) potions and 'Q', well, that't the problem. It's most often used to quit the game, but in Kaduria it's handled in a game menu (F1). I could also use d/D (drink), but then how to 'd'rop items? Some of these command bindings are kind of standard in a way that changing them to some other would probably feel odd.

12
Programming / F# programming language
« on: September 03, 2016, 09:21:47 AM »
Let's make a new thread for this sucker. I think my next goal after initial shock is trying to find a library for roguelike game development. Possibly graphical or ascii, I don't know yet. Then find a way to install and use the library (in Visual Studio 2015 IDE), if it's even possible.

13
Off-topic / SETI and radio waves
« on: August 28, 2016, 01:31:23 PM »
I must be missing something but why seti people are trying to find e.t. life by detecting radio waves? What I know about radio waves is that they stop and/or reflect at pretty much any obstacles there is (including atmosphere). Not only that, we are barely able to detect astronomical radio sources like supernovas and quasars which are emitting stupendous powers compared to any man made radio sources. Radio waves also decay like other forms of waves, right? And even more the star of solar system can emit more radio waves than any artificial sources, masking out them. Why do we then think we could detect artificial radio waves from other stars?

14
Programming / DIY programming language
« on: July 22, 2016, 12:03:39 PM »
I think most if not all programming languages kind of suck. So how about creating a new programming language? How hard it could be. I guess implementing is much harder than just a design. What I would like to do is rethink everything and not try to create another oop/functional whatever mess. There has to be more clever way.

15
Programming / How to deal with the hugantous Level class?
« on: June 23, 2016, 07:06:56 AM »
In Teemu the Level class contains everything for every level theme which makes it really large. I have the same problem in Kaduria also. I think the obvious way to break up Level is inheriting from simple generic class to more complex Level types that have specific features. But are there other ways? I guess the level structure (terrain) generation could be detached from the main class, but it also has to have some kind of inheritance to different types. The problem is also that you would need to create some kind of "clue" map for game object generation rather than create objects with the terrain which is not very practical since objects are in the Level class.

Pages: [1] 2 3 ... 8