[Closed] Pre-Games Jam 5 Warm Up

I was trying to allow for the ability to increase the sequences via sequenceLength by incrementing it each win. I suppose I could make it the size of 10 and only check the first 5 and increment the max index till the length of the array.

I saw a post about cleaning up a dynamic array or not using them at all. I ignored it out of convenience laziness ignorance, but I was aware of this. I was not aware of the memory leak issue, so thank you for pointing that out.

I would really like to learn what you find if you have time. :)

1 Like

I thought of a very quick and simple memory game. Will see how it turns out. I’ve got a basic stick figure drawn with 1 frame per animation, but it should be interesting. Once I’ve got everything done if an artist (such as @Vampirics) wants to step in and do some simple, but better, animations they’d be more than welcome to.

Should I share the overall concept or leave it as a surprise for when it’s done?

2 Likes

This post kinda is turning into a more free form warm up and discussion. I would be floored to see your code for a simple game. A repo link to follow progression would be choice.

There are a lot of amazing developers on here and going through their code is great, but my experience to traverse C++ code in a educational manner is limited. A small game with tight code is what I secretly was hoping from this post. :P

P.S.

Seeing animation in a simple game would also be very educational for me.

That’s actually what C#'s List<T> and C++'s std::vector<T> do internally.
They allocate enough memory to store N objects (where N is usually a power of two), even if they don’t need to store that many objects, and then gradually increase their Count/size until they hit their Capacity/capacity.
Then when they finally reach the end and another Add/push_back is requested, they finally allocate a new buffer that’s twice the size of the old one and copy the old memory across.
(std::vector<T> actually often uses pointers rather than tracking the number of elements for some reason. I’ve always assumed it’s believed to be more portable but I don’t know for sure.)

In this case though you wouldn’t be allocating more.
It might seem strange to have a fixed upper maximum,
but remember that all computers (even desktops) have a hard limit on how much memory they have,
so in reality you always have a fixed upper maximum.
It just happens to be that in this case the programmer chooses the maximum and can detect when it’s been reached.

You could probably fit more than 10 if you want.

The former link is a bit muddled, but the latter link is a good one.
(Particularly my follow up comment… mainly because it features that neat little doodle about heap fragmentation from “Munificent” Bob Nystom’s Game Programming Patterns book.)

And not the good kind.

Will do.

You could do both by putting it in a [details] block so people can choose whether to read it or not.

I really enjoy this type of in depth back and forth on the nuts n’ bolts of C++/ and what is happening in the back end you provide.

Honestly, learning C++ has given me a much greater understanding of programming in an efficient manner and not the hey it works, on to the next feature mentality I get into while at work.

1 Like

Here’s the github link: https://github.com/tuxinator2009/Arduboy_MemoryRhythm

Those who wish to have it remain a surprise can ignore the link for now.

@Pharap has always been an ever present, and valuable, resident expert in c++ that’ll gladly help anyone out be it silly mistakes by people new to c++ or common gotchas made even by veterans.

He’ll also gladly chat your ear off if you let/ask him :P

2 Likes

Woo! Thanks for contributing to the post and my sneaky ploy to learn from simple games by sophisticated developers!

As you can see there is literally nothing but empty files (even the INO file is just an empty setup and loop functions with no includes or anything). Going to try and commit each stage from project init, setting up includes and dependencies, and make commits each step of the way so you’ll be able to somewhat follow along with my process (though it’s been a bit).

2 Likes

You keep your cotton-picking hands off @vampirics - I have him busy on another project :slight_smile:

4 Likes

Sadly I get the impression that’s quite common.

That and the attitude that all customers are going to have 3GHz 8-core CPUs and 16GB of RAM to burn through, and that the software being written is somehow entitled to actually use all of that and it doesn’t have to share it with other software.

I’d best stop there, lest I climb on a soapbox and rant on for 8 more paragraphs.

Emphasis on anyone. (I’m really not that picky…)

This is true.

Paradoxically I’m actually quite quiet in person.
I find typing much easier than talking.

That’s a fork of Eried’s repo presumably created to upload or update one of the games on it.


@lyellick, I’ve written a preliminary wall of text.
I’m on the fence about whether to post it now or wait a bit in case more things occur to me.

2 Likes

Well it’s coming along nicely so far at least. I’ve got the generator working to create an infinite sequence requiring only 8 bytes of data (2 uint32_t variables one for the initial seed to repeat the sequence from the beginning and one for the current value in the sequence).

Hehe :stuck_out_tongue:

1 Like

I removed that blur from that post because I noticed it was really a fork a few moments ago.

I’ll take it. :P

This struck a cord in me for some reason. More so from the standpoint of applying that to different industries, which would be an interesting discussion.


Disclaimer: I didn't take this personally, hope you don't read this as that. Just talkin' with ya.

I do get complacent in development by leaning on the vast memory and processing power a server(s) provides. I work in automating cloud infrastructures and use frameworks and a higher level language, higher not implying superior, to complete tasks. I don’t have to worrying about the lower level processes/resource handling. Allowing the framework to handle things way better than I could build within a sprint or direct my team to complete within the scope and on time. I do rely on the fact the code being run on a system has more than enough resources to handle it even though the code is not optimized to a T.

To me it comes down to:

  • Is it maintainable and inline to what the framework provides and does well?
  • Did we build something that wont cause another developer to say WTF?

Now, if I were a developer who only worked on systems with a finite amount of resources I would have a totally different mentality on how the code was written. With developing on the Arduboy I do have the incentive to build light software to the best of my knowledge until I learn a better way. I have to else I get memory leaks or use resources too quickly.

To your point…

Is it really entitlement or is that comment more for development on finite systems? By developers who come into it with the mentality it will be run with the 3GHz 8-core CPUs and 16GB of RAM to burn?

I think the disconnect between your comment and how I took it is which customer/scope are you focusing on. Not saying striving to develop the leanest application to run on any system can’t be applied to any industry. That being said is it really transferable to all industries in a way it positively affects velocity?

I personally would like to hear your soapbox/perspective. From what I have seen in your code is you have a mature and polished knowledge of development practices and a solid philosophy based off people who built the foundation.

It would be refreshing to hear your soapbox/perspective and you have a eager ear.


Here’s my submission:

2 Likes

A post was merged into an existing topic: [WIP] September

Don’t want hog this post anymore than I have, but I’ve read through your post and will start applying this to my games jam 5 game.

If you make a separate topic/thread for your game like @tuxinator2009 has then I can migrate the assessment/review to that thread.

1 Like

@tuxinator2009 wins by being the only person to submit! He also wins by being a good guy. <3

Thanks for contributing. I think the best thing to come out of this was having a game that was super simple which applied fundamentals anyone can learn from.

Have a fun Game Jam 5!

2 Likes

Thanks it was kind of fun to make something really basic and simple. Your theme got me thinking about the old classic Simon Says and the idea just popped in my head to have a figure do a different pose for each button press to give it some life (ie. make it look like a random dance). Then I wanted to keep it incredibly simple so as to help be a good demonstration for beginners and newcomers.

2 Likes

Actually, I’d say nobody won. Neither game met the stated “Required Criteria”.

September doesn’t produce any tones or a small music ditty.

MemoryRhythm doesn’t implement a class and doesn’t have a title screen image.

:stuck_out_tongue_winking_eye:

2 Likes

Ha! You’re right!

1 Like