Problems using sprites in my game

greeting ive been using deepknights game-base starter to commence a video game project ive made changes to the charecters and enemies ,however i cant seem to get sprites working and ive been looking ,but i havent found anything online that helps

Hi, you can start here:

When you want to use an atlas:

(Beeblerox’ repo is mentioned in first outlook)

ah hold on can sprites only be added to an app class? i had mine in my player witch is an entity

You could either also ask on the Deepnight discord channel (especially for Deepnight’s gameBase related questions)

or give a bit more context on how the Entity class is defined in your game.
GameBase will probably use the spr : HSprite field for the entity’s sprite. However HSprite is not part of the Heaps API… maybe belongs to one of Deepnight’s helper repos?

In the end (for plain Heaps code/API) hxd.App has a s2d (the scene) to which objects can be added to, for sprites these will be the classes Bitmap, Anim, TileGroup, etc. …

i asked the dn discord but i wasnt getting a response ,and i tried implementing the code but it still isnt working and i tried with h2d scene but that doesnt work now to

celestalfox/rfd-project-blue-eyes: Base structure for my games, using Heaps framework and Haxe language. this is a link for the fork i did of dn base starter

i got told about a spritebatch element ill try that out

So, gameBase is built on Heaps, however each has its own rules/manual/ideas on how it wants to be used by the programmer. (So you should only mix both APIs if you already know a bit what you are doing. By that I mean gameBase maybe does not intend you to use h2d.Scene or h2d.SpriteBatch and other classes from the Heaps API directly, instead has its own, more specified classes that integrate smoothly with the gameBase engine as a whole. E.g. it uses HSprite to realize sprites in general.)

Additionally, Heaps (and gameBase) is a framework that requires more active coding and programming experience than compared to engines like Godot or GDevelop, which are better suited for beginners. Or Flixel at least if you want a plain coding approach (just like Heaps*) to make a game (also uses Haxe).

This tutorial hopefully introduces gameBase in a way that actually brings results right from the start:

In contrast, this should explain how a very simple game may look like in plain Heaps code:


* there is Hide though for 3D (but then you really need some experience)