Welcome, Guest. Please login or register. Did you miss your activation email?

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

Pages: 1 [2] 3
16
Alternative is always Object* and take care of the delete by yourself.

I addition to what the others said: Is your compiler c++11 ready?

17
SFML projects / Re: Last of the Ambaras
« on: March 18, 2016, 09:36:54 pm »
Since this scenario doesn't involve humans, wouldn't a binary format be more suited for this purpose? If text formats are still efficient and memory-acceptable enough, there's of course no need to make things complicated.

Its always nice to have something human readable between editor and game to find bugs and to change things by hand.

JSON is indeed less space intensive as XML (while XML gives more flexibility), but take in mind I want to use it for game development. Do you ever saw/wrote a game that REQUIRED the minimal space/speed difference between JSON and XML?

From my point of view there is definitely no benefit in switching from XML to JSON, since this simply would be too much work.

18
SFML projects / Re: Last of the Ambaras
« on: March 16, 2016, 05:00:13 pm »
The simple reason is that I started up with less experience and no knowledge about JSON. It would make sense to use it in a new project, but not in my current 20k code-line engine.

Anyway while XML is indeed somewhat (human-) write-unfriendly, its a pretty solution for intern data exchange between editors and game.

I never heard that XML is parse-unfriendly, could you explain that? My meta-files are anyway not that big, that parsing time matters.

19
SFML projects / Re: Last of the Ambaras
« on: March 16, 2016, 08:35:13 am »
Keep properties consistent (like using type for every tag instead of skill_type for <skill> and mechanic_type for <mechanic>

Seems rational. Done.

Also: Audio has 2 "mechanic" properties?

Yeah thats intended, since a mechanic (like projectile) sometimes needs multiple audio files (like trigger and impact) or even none. Whats done here currently is collecting all audio tagged with 'mechanic' and attach that files in the given order to the mechanic. The mechanic will access its sound files automatically by index so the user has to now how many sound-files the mechanic requires.

(Current but probably not final solution)

20
SFML projects / Re: Last of the Ambaras
« on: March 15, 2016, 05:32:10 pm »
Mini-Update:

I recently finished the improvements on my skill-system so that skills (useable by both player and NPCs)
can be defined with cleaner xml-code.

What do you guys think of it? The question is: Is it easy to understand (for modders) and easy to use to create own skills or would you recommend me to spend time in making a GUI-tool for skill-creation? There are many skills ingame (currently 100) and they shall be easily extendable.

Code: [Select]
<skill skill_type="Magic_missile" cost="10" cooldown="1" activation_time="900" recharge_at_switch="0" AI_rating="5">
            <mechanic mechanic_type="projectile">
                <parameter speed="6" flight_range="1200" size="10"
                           sheet_id="assets/combat/Combat.png"
                           sheet_meta="assets/combat/Combat_Meta.xml"
                           sheet_key="SmallFireball" />
            </mechanic>
            <effects>
                <effect type="Inflict_debuff">
                    <parameter debuff_type="Burning" duration_base="2" duration_multiplier="0" level_base="1" level_multiplier="0.15"/>
                    <condition>
                        <condition type="Target_is_foe">
                            <parameter/>
                        </condition>
                    </condition>
                </effect>
            </effects>
            <audio activation="assets/sfx/skills/skillcast_ardor.wav"
                   mechanic="assets/sfx/skills/fireball_trigger.wav"
                   mechanic="assets/sfx/skills/fireball_impact.wav"/>
        </skill>

(Example for a fire-projectile that inflicts burning-debuff on a single target foe)

Cool, keep it up! Any progress is progress! :)

Thank you :)


21
General / Re: How can I do culling in top-down (Zelda like) tile map?
« on: March 14, 2016, 12:19:12 pm »
My first idea is similar to laurents. I think the most efficient way to solve this is storing additional information in tiles. Otherwise solutions will always have to iterate over non-visible tiles.

So lets say we've got a tile X with height 3. So why not just store a pointer to that tile in the 3 tiles above?
You'll have to consider the case that the pointer of some of those tiles already points to another previously created tile. Simply override it in this case, if the new tiles lies below the stored tile.

During rendering you can just draw the stored pointer instead of the tile itself (if I get your examples right).

Something like that.

22
Why is that not satisfying when working with higher objects?

The tree requires more space, because you store every item in multiple nodes. That results in higher RAM usage and longer operation-times (like retrieve) on the tree at all.

Additionally I had the problem following problem: Lets say I have a rect and I want to do a usual operation like retrieve objects from the tree that may collide with that rect. So you have something like a list that you fill with objects from the appropriate nodes.
The problem I see now with your approach is that you have to check whether an object is already in that list or not since they can occur in multiple nodes.

23
I just took a quick look and it seems like you're just storing items in leaves which usually means that you store them more then once in different nodes. Is that right?

While whether this is good or not depends on the usage of the tree, I personally found that solution not so satisfying when dealing with high numbers of items. What I did instead is storing items in the deepest inner node (on path from root to leaf) that totally contains the entity. This would be a clear assignment and its ensured that each item is exactly once in the tree.

Not a very profound comment, but you may want to think about it.

24
SFML projects / Re: Last of the Ambaras
« on: March 08, 2016, 02:57:01 pm »
So hey again. Some time has passed and I'm a upset that I managed to make to less visual progress.

