Idea: Little Computer People For Pokitto


#21

I like the idea of loft and lounge better the more I think about it to be honest.


#22

@BigBadHodad don’t you want to try to program this? When I think about it, a project with interacting agents could be a learner-friendly project.

You’d simply start by drawing the house on the screen – super simple. There would be no camera movement (or maybe only extremely simple vertical movement), that’s already a win. Then you’d proceed to draw placeholder people in that house. You could skip input/output handling altogether at this stage, because the persons would be doing stuff autonomously – another huge win (IO handling in my view adds a lot of friction and bloat, it’s sooo much simpler without it). Then you’d start animating them, make them move across the floors, use doors, say things – these are all more or less independent functionalities that wouldn’t make the code complex. Each action would be one method of the person class. Every day you could add one action. Only at the end of the project you could add some IO, menus, sound and eye candies.


#23

I’d love to but I have no confidence because I know nothing lol. If I had a coach then possibly.


#24

At worst you’ll end up with some kind of Pokitto screensaver/demo/proof of concept and learning a thing or two, so nothing to lose I guess :wink: I’ll be here to help, as well as others on this forum. @Pharap always helps people get the code written, as seen above.


#25

Cool thank you, I need to make the “house” next,


#26

hmm I need to find another solution, when I try to make the “House” in piskel it works fine till I zoom in to make the rooms and it loses the rest of the image

I try to make it in photoshop and no dice, it won’t give me the clean lines I need it keeps making them that blurry line thing photoshop does now.

piskel works but when I zoom in it loses everything no in frame


#27

pokittohouse

the house so far.


#28

Reminds me my younger daughter’s doll house. Good job so far!


#29

pokittohouse2

im not sure how to make the record player look, and it still needs a computer in the top floor green areapokittohouse4

Still need to add a phone, and bookshelves in computer office and bottom floor by the chair.

I’d honestly like to see what it looked like on a pokitto to see what I can do to improve it, I may have to go for the flat look in the zx spectrum version to make it look right on pokitto


#30

As an added bonus, they’re shorter so they use a bit less screen space :P

I’d swap the kitchen and the lounge though, usually stairs and front doors are nearer the lounge.

+1 for ‘spiders’

Honestly I wouldn’t call the AI part ‘beginner friendly’, state machines and decision trees are both relatively complicated.

I think the programming side of this would be beyond what @BigBadHodad is capable of at the moment.
I think he’d need to start smaller for his first project.
Like maybe attempting that minigame idea again.

It depends how you handle it.

If you abstract it away with some sort of command system then you only need to put the input in one area and you can forget about it the rest of the time - instead you end up writing your code to respond to requests to perform particular actions.

That sounds like a very quick way to end up with the dreaded ‘god object’ issue.

I think it would be better if doors knew how to open and close, and the state machine/decision tree node handles when the character opens the door.

(From the code point of view, the code checks if the character is close enough to the door and the door opens magically, without ever interacting with the character object - the door doesn’t know the character exists, the character doesn’t know the door exists, the flow control mechanism is aware of both.)

Yup, I’m always ready to offer advice to anyone who asks.
(I usually find the designing and problem solving more fun than the actual writing.)

It’s already looking very good.


#31

@Pharap – doing it the proper way will make most simple projects difficult :smiley: I know we argue about this all the time, but let me express my opinion again. For example:

^ This is of course how you should do it, but the fact alone that the person has to learn what command pattern is (and all the related OOP concepts along with it) is the friction I am talking about. I believe it’s okay to skip it for now. It’s an advanced topic that can wait for later.

The same goes for the god object – of course your program will be better moddable, reusable and safer if you use all the proper patterns. But I don’t think that’s the goal here. I’d personally go even without OOP here, but I think doing the “my program is all one object” is a nice middle way that can teach about what a class is, without requiring to learn too many things at once.

The AI – I wouldn’t even talk about state machines, again it’s not a beginner stuff. Simply do the AI with ifelses and state variables – for advanced programmers it’s the wrong way, but doing it the wrong way in the beginning is important to realize why it’s important to use the patterns.

That was basically my idea for this project – make mistakes and learn along the way. You can’t learn all at once – like children are first taught you can’t substract a bigger number from a smaller number, and only later they’re told you actually can – I think it’s a proper way of learning, isn’t it? :slight_smile:


