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

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?

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.

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?

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.

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.

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.

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?

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.

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.

Programming / Generic algorithms for complex data?
« on: June 21, 2016, 09:47:42 AM »
Let's say there is an array class with methods for drawing ellipses, rectangles etc. These routines access unsigned char (or some other simple type) of the array. Now, I've wondered if it's possible to make generic routines in case where you change the array to have items of more complex structs with some member variable of that struct that needs an ellipse routine. How do you write a routine to accept those types? Is it even possible without template/macro madness?

This is a real issue I'm having with Teemu, which has for now used simple arrays for each type of map data (light, fov, etc.) But I've started to combine these into more logical tiles that have a struct with members for that data. Then I noticed I have to write ellipse etc. routines for all different maps and if I have more than one variable it has to be written in the algorithm to choose what variable is changed by that algorithm.

Edit: well, one idea I just had is change the routines to create a list of coordinates (in a shape) which then are processed as a list retrieved from an ellipse routine. It's slower, but... it could work.

Design / Info line idea
« on: May 07, 2016, 08:58:03 AM »
I have difficulties to decide if "info line" is a good idea. It's a line of text at the bottom of the screen showing context sensitive information about stuff like when you mouse hover on a strip of items (belt items) to see what they are, or simply move on tiles to look at them without pressing any mouse button or key. On the other hand it doesn't work at all with keyboard, it's really only mouse option so you would need also something for keyboard users. It's of course possible, but adds more commands for look, check belt items etc. There is something appealing in info line idea, but I don't know. What are your thoughts about this subject? I would like to tap into your infinite wisdom about this dilemma.

Programming / Heterogeneous saving and loading objects in C++
« on: April 05, 2016, 09:42:44 AM »
Has anyone done this? I was thinking of first saving the type of the class in a list, because you simply have to know the type of object to create its actual type before loading the data. With homogeneous lists this is easy, because you simply create the class n times for each list item. The reason I'm planning this is that I want to extend inheritance of some object types.. I don't even know if it is a good idea, but it has started to annoy me that some classes have "empty" components that could be put to inherited (extended) classes where they in theory should be placed anyway.

Programming / Noob problem with std::map
« on: October 12, 2015, 07:52:22 PM »
I wanted to try std::map for the first time!

It's int, Message_Text* pair. I'm looking for id from a message data to create map item like this:

map[id]=new Message_Text(text location of id here);

Then checking out with 'find' if the key exists (because if you just use [] to access map it will create a new object if no key found with that id).

The problem is that the text position is wrong so it's doing something to data (even hangs when trying couple of times) or it's not somehow pointing to proper id. I must be missing something simple, right?

Programming / GUI library experiences
« on: June 07, 2015, 11:30:40 AM »
I was unable to compile FLTK on OSX (because clang error about x86_64 architecture) and also in Windows, because make gives error "makeinclude: no such file or directory". So I can't even get started with FLTK. I don't know, is it too much to release compiled libraries to Windows? The source code of FLTK looks horrible by the way, there are memsets and macros all over the place in C++ classes. When compiling in OSX the compiler gave couple of warnings about crappy code, can't describe it otherwise.

The other library I took a brief look was wxWidgets, but it's just too large and complex library and programming it seems to be similar C++ experience with macros and all that crap. Why they had to use C++ (wrap in classes) if it's badly written C?

I just need a GUI library with basic dialogs, especially a file dialog and menus etc.

Pages: [1] 2 3 ... 8