I had some pressure with exams in january and someone destroyed my netbook in february which bounced me back for about ~10hours of work. Not that much at all, but actually a huge demotivation for me at that moment.

In fact I currently redoing most of my engine before making any gameplay progress. I reworked my whole memory management so that the engine now uses c++11 smart pointers and I redesigned hundreds of code lines which were simple crap before. Right now I implement a new design for metadata which is more generic and less code-intensive. Also my xml is now much more structured then before:

Code: [Select]
<meta fileID="0">
        <stats count="18">1 10 28 20 8 8 2 4 8 70 45 3 1 2 75 100 95 18</stats>
        <souls count="31">1 5 7 11 16 17 20 21 24 25 26 27 29 31 32 36 41 42 44 46 49 54 56 58 60 61 62 72 73 76 87</souls>
        <skills count="15">0 2 0 0 2 1 0 2 2 0 3 0 0 1 1</skills>
        <drops count="12">0 8 11 12 13 14 15 16 19 20 21 22</drops>
        <!-- health_tresh | en_tresh | skill_delay | arrival_radius | roam_dist | roam_timer_lower | roam_timer_upper | max_vel | evade_dist -->
        <AI count="10">25 35 2000 50 200 8000 15000 1 350 330</AI>
    </meta>

What the hell was this?
It changed to:

Code: [Select]
<stroller base_soul_slots="1"
              experience="10"
              drop_rarity="28"
              drop_rate="20"
              soul_rate="8"
              base_ardor="8"
              base_spirit="2"
              base_cabal="4"
              base_bravery="8"
              health="70"
              damage="45"
              ardor_resistance="3"
              spirit_resistance="1"
              bravery_resistance="2"
              attack_spread="75"
              attack_range="100"
              attack_angle="95"
              body_weight="18"
              can_hold_soul_effects="1 5 7 11 16 17 20 21 24 25 26 27 29 31 32 36 41 42 44 46 49 54 56 58 60 61 62 72 73 76 87"
              attack_sound_1="assets/sfx/foes/attack1.wav"
              attack_sound_2="assets/sfx/foes/attack1.wav"
              idle_sound="assets/sfx/foes/stroller_idle.wav"
              defensive_state_sound="assets/sfx/foes/attack1.wav"
              death_sound="assets/sfx/foes/stroller_death.wav">

I now use 2 classes for meta-data:

One is vector based and xml nodes (like the one above) can be directly accessed with indices. I use this for ordered stuff like enemy-types (which have natural numbers as IDs).

The other one is hash based and uses a unordered_map to access xml-nodes through string keys.
I use this type for things like config-files in which the entries are bare any order.

25
SFML projects / Re:creation - a top down action adventure about undeads
« on: February 05, 2016, 10:45:12 am »
Its your decision, but many games chose a boss to include it in teaser-gameplay (e.g. see Dark Souls 3).

I don't want to make simple game, but it won't be a game with 10+ hours of gameplay with tons of NPCs (I plan to have something like 6-8 hours).

Just wondering about that. While 6-8 sounds enough for a 1-man-game, i would say that the time to create gameplay content (if the required tools are developed), is small in proportion to the overall dev-time. Your data-driven-philosophy should go hand in hand with that anyway.

You seem to be at a point in dev where you might want to plan the next years instead of a few month so how are your future plans? I could imagine some kind of episode-format?

26
SFML projects / Re:creation - a top down action adventure about undeads
« on: February 03, 2016, 11:21:55 pm »
How is the boss-progress going? Would like to see some gameplay. :)

Do you currently work full-time on your game?

27
SFML projects / Re: Cendric: An RPG Platformer
« on: February 03, 2016, 11:19:25 pm »
I really like it. Would like to read more about it soon. :)

However, the code-layout looks okay but lacks comments. I generally dont like tons of <50 line files. You could merge some of them that are related to each other, especially when the code is well tested and wont be altered much more (no recompiling). But thats just a personal preference i think. Cant say much more about the code atm but it looks well working since the game seems to be far progressed.

28
SFML projects / Re:creation - a top down action adventure about undeads
« on: January 19, 2016, 09:26:22 am »
The new style looks much better and seems to be easier to draw too. There is actually a big improvement from old to new.

How do you did the shadow of the closet on the northern wall? They seem to fall out of the regular procedure.

29
SFML projects / Re: University Project - The Dare
« on: January 17, 2016, 09:45:05 pm »
Looks pretty good for 5 days of work. I suppose this isnt your first SFML project?

30
SFML projects / Re: 2D Puzzle game
« on: January 12, 2016, 06:38:56 pm »
Virtual methods, as already explained, should fit your needs. If you can solve your problem using virtuals, never try to cast someting.

Anyway, if you decide to use casts at some point consider carefully. If you check the type of an object through some enums and you are, by you own logic, sure that the object must be of type jammer, you can use static_cast, with does no runtime type-check and is more efficient in this case.

On the other hand, if you use dynamic_cast, you dont need your own enum to check. Just cast and check for nullptr afterwarts.

This:

Code: [Select]
if(m_objects[i]->type() == objectType::Jammer)
       {
             Jammer* tempJammer = static_cast<Jammer*>(m_object[i].get());
             tempJammer->derivedClassFunction();
        }

Or this:

Code: [Select]
Jammer* tempJammer = dynamic_cast<Jammer*>(m_object[i].get());
if(tempJammer != nullptr)
{
       tempJammer->derivedClassFunction();
}

Pages: 1 [2] 3