On the other hand though the other project would probably have a better chance to be finished which is very important for motivation, so actually if @BigBadHodad wanted to do it first, I’d support that decision.

The house graphics is too nice though, it has to be made into a game sooner or later now. Very nice cozy house :slight_smile:


#32

There’s lots of different ways a command system can be done.

It doesn’t have to involve inheritance and classes, it can be done by just having an enum class for the different actions and each kind of action being a different value.

enum class Action
{
	Jump, RunRight, RunLeft,
};

The idea behind it is more important than the specific execution.

That depends what you mean by ‘OOP’.

It’s one thing to go without inheritance and virtual methods,
it’s an entirely different things to not have methods on your objects or to go without classes entirely.

OOP has many different schools of thought after all, many of which are in disagreement with each other.
For example, there’s debate over whether prototype-based systems count as object orientation because they don’t feature classes.

They say the 4 pillars of OOP are abstraction, encapsulation, inheritance and polymorphism,
but if I write a class that uses none of those 4 pillars, is it still OOP?
Some would say yes, some would say no.

To me the answer doesn’t matter,
what matters are the justifications for writing a class that way - the practical benefits, not the puritanical arguments over categorisation.
I don’t even think of the way I write programs as OOP, I just think of it as programming with objects and classes.

I sometimes get the impression that you think I adhere to certain techniques for puritanical reasons,
but I assure you that whenever I make a design decision it is for purely practical reasons.
When I think about design, I think about the benefits and drawbacks of each approach, not whether something does what the buzzword-obsessed dogmatists think it should do.
It’s the exact same approach I apply to selecting a licence - I pick what best achieves what I want to achieve, I don’t follow dogmas.

Even if you’re just starting out, ‘my program is all one object’ is not the way to do things because it entirely misses the point of having objects in the first place.

The fundamental point of objects is twofold:

  • To reduce repetition by creating a pattern that can be replicated (i.e. instantiating a class)
  • To represent a concept with a single object instead of having the parts of that concept spread around different parts of the code base

Hence:

class Point
{
public:
	float x;
	float y;

public:
	Point(void) = default;
	Point(float x, float y) : x(x), y(y) {}
};

// An array of points
Point points[];

Instead of:

// Separate arrays of x and y values
float xs[];
float ys[];

Like I say, I don’t think this is really the best game for a beginner to be attempting anyway.

Though I don’t think state machines are that complicated.
State machines are one of the most fundamental building blocks of games, they govern the transition from titlescreen to gameplay.

Strictly speaking even an enum class oriented switch statement is a state machine.

I don’t like lying to children because it can cause irreversible damage in some cases, and unlearning the lies can be hard.

I prefer to say “actually you can subtract a larger number from a smaller number, but don’t worry about that for the moment, instead just focus on this and I’ll explain the rest later”.

(Perhaps I just have the opposite of compulsive lying?)

That’s why I tried to help.

I even went out of my way to make the first example very simple in the hopes it would be easier for @BigBadHodad to get to grips with.
I used no classes or structs, just functions, enumerations and fundamental types.

That I agree with.

(I’m still too preocupied to commit to anything more than advice giving though.)


#33

On the AI, I figure it could check every 3-5 minutes to see which room it was in and randomly do something else kinda like the needs function every half hour

I’ll finish up the house tonight i left the top black in case it needs scrolling text and for the spiders


#34

After you’ve got the art done, I’d suggest you start reading through some programming tutorials and start making some simple Pokitto programs to get started.

Doing art first and code second is a trap that often leads to unfinished projects.
Doing code first and art second is a better approach, as @Hanski’s Pokitto Grand Prix demonstrates - there’s still some graphics missing (partly my fault, I didn’t get round to making that tree) but the functionality is there, and that’s more important.

Projects always seem simple when they’re just a collection of thoughts in your head and you have a vague idea of how everything should work, but the devil is in the detail.
When you come to try to turn those vague ideas into code they suddenly seem a lot more difficult to implement.

(Also 5 minutes and half hours seem like large time scales. I suspect 1-2 minutes and 5-10 minutes are more likely time scales, if not less.)


#35

I think starting with code versus art depends – I mostly start with art and when it’s good, I feel motivated to put it in good use (then again though, many of my projects stay unfinished). Also big projects like The Elder Scrolls start with concept art, from what I’ve seen in some documentaries. But many people like the placeholder approach better and that’s fine.

