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] 4 5 ... 9
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.

Off-topic (Locked) / To get or not to get Windows 10
« on: June 03, 2015, 11:57:41 AM »
Most Windows 7 and 8.1 owners have that icon by now. I think it was a bad decision. I'd like to walk into Microsoft's office and ask anyone did they think it was a good idea. We know Windows 10 is released soon and we sure can make our decision to update to it, or not. I'm not going to update, because I will use this particular Win7 PC until it breaks and then get a new PC with pre-installed Windows, whatever it is then. There is no reason to update for me, unless they completely end support for 7 as they did with XP.

Design / Basic role-playing system models?
« on: April 21, 2015, 12:19:05 PM »
We have some RL libraries, but why don't we have a RPG system which is simple, open source (or rather free from license restrictions) and easy to extend with new stuff? For me the RPG system is really the big problem in roguelike (and role-playing game) development. Do we even have anything like that in tabletop form?

Off-topic (Locked) / My new homepage
« on: April 13, 2015, 11:59:39 AM »
I still have a so called "homepage" on internet. They were popular during early internet, but today no one has one, except I do! Fonts are now bigger and I'm using the same layout for basic pages. Thinking of adding texts in the art page to explain what those paintings and 3D renderings are. I guess I should also make an introduction page with some information about me, right?

Programming / How to improve math skills?
« on: February 11, 2015, 02:42:48 PM »
Math is important in some aspects of game programming and I've always found myself less good in math. Is there a good book or books about math I could read over and over again in vague hope that I could improve my math skill, possibly even reach the next skill level.

Off-topic (Locked) / How I met your mother - I got it!
« on: December 25, 2014, 03:58:56 PM »
I realized something, hope not too slowly, about this series. I was wondering what's the point, but no longer. The characters in this show each represent an archetypical douchebag.

Off-topic (Locked) / Songs from your country
« on: November 29, 2014, 01:23:53 PM »
Let's start with CMX - Rikkisuudeltu. I think it's a song about how people end up lonely when their relationships doesn't work, but also about "eternal" love which I think is "it" he sings about, some kind of personification of love, old worn out kind of love that can't get better with a new girl/boyfriend. This is their newer songs, but sounds a lot like older stuff which I think is better.

Programming / How big is your Level class/file?
« on: November 19, 2014, 05:16:40 PM »
In my roguelike projects the Level class, responsible for containing game objects and creating levels, seems to become big. In Kaduria it's about 4000 lines (.cpp file only, including all lines). I don't think it's that big, but.. I don't know how to break it to smaller pieces. Actually I have total of 31 files (classes) in the 'game world' context so not everything related to dungeon generation is in Level class.

Edit: I think we may have discussed this before, but let's do it again.

Programming / D language - class
« on: November 09, 2014, 11:47:49 AM »
Any D language experts here? I want to ask about D's class everywhere I go. Is there a reason why you need to dynamic alloc an instance of a class? What's the problem with this:

MyClass a(1); //this is not possible in D

auto a = new MyClass(1); //this is

Pages: 1 2 [3] 4 5 ... 9