But now I’m inclined to agree @BigBadHodad should start with something really, really simple, just to learn the workflow. Perhaps a game completely without any hand made art would be best. Simply use some geometrical shapes, text and so on.


#36

I agree on starting with something easier. Personally I am more using the “what if” approach. Which is starting with display in something on screen, anything. And then ask my self what if … Think of just 1 thing and try to do it. Which means that you will learn 1 thing at a time. My first ever game started as a cute heart displayed on the screen for my wife… And then turned into Love Rush for the Arduboy.

BUT… I really think this project should still be done. Maybe as a joined effort? I know we all are busy with our own things. But we should go back to it at some point.


#37

That’s a bit of a different circumstance though.

Firstly, that’s a really big project, so they have to plan.
Secondly, they have a whole team of people involved.
Thirdly, they’re working to a budget and a deadline, so they can’t just lose interest part way through.
And finally, their programmers have already learned to program, they aren’t trying to learn on the job.

It’s fine doing concept art as part of the planning stage,
but there’s a difference between drawing concept art and committing to creating assets for the game.

I find if people start making the actual game art first, they can get carried away with the art and lose interest in actually creating the game because the programming is never as fun as the art.

Also, if they later realise the art has to change, they’re reluctant to part with it - if you start with placeholders that you don’t care about, it’s much easier to throw it away.

I think it should definitely be done,
but if @BigBadHodad wants to be involved in the programming then I think it would be best to delay it for now until he’s had a bit of experience with some smaller projects.

Without that experience, this project will end up seeming very daunting.

To be honest I think if we made it into a joined effort, me and @drummyfish’s styles would be clashing too much if we both wrote code.

I’d want to be using classes with member functions and accessors with C++-style casting, scoped enumerations and various C++11 features,
while @drummyfish would be wanting to stick to data-only structs and free functions, C-style casting and macros.

We could spend days drawing up the treaty deciding how to compromise :P


@BigBadHodad
Last time I checked you were still just starting out with programming,
but I don’t know how much you’ve read since then.

To clarify, how much do you actually know about programming and/or C++?
Variables, if, for, while, int, bool, enum?


#38

The coding style I’d gladly accept because I think when multiple people work together, it’s already worth switching to the proper style, as long as we set the rules on the standard and so on, maybe I could even live with tabs if you insisted on them. But I think we could clash on other things, such as art licensing, or possibly some design decisions that aren’t textbook examples and don’t have one obvious solution, or even game design, because I can’t easily make many compromises about the big picture I see. Better not try at this moment ^^ But I can see us working together if each of us worked on a separate reusable module, that could work very well. So maybe some day in the future we can make something like this.


#39

As I said before, it’s not so much that it’s “proper”, it’s that there are clear benefits to not avoiding particular techniques.

If you wanted spaces, you’d have to excuse me occaisionally submitting something with tabs.
My editors are set up to automatically switch to tabs when I start editing a section, and even without them I would go on autopilot and use tabs and Allman style anyway.

If you wanted me to adhere to a K&R + spaces style, you’d have to afford me extra time to go back and manually change it to that style, or for someone else to ‘clean up’ after me.

If it’s not my art I don’t really care what the licence is.
I’d be more concerned about the code licence (i.e. no GPL).

I can’t really imagine a situation like that beyond stuff like “file/data format”, but I’ll chalk that up as plausible.

If it’s not ‘my game’ then I don’t care as much about game design.
I wasn’t entirely happy about some of the design decisions in Dark & Under,
but it wasn’t a deal breaker because I wasn’t that emotionally invested in the design.
I was just there to make the odd suggestion and to focus on shrinking the code.

(If I was trying to make a game close to my heart, I’d probably be an absolute tyrant. :P)


Perhaps the bigger problem would be GitHub vs GitLab?


#40

Very little, I read when I can (single dad syndrome lol we have less life than undead).
And to tell the truth I agree that I should work on something smaller, been thinking about it too, but I Really want to see this project get going and I’ll do the art if someone wants to work on it I need to finish the prototype house tonight and then I’ll create a empty one in case @drummyfish wants to work on a version where you build the house then move in a little pokitto person.

Also how many frames of animation does the character absolutely Need ? Walking climbing stairs doing stuff.

Also art wise this is all hand drawn using references from the zx spectrum version.